[Tilesathome] Making automated OSM to oceantiles.dat

Maarten Deen mdeen at xs4all.nl
Mon Oct 13 11:03:22 BST 2008


I was thinking of making some script that can automatically write some output 
for oceantiles.dat to at least get data where mixed tiles are located.
Unfortunatly, I'm not so well versed in perl (but reading all the nice examples 
in the svn does get me a long way) and I'm also not very sure as to how to 
tackle this.

The thought is easy: every tile that contains a node which is part of a way that 
is tagged natural:coastline is a mixed tile. So get every way that is tagged 
natural:coastline, then get all nodes associated with that way, for every node 
get the location and then calculate the tile xy in z12 from that.

Now, the more difficult part is to get these nodes. In order to get nodes, you 
first have to traverse the .osm file to get all ways with natural:coastline, 
then remeber the node refs and then traverse the file again to get the nodes.
Or read everything in one stride, keeping the nodes in memory.
This seems to be a very memoryintensive task, especially if you want to do the 
world.

What would be a good approach for this? Build my own database and do a simple 
query to get the nodes I need from there? That sure would make it a lot easier.
Or is there a database somewhere that I can query?

Maarten




More information about the Tilesathome mailing list