import bpy import bmesh import math mesh = bpy.context.active_object.data bm = bmesh.new() bm.from_mesh(mesh) edges = bm.edges for i in range(len(edges)): bm.edges.ensure_lookup_table() edge = edges[i]; edge_length = edge.calc_length() divide_count = math.floor(edge_length / 10) - 1; if divide_count > 0: bmesh.ops.subdivide_edges(bm,edges=[edge],cuts=divide_count,use_grid_fill=True,) bm.to_mesh(mesh) mesh.update()
<osm-script>
<query type="way">
<bbox-query s="35.335" w="139.470" n="35.911" e="140.168"/>
<has-kv k="highway" modv="" regv="motorway*"/>
</query>
<union>
<item/>
<recurse type="way-node"/>
</union>
<print/>
</osm-script>
# wget -b http://download.geofabrik.de/asia/japan-latest.osm.pbf
osm2pgsql -c -d [データベース名] -U [ユーザー名] -W -H [DBサーバホスト名] [取込対象のosm.pdfファイル]