OpenStreetMap 로고 OpenStreetMap

My gps traces on a map.

the_winch님이 English로 2009년 2월 11일에 게시함.

I downloaded all my gps traces.

Used a simple ruby script to convert them to a .osm file. Each gps point became a node with an amenity=post_box tag.

Used osm2pgsql to import the .osm file into PostGIS.

Cut down the mapnik stylesheet so it only rendered postboxes using a 1x1 black box.

Added a couple of lines to generate_tiles.py to delete blank tiles. Then generated the tiles for zoom 8 to 17 in the area of my gps traces.

The result can be seen here.

이메일 아이콘 Bluesky 아이콘 Facebook 아이콘 LinkedIn 아이콘 마스토돈 아이콘 텔레그램 아이콘 X 아이콘

토론

2009년 2월 12일 11:06kaerast님의 의견

What are the couple of extra lines you added to generate_tiles.py? That seems quite a useful addition in some cases.

2009년 2월 12일 18:42the_winch님의 의견

Looking at it I only added a single line. generate_tiles.py already checks for blank tiles by comparing the file size of a tile against a hardcoded value. I just addeed a line to delete the blank file.

Index: generate_tiles.py
===================================================================
--- generate_tiles.py (revision 13578)
+++ generate_tiles.py (working copy)
@@ -99,8 +99,9 @@

bytes=os.stat(tile_uri)[6]
empty= ''
- if bytes == 137:
+ if bytes == 360:
empty = " Empty Tile "
+ os.remove(tile_uri)

print name,"[",minZoom,"-",maxZoom,"]: " ,z,x,y,"p:",p0,p1,exi$

댓글을 남기려면 로그인하세요