Лагатып OpenStreetMap OpenStreetMap

My gps traces on a map.

Апублікавана карыстальнікам the_winch 11 Люты 2009 на мове English

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.

Email icon Bluesky Icon Facebook Icon LinkedIn Icon Mastodon Icon Telegram Icon X Icon

Абмеркаванне

Каментар ад kaerast у 12 Люты 2009 у 11:06

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

Каментар ад the_winch у 12 Люты 2009 у 18:42

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$

Увайсці каб пакінуць каментар