
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. WanMil

On Apr 29, 2012, at 22:07, WanMil wrote:
attached patch uses precompiled sea files to generate the sea areas.
Hi WanMil, Thanks for doing this. This seems like a quite promising approach. I'll try to test it in the next few days. Coincidentally, I noticed a blog entry from Joachim Topf, where he describes work on his OSMCoastline code, which extracts coastline data and renders sea polygons: http://blog.jochentopf.com/2012-03-07-osm-coastlines.html I don't know if any of this is relevant, especially if you are now using the precompiled Mapnik sea areas. Cheers.

On Apr 29, 2012, at 22:07, WanMil wrote:
attached patch uses precompiled sea files to generate the sea areas.
Hi WanMil,
Thanks for doing this. This seems like a quite promising approach. I'll try to test it in the next few days.
Coincidentally, I noticed a blog entry from Joachim Topf, where he describes work on his OSMCoastline code, which extracts coastline data and renders sea polygons:
http://blog.jochentopf.com/2012-03-07-osm-coastlines.html
I don't know if any of this is relevant, especially if you are now using the precompiled Mapnik sea areas.
It is! Jochens blog gave me the idea to use sea information from another source (don't reinvent the wheel :-). I tried but didn't succeed to run Jochens new program. But it would be very good to use his new approach. The precompiled mapnik sea files have a big disadvantage: the land areas overlap and this has to be removed by the mkgmap precompiler. This is very expensive and requires a long time (maybe some optimizations are possible for that...) WanMil
Cheers.
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

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.
WanMil
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

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?

Hi Carlos,
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:
the first exception indicates that your mkgmap.jar is compiled with JDK 1.7 and is not executable with Java 1.6.
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)
The 2nd error seems like a problem of the precompiler. Can you upload the osm tile or can you give me the bounding box of the tile?
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?
Thanks! WanMil

El 03/05/12 21:33, WanMil escribió:
Hi Carlos,
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:
the first exception indicates that your mkgmap.jar is compiled with JDK 1.7 and is not executable with Java 1.6.
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)
The 2nd error seems like a problem of the precompiler. Can you upload the osm tile or can you give me the bounding box of the tile?
The map I was processing was morocco.osm.pbf from Geofabrik
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?
Thanks! WanMil

The problem was generated by changes to the precompiler. Attached patch should now work with the new precompiled files. Thanks for the report! WanMil
El 03/05/12 21:33, WanMil escribió:
Hi Carlos,
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:
the first exception indicates that your mkgmap.jar is compiled with JDK 1.7 and is not executable with Java 1.6.
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)
The 2nd error seems like a problem of the precompiler. Can you upload the osm tile or can you give me the bounding box of the tile?
The map I was processing was morocco.osm.pbf from Geofabrik
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?
Thanks! WanMil
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

El 03/05/12 22:24, WanMil escribió:
The problem was generated by changes to the precompiler. Attached patch should now work with the new precompiled files. You catched it! Now it works fine for Morocco. In the next days I'll test it with other maps and report any issue.
Thanks for the report!
WanMil
El 03/05/12 21:33, WanMil escribió:
Hi Carlos,
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:
the first exception indicates that your mkgmap.jar is compiled with JDK 1.7 and is not executable with Java 1.6.
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)
The 2nd error seems like a problem of the precompiler. Can you upload the osm tile or can you give me the bounding box of the tile?
The map I was processing was morocco.osm.pbf from Geofabrik
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?
Thanks! WanMil

Hi Carlos, I have already found a few tiles with flooding (e.g. NE of Russia). I have to investigate that. But I will be happy if you find some other things :-) WanMil
El 03/05/12 22:24, WanMil escribió:
The problem was generated by changes to the precompiler. Attached patch should now work with the new precompiled files. You catched it! Now it works fine for Morocco. In the next days I'll test it with other maps and report any issue.
Thanks for the report!
WanMil
El 03/05/12 21:33, WanMil escribió:
Hi Carlos,
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:
the first exception indicates that your mkgmap.jar is compiled with JDK 1.7 and is not executable with Java 1.6.
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)
The 2nd error seems like a problem of the precompiler. Can you upload the osm tile or can you give me the bounding box of the tile?
The map I was processing was morocco.osm.pbf from Geofabrik
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?
Thanks! WanMil
mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

On May 3, 2012, at 23:55, WanMil wrote:
I have already found a few tiles with flooding (e.g. NE of Russia). I have to investigate that. But I will be happy if you find some other things :-)
I've also been testing a little bit. So far the results have been pretty good. One point I'm not sure on is how the --precomp-sea option should work together with the other coastline related options. - I assume that the --coastlinefile is now redundant, correct? - What about the various --generate-sea parameters? I currently use the following when compiling: --generate-sea=multipolygon,extend-sea-sectors,close-gaps=1000,floodblocker Are most or all of these parameters now redundant? Cheers.

El 04/05/12 19:33, Clinton Gladstone escribió:
On May 3, 2012, at 23:55, WanMil wrote:
I have already found a few tiles with flooding (e.g. NE of Russia). I have to investigate that. But I will be happy if you find some other things :-)
I've also been testing a little bit. So far the results have been pretty good.
One point I'm not sure on is how the --precomp-sea option should work together with the other coastline related options.
- I assume that the --coastlinefile is now redundant, correct?
- What about the various --generate-sea parameters?
I currently use the following when compiling:
--generate-sea=multipolygon,extend-sea-sectors,close-gaps=1000,floodblocker
Are most or all of these parameters now redundant? If you use --precomp-sea you don't need --generate-sea at all, just omit it.

El 04/05/12 19:33, Clinton Gladstone escribió:
On May 3, 2012, at 23:55, WanMil wrote:
I have already found a few tiles with flooding (e.g. NE of Russia). I have to investigate that. But I will be happy if you find some other things :-)
I've also been testing a little bit. So far the results have been pretty good.
One point I'm not sure on is how the --precomp-sea option should work together with the other coastline related options.
- I assume that the --coastlinefile is now redundant, correct?
- What about the various --generate-sea parameters?
I currently use the following when compiling:
--generate-sea=multipolygon,extend-sea-sectors,close-gaps=1000,floodblocker
Are most or all of these parameters now redundant? If you use --precomp-sea you don't need --generate-sea at all, just omit it.
That's true. --precomp-sea uses multipolygon processing. The --generate-sea parameters are not used at all if --precomp-sea is set. Also the --coastlinefile is ignored too. WanMil

El 06/05/12 20:23, WanMil escribió:
El 04/05/12 19:33, Clinton Gladstone escribió:
On May 3, 2012, at 23:55, WanMil wrote:
I have already found a few tiles with flooding (e.g. NE of Russia). I have to investigate that. But I will be happy if you find some other things :-)
I've also been testing a little bit. So far the results have been pretty good.
One point I'm not sure on is how the --precomp-sea option should work together with the other coastline related options.
- I assume that the --coastlinefile is now redundant, correct?
- What about the various --generate-sea parameters?
I currently use the following when compiling:
--generate-sea=multipolygon,extend-sea-sectors,close-gaps=1000,floodblocker
Are most or all of these parameters now redundant?
If you use --precomp-sea you don't need --generate-sea at all, just omit it.
That's true. --precomp-sea uses multipolygon processing. The --generate-sea parameters are not used at all if --precomp-sea is set. Also the --coastlinefile is ignored too. I've been using the patched mkgmap for a while and for several countries and it worked fine. Perhaps it's time to commit the patch if nobody reports any problem with it.

El 06/05/12 20:23, WanMil escribió:
El 04/05/12 19:33, Clinton Gladstone escribió:
On May 3, 2012, at 23:55, WanMil wrote:
I have already found a few tiles with flooding (e.g. NE of Russia). I have to investigate that. But I will be happy if you find some other things :-)
I've also been testing a little bit. So far the results have been pretty good.
One point I'm not sure on is how the --precomp-sea option should work together with the other coastline related options.
- I assume that the --coastlinefile is now redundant, correct?
- What about the various --generate-sea parameters?
I currently use the following when compiling:
--generate-sea=multipolygon,extend-sea-sectors,close-gaps=1000,floodblocker
Are most or all of these parameters now redundant?
If you use --precomp-sea you don't need --generate-sea at all, just omit it.
That's true. --precomp-sea uses multipolygon processing. The --generate-sea parameters are not used at all if --precomp-sea is set. Also the --coastlinefile is ignored too. I've been using the patched mkgmap for a while and for several countries and it worked fine. Perhaps it's time to commit the patch if nobody reports any problem with it.
Hi Carlos, I don't commit release 2 of this patch. I want to use PBF/OSM format for the precompiled files. I realized that there is no need for a proprietary format for the precompiled data. This has some advantages but I have to finish the implementation. Have fun! WanMil

I have just resumed my service that provides coastlines for use with the --coastlinefile option. European and planet-wide files are available at [1] as before. Once the new precompiled coastline code goes in, I guess my service will become obsolete and can go away again. But until then, feel free use the coastlines from there to work around flooding issues. [1] http://www.fabianowski.eu/osm/coastlines/ - Bartosz

Once the new precompiled coastline code goes in, I guess my service will become obsolete and can go away again. >But until then, feel free use the coastlines from there to work around flooding issues.
Is that really the case? Using precompiled sea for the whole world seems overkill - there are something like 56500 files in sea_20120331.zip file. All I need is the Great Britain coastline to guard against flooding. Or have I misunderstood something? Roger Calvert (Rogerc on OSM)

I have never looked at how the precompiled coastlines work. Maybe my extracted coastlines will remain useful in many cases after all. If so, I am happy to keep providing them. One advantage the extracted files definitely have is that I am updating them every day, based on the current Geofabrik extract. So the coastline should always be in sync with the rest of the map data. - Bartosz

Once the new precompiled coastline code goes in, I guess my service will become obsolete and can go away again. >But until then, feel free use the coastlines from there to work around flooding issues.
Is that really the case? Using precompiled sea for the whole world seems overkill - there are something like 56500 files in sea_20120331.zip file. All I need is the Great Britain coastline to guard against flooding.
Does it matter how many files there are? Anyhow it would be easily possible to use a subset of the files. When I post the next patch of the precompiled sea the input files have osm of pbf format. Using osm format it is possible to correct floodings manually with JOSM. So from my point of view the only reason to use the present coastline processing is that the precomiled sea uses not the very latest data and is compiled only from time to time. Ok, maybe a second one: Precompiled sea uses the multipolygon algorithm. But it would be quite easy to add the polygon variant if required. WanMil
Or have I misunderstood something?
Roger Calvert (Rogerc on OSM)
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (5)
-
Bartosz Fabianowski
-
Carlos Dávila
-
Clinton Gladstone
-
Roger Calvert
-
WanMil