logo separator

[mkgmap-dev] [PATCH v1] Precompiled sea

From WanMil wmgcnfg at web.de on Sun Apr 29 21:07:40 BST 2012


attached patch uses precompiled sea files to generate the sea areas.

Generating sea areas have always been a source of problems. Little 
errors in the coastline data could flood whole tiles. A second problem 
is that generating sea areas often take long CPU time.

After having used a precompilation step for the address assignment I 
wondered if it would be possible to do something similar for sea areas. 
After having played around with compiling sea areas myself I remembered 
that Mapnik also precompiles sea areas. This precompilation can be 
downloaded at 
http://wiki.openstreetmap.org/wiki/Coastline#Main_Mapnik_Layer and uses 
the ESRI shape format. That makes things very easy :-)

I used the geotools lib and converted the sea information to our well 
known boundary format and added a small code addition to the mkgmap 

Attached patch does not include the ESRI shape conversion (I have to 
think about how to put that into the mkgmap code base - lots of geotools 
libs have to be included). But I have uploaded the whole world to 

The new mkgmap parameter --precomp-sea=<dir with sea files> must be added.
So unzip the sea_20120331.zip file to a directory called sea.
Call the patched mkgmap with
java -jar mkgmap.jar <.. your mkgmap options..> --precomp-sea=sea *.osm.pbf

I am sure there are some problems left and the code patch should be 
cleaned up (better integration of the BoundaryXXX classes). But the 
first results looked so well that I want to give you the early chance to 
play with it.

Now I hope it should also be possible to create a tile in the 
atlantic/pacific ocean without any data but full of sea.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: precompiled_sea_v1.patch
Type: application/x-download
Size: 9339 bytes
Desc: not available
Url : http://lists.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20120429/569cbd9e/attachment.bin 

More information about the mkgmap-dev mailing list