
I am using precompiled <http://www.navmaps.eu/wanmil/sea_20121212.zip> sea_20121212.zip and ran into this problem: The coastline looks like this: http://files.mkgmap.org.uk/download/85/precompiled.jpg But it should look like this: http://files.mkgmap.org.uk/download/84/coastline.JPG Thanks in advance for your help with this issue.

On Wed, Jan 23, RheinSkipper wrote:
I am using precompiled <http://www.navmaps.eu/wanmil/sea_20121212.zip> sea_20121212.zip and ran into this problem:
The coastline looks like this:
http://files.mkgmap.org.uk/download/85/precompiled.jpg
But it should look like this:
http://files.mkgmap.org.uk/download/84/coastline.JPG
Thanks in advance for your help with this issue.
Your precompiled sea data is from mid of december, the changes to the coastline in that area where made yesterday. You need to create your own precompiled coastline data from the current OSM database. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

You need to create your own precompiled coastline data from the current OSM database.
I see. Thank you. But according to this http://wiki.openstreetmap.org/wiki/Mkgmap/help/options#generating_precompile d_sea_yourself and this http://openstreetmapdata.com/data/land-polygons it is quite complicated to make your own precompiled coastline. So I will have to wait for an update of the ready made coastline.

On Wed, Jan 23, RheinSkipper wrote:
You need to create your own precompiled coastline data from the current OSM database.
I see. Thank you.
But according to this
http://wiki.openstreetmap.org/wiki/Mkgmap/help/options#generating_precompile d_sea_yourself and this http://openstreetmapdata.com/data/land-polygons it is quite complicated to make your own precompiled coastline. So I will have to wait for an update of the ready made coastline.
Creating them is really simple, but getting the tools installed and running isn't trivial :( If you use a 64bit Linux system, I can give you a pointer to my RPMs for this. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

Creating them is really simple, but getting the tools installed and running isn't trivial :(
If you use a 64bit Linux system, I can give you a pointer to my RPMs for this.
Can precompiled sea be created fully automatically, or is it necessary to tweak broken coastlines manually? I have access to a system running Red Hat Linux 64 bit. But I have no root access and there is not much installed on the system, only java. And I have not much experience using Linux. But it may be worth a try. If the process can be made fully automatic, I could provide precompiled sea on a regular schedule.

RheinSkipper wrote
Can precompiled sea be created fully automatically, or is it necessary to tweak broken coastlines manually?
I have access to a system running Red Hat Linux 64 bit. But I have no root access and there is not much installed on the system, only java. And I have not much experience using Linux. But it may be worth a try. If the process can be made fully automatic, I could provide precompiled sea on a regular schedule.
See http://wiki.openstreetmap.org/wiki/Mkgmap/help/options#Using_precompiled_sea I think the process depends on the coastline data from http://openstreetmapdata.com/data/land-polygons So, it makes no sense to produce data on a daily bases when the input data is updated less frequently (current data is from 2013-01-03. Ciao, Gerd -- View this message in context: http://gis.19327.n5.nabble.com/coastline-tp5745923p5746407.html Sent from the Mkgmap Development mailing list archive at Nabble.com.

On Fri, Jan 25, GerdP wrote:
See http://wiki.openstreetmap.org/wiki/Mkgmap/help/options#Using_precompiled_sea
I think the process depends on the coastline data from http://openstreetmapdata.com/data/land-polygons
So, it makes no sense to produce data on a daily bases when the input data is updated less frequently (current data is from 2013-01-03.
You can create the land polygons on your own, doesn't take much more time then downloading them. If you get libgdal correct installed and running for use by osmcoastline. That was the tricky part, since you cannot use the current code from all projects, they will not work together. You need to fetch the right releases. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

On Fri, Jan 25, RheinSkipper wrote:
Creating them is really simple, but getting the tools installed and running isn't trivial :(
If you use a 64bit Linux system, I can give you a pointer to my RPMs for this.
Can precompiled sea be created fully automatically, or is it necessary to tweak broken coastlines manually?
If there are no errors in the coastlines, it can be done fully automatically. If there are errors, you have to fix them first in the OSM database and retry the process.
I have access to a system running Red Hat Linux 64 bit. But I have no root access and there is not much installed on the system, only java. And I have not much experience using Linux. But it may be worth a try. If the process can be made fully automatic, I could provide precompiled sea on a regular schedule.
You need to install quite sime C, C++ and java libraries and binaries. So without root access, it will be difficult, because you have to recompile everything and install it in your home directory. The process is in short: - get current planet file or update your local copy - osmcoastline -i -f -p land -o coastline.db planetfile.osm.pbf (if return value is 0 or 1, continue, else abort and fix the errors first) - ogr2ogr -f "ESRI Shapefile" land_polygons.shp coastline.db land_polygons - mkgmap_sea_generator land_polygons.shp WGS84 sea-$NEXT (mkgmap_sea_generator is a script calling the mkgmap java function) sea-$NEXT contains now the new precomp sea data. This tooks about 1-1.5 hours, depending on your machine. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

You need to install quite sime C, C++ and java libraries and binaries. So without root access, it will be difficult, because you have to recompile everything and install it in your home directory.
The process is in short:
- get current planet file or update your local copy - osmcoastline -i -f -p land -o coastline.db planetfile.osm.pbf (if return value is 0 or 1, continue, else abort and fix the errors first) - ogr2ogr -f "ESRI Shapefile" land_polygons.shp coastline.db land_polygons - mkgmap_sea_generator land_polygons.shp WGS84 sea-$NEXT (mkgmap_sea_generator is a script calling the mkgmap java function)
sea-$NEXT contains now the new precomp sea data.
I was playing around with ogr2ogr (and ogr2osm) on my Windows machine a while ago. So I know how complicated and time consuming it is to set up gdal based things. Providing precompiled sea might be a task for someone who is more familiar with this. Is http://www.navmaps.eu/wanmil/ the only source available for precompiled sea or does someone have a more recent one?

Can precompiled sea be created fully automatically, or is it necessary to tweak broken coastlines manually?
If there are no errors in the coastlines, it can be done fully automatically. If there are errors, you have to fix them first in the OSM database and retry the process.
I have access to a system running Red Hat Linux 64 bit. But I have no root access and there is not much installed on the system, only java. And I have not much experience using Linux. But it may be worth a try. If the process can be made fully automatic, I could provide precompiled sea on a regular schedule.
You need to install quite sime C, C++ and java libraries and binaries. So without root access, it will be difficult, because you have to recompile everything and install it in your home directory.
The process is in short:
- get current planet file or update your local copy - osmcoastline -i -f -p land -o coastline.db planetfile.osm.pbf (if return value is 0 or 1, continue, else abort and fix the errors first) - ogr2ogr -f "ESRI Shapefile" land_polygons.shp coastline.db land_polygons - mkgmap_sea_generator land_polygons.shp WGS84 sea-$NEXT (mkgmap_sea_generator is a script calling the mkgmap java function)
sea-$NEXT contains now the new precomp sea data.
This tooks about 1-1.5 hours, depending on your machine.
AFAIK the data on http://openstreetmapdata.com/data/land-polygons is updated daily - but only if there are no severe problems. The data is created with osmcoastline too. So I guess it is enough to have a check skript if the data is updated. WanMil

AFAIK the data on http://openstreetmapdata.com/data/land-polygons is updated daily - but only if there are no severe problems. The data is created with osmcoastline too.
So I guess it is enough to have a check skript if the data is updated.
WanMil
Yes, the land-polygon shape files are recent now. So I want to use them instead of messing around with gdal. Where can I find the mkgmap_sea_generator script and how are the libraries to setup? I am not familiar with mkgmap Java sources.

RheinSkipper wrote
Where can I find the mkgmap_sea_generator script and how are the libraries to setup? I am not familiar with mkgmap Java sources.
You have to compile mkgmap with the SeaGenerator. I think these are the mimimal steps: 1) if you don't have the sources, get them via svn or download the tarball : http://www.mkgmap.org.uk/download/mkgmap-r2464-src.tar.gz 2) install the java compiler, see http://www.mkgmap.org.uk/develop.html and do what is described under "Minimum requirements", 3) to compile mkgmap with the PrecompSeaGeneraor change the build.xml: search for a line like this: <exclude name="**/optional/*.java"/> and replace it with <exclude name="**/dem/optional/*.java"/> Without this change, some required classes are not compiled. 2) execeute ant resolve-optional to download the needed jar files 3) download latest splitter from http://www.mkgmap.org.uk/download/splitter.html, unzip, and and copy splitter.jar and \lib\fastuitl.jar to mkgmap\lib\optional 4) execute ant 5) chdir to mkgmap\dist 6) execute mkgmap with a command similar to this: D:\mkgmap\dist>java -Xmx5000m -cp mkgmap.jar;..\lib\optional\* uk.me.parabola.mkgmap.sea.optional.PrecompSeaGenerator f:\osm\land-polygons-split-4326\land_polygons.shp WGS84 e:\sea Hope that helps? Gerd -- View this message in context: http://gis.19327.n5.nabble.com/coastline-tp5745923p5746625.html Sent from the Mkgmap Development mailing list archive at Nabble.com.

You have to compile mkgmap with the SeaGenerator. I think these are the mimimal steps: 1) if you don't have the sources, get them via svn or download the tarball : http://www.mkgmap.org.uk/download/mkgmap-r2464-src.tar.gz 2) install the java compiler, see http://www.mkgmap.org.uk/develop.html and do what is described under "Minimum requirements",
3) to compile mkgmap with the PrecompSeaGeneraor change the build.xml: search for a line like this: <exclude name="**/optional/*.java"/> and replace it with <exclude name="**/dem/optional/*.java"/> Without this change, some required classes are not compiled. 2) execeute ant resolve-optional to download the needed jar files 3) download latest splitter from http://www.mkgmap.org.uk/download/splitter.html, unzip, and and copy splitter.jar and \lib\fastuitl.jar to mkgmap\lib\optional 4) execute ant 5) chdir to mkgmap\dist 6) execute mkgmap with a command similar to this: D:\mkgmap\dist>java -Xmx5000m -cp mkgmap.jar;..\lib\optional\* uk.me.parabola.mkgmap.sea.optional.PrecompSeaGenerator f:\osm\land-polygons-split-4326\land_polygons.shp WGS84 e:\sea
Hope that helps?
Thank you, this helps a lot. I was trying it on my Windows machine with good success. At the moment step 6 is running. What difference does it make to download the split polygons instead of complete polygons? I am also trying to get it running on a Linux server. It was fine up to step 5. But at step 6 there is an error. My command is: java -Xmx5000m -cp mkgmap.jar;../lib/optional/* uk.me.parabola.mkgmap.sea.optional.PrecompSeaGenerator ../../land-polygons-split-4326/land_polygons.shp WGS84 ../../sea And the result is: Usage: java [-options] class [args...] (to execute a class) or java [-options] -jar jarfile [args...] (to execute a jar file) ... -bash: ../lib/optional/ant-1.8.2.jar: Permission denied Permissions of this file are rw-rw-r.

On 27/01/13 20:15, RheinSkipper wrote:
java -Xmx5000m -cp mkgmap.jar;../lib/optional/*
The semi-colon must be a colon for unix/linux systems.
-bash: ../lib/optional/ant-1.8.2.jar: Permission denied The semi-colon ends the command and the the shell attempts to execute what comes afterwards.
..Steve

The precompiling sea process works perfect on my Windows PC.
The semi-colon must be a colon for unix/linux systems.
Now I tried it with a colon. But on the Linux server I still have no success. Running the sea generator produces this error: Exception in thread "main" java.lang.UnsupportedClassVersionError: uk/me/parabol a/mkgmap/sea/optional/PrecompSeaGenerator : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:634) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 2) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: uk.me.parabola.mkgmap.sea.optional.PrecompSeaGene rator. Program will exit. For this I used the mkgmap I built successfully under Windows and copied it to the Linux server. Building mkgmap under Linux fails with errors like: [javac] symbol: class Node [javac] location: class PrecompSeaSaver [javac] /home/oseam/osm/mksea/mkgmap/src/uk/me/parabola/mkgmap/sea/optional/ PrecompSeaSaver.java:144: error: package uk.me.parabola.splitter does not exist [javac] for (uk.me.parabola.splitter.Way pbfWay : pbfWays) { [javac] ^ [javac] Note: /home/oseam/osm/mksea/mkgmap/src/uk/me/parabola/mkgmap/sea/opt ional/PrecompSeaGenerator.java uses or overrides a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 18 errors BUILD FAILED /home/oseam/osm/mksea/mkgmap/build.xml:233: Compile failed; see the compiler err or output for details. For building mkgmap I just extracted apache-ant-1.8.4-bin.tar.gz to $HOME/osm/mksea/apache-ant and jdk-7u11-linux-x64.tar.gz (not the rpm version) to $HOME/osm/mksea/jdk and set the environment variables accordingly: #!/bin/bash export ANT_HOME=$HOME/osm/mksea/apache-ant export JAVA_HOME=$HOME/osm/mksea/jdk export PATH=${PATH}:${ANT_HOME}/bin cd mkgmap ant resolve-optional ant

Seems that you forgot to copy splitter.jar and fastutil.jar. Gerd
From: rheinskipper1000@gmx.de To: mkgmap-dev@lists.mkgmap.org.uk Date: Mon, 28 Jan 2013 19:28:26 +0100 Subject: Re: [mkgmap-dev] coastline
The precompiling sea process works perfect on my Windows PC.
The semi-colon must be a colon for unix/linux systems.
Now I tried it with a colon. But on the Linux server I still have no success. Running the sea generator produces this error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: uk/me/parabol a/mkgmap/sea/optional/PrecompSeaGenerator : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:634) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 2) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: uk.me.parabola.mkgmap.sea.optional.PrecompSeaGene rator. Program will exit.
For this I used the mkgmap I built successfully under Windows and copied it to the Linux server.
Building mkgmap under Linux fails with errors like:
[javac] symbol: class Node [javac] location: class PrecompSeaSaver [javac] /home/oseam/osm/mksea/mkgmap/src/uk/me/parabola/mkgmap/sea/optional/ PrecompSeaSaver.java:144: error: package uk.me.parabola.splitter does not exist [javac] for (uk.me.parabola.splitter.Way pbfWay : pbfWays) { [javac] ^ [javac] Note: /home/oseam/osm/mksea/mkgmap/src/uk/me/parabola/mkgmap/sea/opt ional/PrecompSeaGenerator.java uses or overrides a deprecated API. [javac] Note: Recompile with -Xlint:deprecation for details. [javac] Note: Some input files use unchecked or unsafe operations. [javac] Note: Recompile with -Xlint:unchecked for details. [javac] 18 errors
BUILD FAILED /home/oseam/osm/mksea/mkgmap/build.xml:233: Compile failed; see the compiler err or output for details.
For building mkgmap I just extracted apache-ant-1.8.4-bin.tar.gz to $HOME/osm/mksea/apache-ant and jdk-7u11-linux-x64.tar.gz (not the rpm version) to $HOME/osm/mksea/jdk and set the environment variables accordingly:
#!/bin/bash export ANT_HOME=$HOME/osm/mksea/apache-ant export JAVA_HOME=$HOME/osm/mksea/jdk export PATH=${PATH}:${ANT_HOME}/bin
cd mkgmap ant resolve-optional ant
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Seems that you forgot to copy splitter.jar and fastutil.jar.
Sorry about that. You are right. Building mkgmap runs now without errors. But cd mkgmap/dist java -Xmx5000m -cp mkgmap.jar:../lib/optional/* uk.me.parabola.mkgmap.sea.optional.PrecompSeaGenerator ../../land-polygons-split-4326/land_polygons.shp WGS84 ../../sea still produces this error: Exception in thread "main" java.lang.UnsupportedClassVersionError: uk/me/parabol a/mkgmap/sea/optional/PrecompSeaGenerator : Unsupported major.minor version 51.0 at java.lang.ClassLoader.defineClass1(Native Method) at java.lang.ClassLoader.defineClass(ClassLoader.java:634) at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14 2) at java.net.URLClassLoader.defineClass(URLClassLoader.java:277) at java.net.URLClassLoader.access$000(URLClassLoader.java:73) at java.net.URLClassLoader$1.run(URLClassLoader.java:212) at java.security.AccessController.doPrivileged(Native Method) at java.net.URLClassLoader.findClass(URLClassLoader.java:205) at java.lang.ClassLoader.loadClass(ClassLoader.java:321) at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294) at java.lang.ClassLoader.loadClass(ClassLoader.java:266) Could not find the main class: uk.me.parabola.mkgmap.sea.optional.PrecompSeaGene rator. Program will exit.

I am not 100% sure, but I assume the * in ../lib/optional/* is expanded by the shell. It seems that you have to specify each *.jar separately. Gerd RheinSkipper wrote
Seems that you forgot to copy splitter.jar and fastutil.jar.
Sorry about that. You are right. Building mkgmap runs now without errors.
But
cd mkgmap/dist
java -Xmx5000m -cp mkgmap.jar:../lib/optional/* uk.me.parabola.mkgmap.sea.optional.PrecompSeaGenerator ../../land-polygons-split-4326/land_polygons.shp WGS84 ../../sea
still produces this error:
Exception in thread "main" java.lang.UnsupportedClassVersionError: uk/me/parabol
a/mkgmap/sea/optional/PrecompSeaGenerator : Unsupported major.minor version 51.0
at java.lang.ClassLoader.defineClass1(Native Method)
at java.lang.ClassLoader.defineClass(ClassLoader.java:634)
at java.security.SecureClassLoader.defineClass(SecureClassLoader.java:14
2)
at java.net.URLClassLoader.defineClass(URLClassLoader.java:277)
at java.net.URLClassLoader.access$000(URLClassLoader.java:73)
at java.net.URLClassLoader$1.run(URLClassLoader.java:212)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:205)
at java.lang.ClassLoader.loadClass(ClassLoader.java:321)
at sun.misc.Launcher$AppClassLoader.loadClass(Launcher.java:294)
at java.lang.ClassLoader.loadClass(ClassLoader.java:266)
Could not find the main class: uk.me.parabola.mkgmap.sea.optional.PrecompSeaGene
rator. Program will exit.
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/coastline-tp5745923p5746909.html Sent from the Mkgmap Development mailing list archive at Nabble.com.

That means that you probably have compiled the files with Java 7 and now you try to start it with Java < 7.
This did the trick. Thanks a lot. It is interesting that it works well with jdk7 under Windows, but for Linux jdk6 is needed. My precompiled sea can be downloaded here: ftp://ftp5.gwdg.de/pub/misc/openstreetmap/openseamap/garmin/osm_precompiled_ sea.zip It will be updated at least on the 2nd and 17th of each month. If someone needs it updated more often, please let me know.

RheinSkipper wrote
That means that you probably have compiled the files with Java 7 and now you try to start it with Java < 7.
This did the trick. Thanks a lot. It is interesting that it works well with jdk7 under Windows, but for Linux jdk6 is needed.
I think you have two java versions installed: If you compile with jkd 7 and execute with jre6 it will not work (neither on linux nor on win) Gerd -- View this message in context: http://gis.19327.n5.nabble.com/coastline-tp5745923p5747161.html Sent from the Mkgmap Development mailing list archive at Nabble.com.

What difference does it make to download the split polygons instead of complete polygons?
Processing complete polygons require *much* more memory and I guess it needs a lot of more time to process them. The reason is that there is one *very* big polygons for europe, asia and afrika. And the PrecompSeaGenerator has to split that very complex polygon into several small pieces. So it is easier to process already split and therefore smaller and less complex polygons. WanMil

Alternatively, you can use my coastline extracts: http://fabianowski.eu/osm/coastlines/ They are not precompiled coastline files but coastlines extracted from the planet file and the Geofabrik Europe file. You can feed them to mkgmap directly. I update the files as time permits. The most recent one is dated 20th January 2013 at this moment. - Bartosz
participants (7)
-
Bartosz Fabianowski
-
Gerd Petermann
-
GerdP
-
RheinSkipper
-
Steve Ratcliffe
-
Thorsten Kukuk
-
WanMil