El 01/05/12 11:40, WanMil escribió: > Hi, > > I have reuploaded the precompiled sea to > http://www.navmaps.eu/wanmil/sea_20120331.zip > > Changes: > * Fixed some floodings > * Use a smaller raster to reduce multipolygon artefacts > > WanMil > > > >> Hi, >> >> 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 >> SeaGenerator. >> >> 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 >> http://www.navmaps.eu/wanmil/sea_20120331.zip. >> >> 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. Thanks for your work on this WanMil I have tried to use your patch but get the errors below when running mkgmap: Using java version "1.6.0_26" Java(TM) SE Runtime Environment (build 1.6.0_26-b03) Java HotSpot(TM) Server VM (build 20.1-b02, mixed mode) mkgmap crashes immediately with the following output: java.lang.UnsupportedClassVersionError: uk/me/parabola/mkgmap/reader/osm/SeaGenerator : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClassCond(ClassLoader.java:631) at java.lang.ClassLoader.defineClass(ClassLoader.java:615) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:141) at java.net.URLClassLoader.defineClass(URLClassLoader.java:283) at java.net.URLClassLoader.access$000(URLClassLoader.java:58) at java.net.URLClassLoader$1.run(URLClassLoader.java:197) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:190) at java.lang.ClassLoader.loadClass(ClassLoader.java:306) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:301) at java.lang.ClassLoader.loadClass(ClassLoader.java:247) at uk.me.parabola.mkgmap.reader.osm.OsmMapDataSource.<init>(OsmMapDataSource.java:53) at uk.me.parabola.mkgmap.reader.osm.bin.OsmBinMapDataSource.<init>(OsmBinMapDataSource.java:35) at sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method) at sun.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:39) at sun.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:27) at java.lang.reflect.Constructor.newInstance(Constructor.java:513) at java.lang.Class.newInstance0(Class.java:355) at java.lang.Class.newInstance(Class.java:308) at uk.me.parabola.mkgmap.reader.plugin.MapReader.createMapReader(MapReader.java:73) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:141) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:56) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:210) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:207) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303) at java.util.concurrent.FutureTask.run(FutureTask.java:138) at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908) at java.lang.Thread.run(Thread.java:662)
Using java version "1.7.0_03" Java(TM) SE Runtime Environment (build 1.7.0_03-b04) Java HotSpot(TM) Server VM (build 22.1-b02, mixed mode) mkgmap runs for a while and then crashes with the following: java.lang.AssertionError at uk.me.parabola.mkgmap.reader.osm.SeaGenerator.addPrecompSea(SeaGenerator.java:295) at uk.me.parabola.mkgmap.reader.osm.SeaGenerator.end(SeaGenerator.java:313) at uk.me.parabola.mkgmap.reader.osm.OsmReadingHooksChain.end(OsmReadingHooksChain.java:79) at uk.me.parabola.mkgmap.reader.osm.bin.OsmBinMapDataSource.load(OsmBinMapDataSource.java:68) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:144) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:56) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:210) at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:207) at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:334) at java.util.concurrent.FutureTask.run(FutureTask.java:166) at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1110) at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:603) at java.lang.Thread.run(Thread.java:722) Any hints? _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev