Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-22 Thread Johannes Formann
WanMil wmgc...@web.de wrote:

Hello WanMil,

  The full output from the whole build process is copied to a logfile:
  http://pastebin.com/jUQpzvYz

 ---
 line 3800ff: [javac] 
 /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/Writeable.java:5: 
 warning: unmappable character for encoding ASCII
 
 You seem to compile with encoding ASCII. In case there are some non 
 ASCII characters in the code you will get problems.

How shall I change that? setting the LC enviroment variables to something
fitting?

 ---
 line 1101ff: [copy] trunk/.classpath added as trunk/.classpath doesn't 
 exist.
 
 There are hundres of such messages in the logfile. Some parts of the 
 build script seem not to work. Maybe this causes that not the latest 
 mkgmap version is used?

I'm quite shure, this comes from copying betwen the persitent dir and the build
dir (so it has only to update the sources, no full re download every time)

 ---
 line 1051ff:
 There are several error message in the patching section.
 #patch_patches:
 #Skipped because property 'isWindows' not set.
 #patch_patches:  duration 0 seconds
 
 Are you sure that your patches are applied?

Yes, the debug patch is applied the same way.

 I haven't read most of your other emails where you checked Markos 
 proposals. So I don't know if you have tried to run a clean mkgmap build 
 downloaded from the mkgmap website using your splitted files and your 
 arguments. If you haven't done right now please do so and check if the 
 error still occurs.


Here is a (I think) clean build):

# delete everything related to mkgmap
osm@kalium:~/build$ rm -r mkgmap*
# do a checkout
osm@kalium:~/build$ mkdir mkgmap
osm@kalium:~/build$ cd mkgmap/
osm@kalium:~/build/mkgmap$ svn co http://svn.parabola.me.uk/mkgmap/trunk
Atrunk/test
Atrunk/test/uk
Atrunk/test/uk/me
Atrunk/test/uk/me/parabola
Atrunk/test/uk/me/parabola/imgfmt
...
Atrunk/Makefile
 U   trunk
Checked out revision 1792.

# apply the debug patch
cd trunk/src/
osm@kalium:~/build/mkgmap/trunk/src$ patch -p1 /home/osm/radkarte/debug.patch 
patching file uk/me/parabola/imgfmt/app/trergn/Polyline.java

# build
osm@kalium:~/build/mkgmap/trunk/src$ cd ..
osm@kalium:~/build/mkgmap/trunk$ ant dist
Buildfile: build.xml

prepare:
[mkdir] Created dir: /home/osm/build/mkgmap/trunk/build/classes

compile:
[javac] Compiling 352 source files to
/home/osm/build/mkgmap/trunk/build/classes
[javac]
/home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/Writeable.java:5:
warning: unmappable character for encoding ASCII
[javac]  * @author Thomas Lu??nig
[javac] ^
[javac]
/home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/Writeable.java:5:
warning: unmappable character for encoding ASCII
[javac]  * @author Thomas Lu??nig
[javac]  ^
[javac]
/home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
er.java:26: warning: unmappable character for encoding ASCII
[javac]  * For example K??rnerstra??e would become KORNERSTRASSE,
[javac] ^
[javac]
/home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
er.java:26: warning: unmappable character for encoding ASCII
[javac]  * For example K??rnerstra??e would become KORNERSTRASSE,
[javac]  ^
[javac]
/home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
er.java:26: warning: unmappable character for encoding ASCII
[javac]  * For example K??rnerstra??e would become KORNERSTRASSE,
[javac]   ^
[javac]
/home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
er.java:26: warning: unmappable character for encoding ASCII
[javac]  * For example K??rnerstra??e would become KORNERSTRASSE,
[javac]^
[javac]
/home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
er.java:27: warning: unmappable character for encoding ASCII
[javac]  * povsk?? would become RIPOVSKA etc.
[javac]^
[javac]
/home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
er.java:27: warning: unmappable character for encoding ASCII
[javac]  * povsk?? would become RIPOVSKA etc.
[javac] ^
[javac]
/home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
er.java:27: warning: unmappable character for encoding ASCII
[javac]  * povsk?? would become RIPOVSKA etc.
[javac]  ^
[javac]
/home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
er.java:27: warning: unmappable character for encoding ASCII
[javac]  * povsk?? would become RIPOVSKA etc.
[javac]   ^
[javac]
/home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
er.java:27: warning: unmappable character for encoding ASCII
[javac]  * povsk?? would become RIPOVSKA 

Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-22 Thread WanMil
Am 22.01.2011 14:22, schrieb Johannes Formann:
 WanMilwmgc...@web.de  wrote:

 Hello WanMil,

 The full output from the whole build process is copied to a logfile:
 http://pastebin.com/jUQpzvYz

 ---
 line 3800ff: [javac]
 /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/Writeable.java:5:
 warning: unmappable character for encoding ASCII

 You seem to compile with encoding ASCII. In case there are some non
 ASCII characters in the code you will get problems.

 How shall I change that? setting the LC enviroment variables to something
 fitting?

 ---
 line 1101ff: [copy] trunk/.classpath added as trunk/.classpath doesn't
 exist.

 There are hundres of such messages in the logfile. Some parts of the
 build script seem not to work. Maybe this causes that not the latest
 mkgmap version is used?

 I'm quite shure, this comes from copying betwen the persitent dir and the 
 build
 dir (so it has only to update the sources, no full re download every time)

 ---
 line 1051ff:
 There are several error message in the patching section.
 #patch_patches:
 #Skipped because property 'isWindows' not set.
 #patch_patches:  duration 0 seconds

 Are you sure that your patches are applied?

 Yes, the debug patch is applied the same way.

 I haven't read most of your other emails where you checked Markos
 proposals. So I don't know if you have tried to run a clean mkgmap build
 downloaded from the mkgmap website using your splitted files and your
 arguments. If you haven't done right now please do so and check if the
 error still occurs.


 Here is a (I think) clean build):

 # delete everything related to mkgmap
 osm@kalium:~/build$ rm -r mkgmap*
 # do a checkout
 osm@kalium:~/build$ mkdir mkgmap
 osm@kalium:~/build$ cd mkgmap/
 osm@kalium:~/build/mkgmap$ svn co http://svn.parabola.me.uk/mkgmap/trunk
 Atrunk/test
 Atrunk/test/uk
 Atrunk/test/uk/me
 Atrunk/test/uk/me/parabola
 Atrunk/test/uk/me/parabola/imgfmt
 ...
 Atrunk/Makefile
   U   trunk
 Checked out revision 1792.

 # apply the debug patch
 cd trunk/src/
 osm@kalium:~/build/mkgmap/trunk/src$ patch -p1/home/osm/radkarte/debug.patch
 patching file uk/me/parabola/imgfmt/app/trergn/Polyline.java

 # build
 osm@kalium:~/build/mkgmap/trunk/src$ cd ..
 osm@kalium:~/build/mkgmap/trunk$ ant dist
 Buildfile: build.xml

 prepare:
  [mkdir] Created dir: /home/osm/build/mkgmap/trunk/build/classes

 compile:
  [javac] Compiling 352 source files to
 /home/osm/build/mkgmap/trunk/build/classes
  [javac]
 /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/Writeable.java:5:
 warning: unmappable character for encoding ASCII
  [javac]  * @author Thomas Lu??nig
  [javac] ^
  [javac]
 /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/Writeable.java:5:
 warning: unmappable character for encoding ASCII
  [javac]  * @author Thomas Lu??nig
  [javac]  ^
  [javac]
 /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
 er.java:26: warning: unmappable character for encoding ASCII
  [javac]  * For example K??rnerstra??e would become KORNERSTRASSE,
  [javac] ^
  [javac]
 /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
 er.java:26: warning: unmappable character for encoding ASCII
  [javac]  * For example K??rnerstra??e would become KORNERSTRASSE,
  [javac]  ^
  [javac]
 /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
 er.java:26: warning: unmappable character for encoding ASCII
  [javac]  * For example K??rnerstra??e would become KORNERSTRASSE,
  [javac]   ^
  [javac]
 /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
 er.java:26: warning: unmappable character for encoding ASCII
  [javac]  * For example K??rnerstra??e would become KORNERSTRASSE,
  [javac]^
  [javac]
 /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
 er.java:27: warning: unmappable character for encoding ASCII
  [javac]  * povsk?? would become RIPOVSKA etc.
  [javac]^
  [javac]
 /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
 er.java:27: warning: unmappable character for encoding ASCII
  [javac]  * povsk?? would become RIPOVSKA etc.
  [javac] ^
  [javac]
 /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
 er.java:27: warning: unmappable character for encoding ASCII
  [javac]  * povsk?? would become RIPOVSKA etc.
  [javac]  ^
  [javac]
 /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/labelenc/Format6Encod
 er.java:27: warning: unmappable character for encoding ASCII
  [javac]  * povsk?? would become RIPOVSKA etc.
  [javac]   ^
  [javac]
 

Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-22 Thread Johannes Formann
WanMil wmgc...@web.de wrote:
 Am 22.01.2011 14:22, schrieb Johannes Formann:
  WanMilwmgc...@web.de  wrote:

  The full output from the whole build process is copied to a logfile:
  http://pastebin.com/jUQpzvYz
 
  ---
  line 3800ff: [javac]
  /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/Writeable.ja
  va:5: warning: unmappable character for encoding ASCII
 
  You seem to compile with encoding ASCII. In case there are some non
  ASCII characters in the code you will get problems.
 
  How shall I change that? setting the LC enviroment variables to something
  fitting?
 
  ---
  line 1101ff: [copy] trunk/.classpath added as trunk/.classpath doesn't
  exist.
 
  There are hundres of such messages in the logfile. Some parts of the
  build script seem not to work. Maybe this causes that not the latest
  mkgmap version is used?
 
  I'm quite shure, this comes from copying betwen the persitent dir and
  the build dir (so it has only to update the sources, no full re download
  every time)
 
  ---
  line 1051ff:
  There are several error message in the patching section.
  #patch_patches:
  #Skipped because property 'isWindows' not set.
  #patch_patches:  duration 0 seconds
 
  Are you sure that your patches are applied?
 
  Yes, the debug patch is applied the same way.
 
  I haven't read most of your other emails where you checked Markos
  proposals. So I don't know if you have tried to run a clean mkgmap build
  downloaded from the mkgmap website using your splitted files and your
  arguments. If you haven't done right now please do so and check if the
  error still occurs.
 
 
  Here is a (I think) clean build):
 
  # delete everything related to mkgmap
  osm@kalium:~/build$ rm -r mkgmap*
  # do a checkout
  osm@kalium:~/build$ mkdir mkgmap
  osm@kalium:~/build$ cd mkgmap/
  osm@kalium:~/build/mkgmap$ svn co http://svn.parabola.me.uk/mkgmap/trunk
  Atrunk/test
  Atrunk/test/uk
  Atrunk/test/uk/me
  Atrunk/test/uk/me/parabola
  Atrunk/test/uk/me/parabola/imgfmt
  ...
  Atrunk/Makefile
U   trunk
  Checked out revision 1792.
 
  # apply the debug patch
  cd trunk/src/
  osm@kalium:~/build/mkgmap/trunk/src$ patch
  -p1/home/osm/radkarte/debug.patch patching file
  uk/me/parabola/imgfmt/app/trergn/Polyline.java
 
  # build
  osm@kalium:~/build/mkgmap/trunk/src$ cd ..
  osm@kalium:~/build/mkgmap/trunk$ ant dist
  Buildfile: build.xml
 
  prepare:
   [mkdir] Created dir: /home/osm/build/mkgmap/trunk/build/classes
 
  compile:
   [javac] Compiling 352 source files to
  /home/osm/build/mkgmap/trunk/build/classes
   [javac]
  /home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/Writeable.jav
  a:5: warning: unmappable character for encoding ASCII
   [javac]  * @author Thomas Lu??nig
   [javac] ^
   [javac]

...

   [javac] Note: Some input files use unchecked or unsafe operations.
   [javac] Note: Recompile with -Xlint:unchecked for details.
   [javac] 26 warnings
 
  compile-pbf:
[echo] Protobuf binary format support
   [javac] Compiling 3 source files to
  /home/osm/build/mkgmap/trunk/build/classes
 
  build:
[copy] Copying 391 files to /home/osm/build/mkgmap/trunk/build/classes
 
  dist:
   [mkdir] Created dir: /home/osm/build/mkgmap/trunk/dist
   [mkdir] Created dir: /home/osm/build/mkgmap/trunk/dist/doc/api
 [jar] Building jar: /home/osm/build/mkgmap/trunk/dist/mkgmap.jar
[copy] Copying 18 files to /home/osm/build/mkgmap/trunk/dist/doc
[copy] Copying 4 files to /home/osm/build/mkgmap/trunk/dist
   [mkdir] Created dir: /home/osm/build/mkgmap/trunk/dist/examples
[copy] Copying 11 files to /home/osm/build/mkgmap/trunk/dist/examples
 
  BUILD SUCCESSFUL
  Total time: 6 seconds
 
  # copy it
  osm@kalium:~/build/mkgmap/trunk$ cp dist/mkgmap.jar ../../
 
  #run it
  osm@kalium:~/build/mkgmap/trunk$ cd ../../
  osm@kalium:~/build$ java -Xms256m -Xmx2560m -ea -jar mkgmap.jar --max-jobs=1
  --latin1 --code-page=1252 --add-pois-to-areas --adjust-turn-headings
  --drive-on-right --check-roundabouts --remove-short-arcs=3.3 --gmapsupp
  --tdbfile --index M0001736.TYP -c /home/osm/build/template.args
...
   at java.lang.Thread.run(Thread.java:662)
  Exiting - if you want to carry on regardless, use the --keep-going option
 
 
  Got exception.
 
  greetings
 
  Johannes
 
 
 1. Is it correct that debug.patch is the patch posted by Steve (original
 name allow-assert.patch)?

Yes, it is.

 2. Do you use the Sun or OpenJDK? There have been several reports with
 some obscure errors when using OpenJDK.

sun jre.
osm@kalium:~$ java -version
java version 1.6.0_22
Java(TM) SE Runtime Environment (build 1.6.0_22-b04)
Java HotSpot(TM) 64-Bit Server VM (build 17.1-b03, mixed mode)

 3. The ASCII errors should not happen. I have run a build and did not
 see any of those errors. But I don't know what to do...

I'll try setting and exporting the enviroment, maybe javac is 

Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-22 Thread Johannes Formann
Hi Marko,

Marko Mäkelä marko.mak...@iki.fi wrote:
 On Thu, Jan 20, 2011 at 10:25:27PM +0100, Johannes Formann wrote:
  --add-pois-to-areas --adjust-turn-headings --drive-on-right
  --check-roundabouts --remove-short-arcs=3.3 --net --route --gmapsupp
  --tdbfile --index M0001736.TYP
 
  You might try removing all of them first. If it does not crash, add
  --route (which should imply --net).
 
 Starting without those options
 java -Xms256m -Xmx2560m -ea -jar mkgmap.jar --max-jobs=1 --latin1
 --code-page=1252 -c /home/osm/build/template.args
 
 It's great that it crashes even without --route. I think that you should
 put back the --remove-short-arcs=3.3, so that you will get rid of the
 'zero length arc' warnings, maybe except the ones about splitting looped
 ways.
 
 Now, what if you use a template.args where you remove all files after
 the problematic tile? Try to find out which tile it is. Your sample 
 output mentions two different tile files around the crash: 59420055 and
 59420066. If you cannot modify the assertion message to display the file
 name, you can use 'binary search' on the template.args file, removing
 half the tiles until it no longer crashes.

Making some binary search with 
java -Xms256m -Xmx2560m -ea -Dlog.config=logging.properties -jar
mkgmap.jar --max-jobs=1 --latin1 --code-page=1252
--remove-short-arcs=3.3 -c /home/osm/build/template.args

47-94: crashes
70-94: won't
47-70: crashes
47-59: won't
59-70: crashes
59-64: won't
65-70: crashes
65-67: crashes
67: won't
66: crashes

Put it online: http://radkarte.formann.de/59420066.osm.gz

 By the way, which mkgmap version are you using?

trunk/Checked out revision 1792.

 Unrelated to this mkgmap bug (or insufficient diagnostics), is there a
 reason why you are still using the osm.bz2 input? The osm.pbf is more
 compact and can be split quicker.

I had once tried it, but the mainline splitter hadn't support for it yet
IIRC, after that forgotten to recheck, since it runs usually fully
automated once a week in the night.

greetings

Johannes

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-22 Thread Johannes Formann
WanMil wmgc...@web.de wrote:

 3. The ASCII errors should not happen. I have run a build and did not
 see any of those errors. But I don't know what to do...

The ASCII-Errors are solved, using LC_ALL, but no change regarding the
error:

Ausgecheckt, Revision 1793.
osm@kalium:~/build/mkgmap$ cd trunk/src/
osm@kalium:~/build/mkgmap/trunk/src$ patch -p1
/home/osm/radkarte/debug.patch patching file
uk/me/parabola/imgfmt/app/trergn/Polyline.javaosm@kalium:~/build/mkgmap/
trunk/src$ cd ..
osm@kalium:~/build/mkgmap/trunk$ ant distBuildfile: build.xml

prepare:
[mkdir] Created dir: /home/osm/build/mkgmap/trunk/build/classes

compile:
[javac] Compiling 352 source files to
/home/osm/build/mkgmap/trunk/build/classes
[javac] Note: Some input files use unchecked or unsafe operations.
[javac] Note: Recompile with -Xlint:unchecked for details.

compile-pbf:
 [echo] Protobuf binary format support
[javac] Compiling 3 source files to
/home/osm/build/mkgmap/trunk/build/classes

build:
 [copy] Copying 391 files to
/home/osm/build/mkgmap/trunk/build/classes

dist:
[mkdir] Created dir: /home/osm/build/mkgmap/trunk/dist
[mkdir] Created dir: /home/osm/build/mkgmap/trunk/dist/doc/api
  [jar] Building jar: /home/osm/build/mkgmap/trunk/dist/mkgmap.jar
 [copy] Copying 18 files to /home/osm/build/mkgmap/trunk/dist/doc
 [copy] Copying 4 files to /home/osm/build/mkgmap/trunk/dist
[mkdir] Created dir: /home/osm/build/mkgmap/trunk/dist/examples
 [copy] Copying 11 files to
/home/osm/build/mkgmap/trunk/dist/examples

BUILD SUCCESSFUL
Total time: 5 seconds
osm@kalium:~/build/mkgmap/trunk$ cp dist/mkgmap.jar
../../osm@kalium:~/build/mkgmap/trunk$ cd ../../osm@kalium:~/build$ java
-Xms256m -Xmx2560m -ea -Dlog.config=logging.properties -jar mkgmap.jar
--max-jobs=1 --latin1 --code-page=1252 --remove-short-arcs=3.3
/home/osm/build/59420066.osm.gz 
java.lang.AssertionError: deltaLong = 36103
at
uk.me.parabola.imgfmt.app.trergn.MapObject.setDeltaLong(MapObject.java:1
39)
at
uk.me.parabola.imgfmt.app.trergn.MapObject.setLongitude(MapObject.java:1
28)
at
uk.me.parabola.imgfmt.app.trergn.LinePreparer.calcLatLong(LinePreparer.j
ava:176)
at
uk.me.parabola.imgfmt.app.trergn.LinePreparer.init(LinePreparer.java:6
2)
at
uk.me.parabola.imgfmt.app.trergn.Polyline.write(Polyline.java:83)
at
uk.me.parabola.imgfmt.app.trergn.RGNFile.addMapObject(RGNFile.java:140)
at uk.me.parabola.imgfmt.app.map.Map.addMapObject(Map.java:241)
at
uk.me.parabola.mkgmap.build.MapBuilder$LineAddFilter.doFilter(MapBuilder
.java:1044)
at
uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.j
ava:57)
at
uk.me.parabola.mkgmap.filters.RemoveEmpty.doFilter(RemoveEmpty.java:61)
at
uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.j
ava:57)
at
uk.me.parabola.mkgmap.filters.LineSplitterFilter.doFilter(LineSplitterFi
lter.java:60)
at
uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.j
ava:57)
at
uk.me.parabola.mkgmap.build.LayerFilterChain.startFilter(LayerFilterChai
n.java:75)
at
uk.me.parabola.mkgmap.build.MapBuilder.processLines(MapBuilder.java:902)
at
uk.me.parabola.mkgmap.build.MapBuilder.makeSubdivision(MapBuilder.java:6
49)
at
uk.me.parabola.mkgmap.build.MapBuilder.makeMapAreas(MapBuilder.java:584)
at
uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:195)
at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:97)
at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:61)
at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220)
at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:217)
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(ThreadPoolExecuto
r.java:886)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:908)
at java.lang.Thread.run(Thread.java:662)
Exiting - if you want to carry on regardless, use the --keep-going
option


greetings

Johannes

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-22 Thread WanMil
Am 22.01.2011 15:52, schrieb Johannes Formann:
 WanMilwmgc...@web.de  wrote:

 3. The ASCII errors should not happen. I have run a build and did not
 see any of those errors. But I don't know what to do...

 The ASCII-Errors are solved, using LC_ALL, but no change regarding the
 error:

 Ausgecheckt, Revision 1793.
 osm@kalium:~/build/mkgmap$ cd trunk/src/
 osm@kalium:~/build/mkgmap/trunk/src$ patch -p1
 /home/osm/radkarte/debug.patch patching file
 uk/me/parabola/imgfmt/app/trergn/Polyline.javaosm@kalium:~/build/mkgmap/
 trunk/src$ cd ..
 osm@kalium:~/build/mkgmap/trunk$ ant distBuildfile: build.xml

 prepare:
  [mkdir] Created dir: /home/osm/build/mkgmap/trunk/build/classes

 compile:
  [javac] Compiling 352 source files to
 /home/osm/build/mkgmap/trunk/build/classes
  [javac] Note: Some input files use unchecked or unsafe operations.
  [javac] Note: Recompile with -Xlint:unchecked for details.

 compile-pbf:
   [echo] Protobuf binary format support
  [javac] Compiling 3 source files to
 /home/osm/build/mkgmap/trunk/build/classes

 build:
   [copy] Copying 391 files to
 /home/osm/build/mkgmap/trunk/build/classes

 dist:
  [mkdir] Created dir: /home/osm/build/mkgmap/trunk/dist
  [mkdir] Created dir: /home/osm/build/mkgmap/trunk/dist/doc/api
[jar] Building jar: /home/osm/build/mkgmap/trunk/dist/mkgmap.jar
   [copy] Copying 18 files to /home/osm/build/mkgmap/trunk/dist/doc
   [copy] Copying 4 files to /home/osm/build/mkgmap/trunk/dist
  [mkdir] Created dir: /home/osm/build/mkgmap/trunk/dist/examples
   [copy] Copying 11 files to
 /home/osm/build/mkgmap/trunk/dist/examples

 BUILD SUCCESSFUL
 Total time: 5 seconds
 osm@kalium:~/build/mkgmap/trunk$ cp dist/mkgmap.jar
 ../../osm@kalium:~/build/mkgmap/trunk$ cd ../../osm@kalium:~/build$ java
 -Xms256m -Xmx2560m -ea -Dlog.config=logging.properties -jar mkgmap.jar
 --max-jobs=1 --latin1 --code-page=1252 --remove-short-arcs=3.3
 /home/osm/build/59420066.osm.gz
 java.lang.AssertionError: deltaLong = 36103
  at
 uk.me.parabola.imgfmt.app.trergn.MapObject.setDeltaLong(MapObject.java:1
 39)
  at
 uk.me.parabola.imgfmt.app.trergn.MapObject.setLongitude(MapObject.java:1
 28)
  at
 uk.me.parabola.imgfmt.app.trergn.LinePreparer.calcLatLong(LinePreparer.j
 ava:176)
  at
 uk.me.parabola.imgfmt.app.trergn.LinePreparer.init(LinePreparer.java:6
 2)
  at
 uk.me.parabola.imgfmt.app.trergn.Polyline.write(Polyline.java:83)
  at
 uk.me.parabola.imgfmt.app.trergn.RGNFile.addMapObject(RGNFile.java:140)
  at uk.me.parabola.imgfmt.app.map.Map.addMapObject(Map.java:241)
  at
 uk.me.parabola.mkgmap.build.MapBuilder$LineAddFilter.doFilter(MapBuilder
 .java:1044)
  at
 uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.j
 ava:57)
  at
 uk.me.parabola.mkgmap.filters.RemoveEmpty.doFilter(RemoveEmpty.java:61)
  at
 uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.j
 ava:57)
  at
 uk.me.parabola.mkgmap.filters.LineSplitterFilter.doFilter(LineSplitterFi
 lter.java:60)
  at
 uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.j
 ava:57)
  at
 uk.me.parabola.mkgmap.build.LayerFilterChain.startFilter(LayerFilterChai
 n.java:75)
  at
 uk.me.parabola.mkgmap.build.MapBuilder.processLines(MapBuilder.java:902)
  at
 uk.me.parabola.mkgmap.build.MapBuilder.makeSubdivision(MapBuilder.java:6
 49)
  at
 uk.me.parabola.mkgmap.build.MapBuilder.makeMapAreas(MapBuilder.java:584)
  at
 uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:195)
  at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:97)
  at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:61)
  at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220)
  at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:217)
  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(ThreadPoolExecuto
 r.java:886)
  at
 java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
 va:908)
  at java.lang.Thread.run(Thread.java:662)
 Exiting - if you want to carry on regardless, use the --keep-going
 option


 greetings

 Johannes

Now I can reproduce your problem!
Using your tile and your parameters I get the same exception. I'll have 
to do some debugging session to see where the origin of the problem is.

WanMil
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-22 Thread Marko Mäkelä
On Sat, Jan 22, 2011 at 04:23:11PM +0100, WanMil wrote:
Now I can reproduce your problem!

Thanks WanMil, I will leave it to your capable hands. :-)

Marko
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-22 Thread Johannes Formann
Hello Marko,

Marko Mäkelä marko.mak...@iki.fi wrote:

 Unrelated to this mkgmap bug (or insufficient diagnostics), is there a
 reason why you are still using the osm.bz2 input? The osm.pbf is more
 compact and can be split quicker.


Just tried it again, but got an exception:
'-Xms256m'
'-Xmx2560m'
'-jar'
'splitter.jar'
'--resolution=14'
'--geonames-file=/home/osm/radkarte/cities1000.zip'
'/home/osm/build/germany.osm.pbf'
'/home/osm/radkarte/contourdata.osm.gz'

The ' characters around the executable and arguments are
not part of the command.
[apply] cache=
[apply] description=
[apply] geonames-file=/home/osm/radkarte/cities1000.zip
[apply] legacy-mode=false
[apply] mapid=63240001
[apply] max-areas=255
[apply] max-nodes=160
[apply] max-threads=4 (auto)
[apply] mixed=false
[apply] no-trim=false
[apply] output-dir=
[apply] overlap=2000
[apply] resolution=14
[apply] split-file=
[apply] status-freq=120
[apply] write-kml=
[apply] Elapsed time: 0s   Memory: Current 245MB (1MB used, 244MB
free) Max 2275MB
[apply] Time started: Sat Jan 22 18:47:53 CET 2011
[apply] Map is being split for resolution 14:
[apply]  - area boundaries are aligned to 0x400 map units
[apply]  - areas are multiples of 0x800 map units wide and high
[apply] The input osm file(s) will be re-parsed during the split
(slower) because no --cache parameter was specified
[apply] Processing /home/osm/build/germany.osm.pbf...
[apply] Error parsing xml from file
org.xmlpull.v1.XmlPullParserException: only whitespace content allowed
before start tag and not \u0 (position: START_DOCUMENT seen \u0... @1:1)
[apply] org.xmlpull.v1.XmlPullParserException: only whitespace
content allowed before start tag and not \u0 (position: START_DOCUMENT
seen \u0... @1:1) 
[apply] at
org.xmlpull.mxp1.MXParser.parseProlog(MXParser.java:1519)
[apply] at
org.xmlpull.mxp1.MXParser.nextImpl(MXParser.java:1395)
[apply] at org.xmlpull.mxp1.MXParser.next(MXParser.java:1093)
[apply] at
uk.me.parabola.splitter.AbstractXppParser.parse(AbstractXppParser.java:6
2)
[apply] at uk.me.parabola.splitter.Main.parse(Main.java:459)
[apply] at
uk.me.parabola.splitter.Main.processOsmFiles(Main.java:450)
[apply] at
uk.me.parabola.splitter.Main.processMap(Main.java:436)
[apply] Time finished: Sat Jan 22 18:47:53 CET 2011
[apply] at
uk.me.parabola.splitter.Main.calculateAreas(Main.java:326)
[apply] Total time taken: 0s
[apply] at uk.me.parabola.splitter.Main.split(Main.java:207)
[apply] at uk.me.parabola.splitter.Main.start(Main.java:121)
[apply] at uk.me.parabola.splitter.Main.main(Main.java:110)
[apply] Applied java to 2 files and 0 directories.

Some Hints how to use the pbf format? 

greetings

Johannes

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-21 Thread WanMil

 The full output from the whole build process is copied to a logfile:
 http://pastebin.com/jUQpzvYz


Johannes,

I have taken a quick look at the logfile.

There are tons of warnings and error messages. Please try to get rid of 
them.
Examples:

---
line 3800ff: [javac] 
/home/osm/build/mkgmap/trunk/src/uk/me/parabola/imgfmt/app/Writeable.java:5: 
warning: unmappable character for encoding ASCII

You seem to compile with encoding ASCII. In case there are some non 
ASCII characters in the code you will get problems.

---
line 1101ff: [copy] trunk/.classpath added as trunk/.classpath doesn't 
exist.

There are hundres of such messages in the logfile. Some parts of the 
build script seem not to work. Maybe this causes that not the latest 
mkgmap version is used?

---
line 1051ff:
There are several error message in the patching section.
#patch_patches:
#Skipped because property 'isWindows' not set.
#patch_patches:  duration 0 seconds

Are you sure that your patches are applied?



I haven't read most of your other emails where you checked Markos 
proposals. So I don't know if you have tried to run a clean mkgmap build 
downloaded from the mkgmap website using your splitted files and your 
arguments. If you haven't done right now please do so and check if the 
error still occurs.

WanMil
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-21 Thread Marko Mäkelä
Hi Johannes,

On Thu, Jan 20, 2011 at 10:25:27PM +0100, Johannes Formann wrote:
 --add-pois-to-areas --adjust-turn-headings --drive-on-right
 --check-roundabouts --remove-short-arcs=3.3 --net --route --gmapsupp
 --tdbfile --index M0001736.TYP

 You might try removing all of them first. If it does not crash, add
 --route (which should imply --net).

Starting without those options
java -Xms256m -Xmx2560m -ea -jar mkgmap.jar --max-jobs=1 --latin1
--code-page=1252 -c /home/osm/build/template.args

It's great that it crashes even without --route. I think that you should 
put back the --remove-short-arcs=3.3, so that you will get rid of the 
'zero length arc' warnings, maybe except the ones about splitting looped 
ways.

Now, what if you use a template.args where you remove all files after 
the problematic tile? Try to find out which tile it is. Your sample 
output mentions two different tile files around the crash: 59420055 and 
59420066. If you cannot modify the assertion message to display the file 
name, you can use 'binary search' on the template.args file, removing 
half the tiles until it no longer crashes.

Let me illustrate. Let's say you have tiles 59420001 through 59420100.  
First, remove all tiles between 59420001 and 59420050 in the 
template.args. If it still crashes, then try removing half of the 
remaining stuff: 59420075 through 59420100. If it does not crash, undo 
the last step and remove the other half, or remove a quarter, until you 
finally get a crash again. At the end, you should have a minimal input 
that reproduces the crash.

By the way, which mkgmap version are you using?

Unrelated to this mkgmap bug (or insufficient diagnostics), is there a 
reason why you are still using the osm.bz2 input? The osm.pbf is more 
compact and can be split quicker.

Best regards,

Marko
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-20 Thread Marko Mäkelä
Hi Johannes,

Does the problem disappear if you remove --style-file (i.e., use the 
default style)?

A run with the same options, except the --style-file options results 
again in a exception:

OK, it might be best to use the default style in your experiments from 
now on.

 What is in template.args? Any options before the file name
 59420059.osm.gz?

Don't know what matters, but here is the beginnig till 59420059.osm.gz

It should not matter. You only specify mapname, description, input-file 
for each tile.

mapname: 59420059
description: DE-Flensburg
input-file: 59420059.osm.gz

This won't crash:
osm@kalium:~/build$ java -Xms256m -Xmx2560m -ea -jar mkgmap.jar --max-jobs=1 
--latin1
--code-page=1252 --add-pois-to-areas --adjust-turn-headings --drive-on-right 
--check-roundabouts
--remove-short-arcs=3.3 --net --route /home/osm/build/59420059.osm.gz
[snip]
If I run a full build again:
osm@kalium:~/build$ java -Xms256m -Xmx2560m -ea -jar mkgmap.jar --max-jobs=1 
--latin1
--code-page=1252 --add-pois-to-areas --adjust-turn-headings --drive-on-right 
--check-roundabouts
--remove-short-arcs=3.3 --net --route --gmapsupp --tdbfile --index 
M0001736.TYP -c
/home/osm/build/template.args

What about this, does it crash?

java -Xms256m -Xmx2560m -ea -jar mkgmap.jar --max-jobs=1 \
--latin1 --code-page=1252 --add-pois-to-areas --adjust-turn-headings \
--drive-on-right --check-roundabouts --remove-short-arcs=3.3 \
--net --route --tdbfile \
--mapname=59420059 --description=DE-Flensburg --input-file=59420059.osm.gz

My reasoning is that the options
--gmapsupp --index M0001736.TYP
should not matter, because the error should occur when writing the 
59420059.img. The gmapsupp.img would be composed from the 5942*.img 
files, which would be generated first, one by one. I am not entirely 
sure about --index and --tdbfile.

If you can't get the single-tile command to crash, then I suggest that 
you try to remove options from the full build until it succeeds. Try 
removing all these, either one by one, or several at a time, whichever 
you prefer:

--add-pois-to-areas --adjust-turn-headings --drive-on-right 
--check-roundabouts --remove-short-arcs=3.3 --net --route --gmapsupp 
--tdbfile --index M0001736.TYP

You might try removing all of them first. If it does not crash, add 
--route (which should imply --net).

One more thing that you could do is adding 
-Dlog.config=logging.properties before -jar in the command line. Get the 
file from http://www.polkupyoraily.net/osm/. Then read the mkgmap.log.0 
backwards and see if you can find any clues there.

Best regards,

Marko
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-19 Thread Marko Mäkelä
Hallo Johannes,

while I cannot help with the actual bug, I can give you some advice to 
narrow it down. Once you have a minimal test case, your bug should be 
fixable.

On Tue, Jan 18, 2011 at 09:52:13PM +0100, Johannes Formann wrote:
rerun with a reduced option set (an the debug-patch still active):
[apply] Executing 'java' with arguments:
'-Xms256m'
'-Xmx2560m'
'-ea'
'-jar'
'mkgmap.jar'
'--max-jobs=1'
'--style-file=radkarte'

Does the problem disappear if you remove --style-file (i.e., use the 
default style)?

'--overview-mapnumber=5942'
'--overview-mapname=5942'
'--series-name=OSM_Radkarte'
'--product-id=1'
'--family-id=5942'
'--family-name=OSM Radkarte 18.01.2011'
'--country-name=Deutschland'
'--country-abbr=DE'

My educated guess is that these should not matter at all (please confirm 
by trying to removing these).

'--latin1'
'--code-page=1252'
'--add-pois-to-areas'
'--adjust-turn-headings'
'--drive-on-right'
'--check-roundabouts'
'--remove-short-arcs=3.3''--net''--route'
'--gmapsupp''--tdbfile''--index'
'M0001736.TYP''-c''/home/osm/build/template.args'

What is in template.args? Any options before the file name 
59420059.osm.gz?

But got an Exception again.

[apply] SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: ...

What if you replace these last bits

'--gmapsupp''--tdbfile''--index'
'M0001736.TYP''-c''/home/osm/build/template.args'

with just /home/osm/build/59420059.osm.gz

That should speed up the crash, shouldn't it? Please save that 
problematic tile file somewhere, so that you can test patches with the 
exact same input.

The faster the command runs, the easier you can test different options 
until you find the minimal options that are needed to trigger the bug.

You might also want to drop definitions from your style file until the 
crash goes away. But I would first try to reduce the other command line 
options before touching the --style-file option or the style 
definitions.

Another way of reducing would be to load the tile file in a powerful 
text editor and drop half the relations (or all of them if the crash 
persists), then drop half the ways, and so on, until the crash goes 
away. That would lead to a minimal test case. But I guess that Steve or 
WanMil can do that sort of processing if you make the file available to 
them. But, first try to narrow down the options and the style definition.

Best regards,

Marko
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-18 Thread Johannes Formann
Marko Mäkelä marko.mak...@iki.fi wrote:

  If it is a mkgmap bug then we will need more information.  Does it
  happen with unpatched mkgmap? With just the basic options?
 
 What are basic options?
 
 You can find a rather basic set of options in my scripts at 
 http://www.polkupyoraily.net/osm/. Of those options, I would consider
 generate-sea fancy.

rerun with a reduced option set (an the debug-patch still active):
[apply] Executing 'java' with arguments:
'-Xms256m'
'-Xmx2560m'
'-ea'
'-jar'
'mkgmap.jar'
'--max-jobs=1'
'--style-file=radkarte'
'--overview-mapnumber=5942'
'--overview-mapname=5942'
'--series-name=OSM_Radkarte'
'--product-id=1'
'--family-id=5942'
'--family-name=OSM Radkarte 18.01.2011'
'--country-name=Deutschland'
'--country-abbr=DE'
'--latin1'
'--code-page=1252'
'--add-pois-to-areas'
'--adjust-turn-headings'
'--drive-on-right'
'--check-roundabouts'
'--remove-short-arcs=3.3''--net''--route'
'--gmapsupp''--tdbfile''--index'
'M0001736.TYP''-c''/home/osm/build/template.args'

But got an Exception again.

[apply] SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area
too small to split at
http://www.openstreetmap.org/?mlat=54.63765mlon=9.72279zoom=17 (reduce
the density of points, length of lines, etc.)
[apply] java.lang.AssertionError: deltaLong = 36103
[apply] at
uk.me.parabola.imgfmt.app.trergn.MapObject.setDeltaLong(MapObject.java:1
39)
[apply] at
uk.me.parabola.imgfmt.app.trergn.MapObject.setLongitude(MapObject.java:1
28)
[apply] at
uk.me.parabola.imgfmt.app.trergn.LinePreparer.calcLatLong(LinePreparer.j
ava:176)
[apply] at
uk.me.parabola.imgfmt.app.trergn.LinePreparer.init(LinePreparer.java:6
2)
[apply] at
uk.me.parabola.imgfmt.app.trergn.Polyline.write(Polyline.java:83)
[apply] at
uk.me.parabola.imgfmt.app.trergn.RGNFile.addMapObject(RGNFile.java:140)
[apply] at
uk.me.parabola.imgfmt.app.map.Map.addMapObject(Map.java:241)
[apply] at
uk.me.parabola.mkgmap.build.MapBuilder$LineAddFilter.doFilter(MapBuilder
.java:1044)
[apply] at
uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.j
ava:57)
[apply] at
uk.me.parabola.mkgmap.filters.RemoveEmpty.doFilter(RemoveEmpty.java:61)
[apply] at
uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.j
ava:57)
[apply] at
uk.me.parabola.mkgmap.filters.LineSplitterFilter.doFilter(LineSplitterFi
lter.java:60)
[apply] at
uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.j
ava:57)
[apply] at
uk.me.parabola.mkgmap.build.LayerFilterChain.startFilter(LayerFilterChai
n.java:75)
[apply] at
uk.me.parabola.mkgmap.build.MapBuilder.processLines(MapBuilder.java:902)
[apply] at
uk.me.parabola.mkgmap.build.MapBuilder.makeSubdivision(MapBuilder.java:6
49)
[apply] at
uk.me.parabola.mkgmap.build.MapBuilder.makeMapAreas(MapBuilder.java:584)
[apply] at
uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:195)
[apply] at
uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:97)
[apply] at
uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:61)
[apply] at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220)
[apply] at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:217)
[apply] at
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
[apply] at
java.util.concurrent.FutureTask.run(FutureTask.java:138)
[apply] at
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecuto
r.java:886)
[apply] at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.ja
va:908)
[apply] at java.lang.Thread.run(Thread.java:662)
[apply] Exiting - if you want to carry on regardless, use the
--keep-going option


greetings

Johannes

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-17 Thread Steve Ratcliffe
Hi

 [apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:   deltaLong = 
 -32818
 [apply] java.lang.AssertionError: deltaLong = 36103
 [apply]  at 
 uk.me.parabola.imgfmt.app.trergn.MapObject.setDeltaLong(MapObject.java:139)

Thanks.  It is saying that there is a very large distance between two 
points.

So it is either in the data like that, or the stray line is caused by
a bug in mkgmap or the patch you are using.

If it is in the data (and the fact that the problem suddenly appeared
points that way) it would be best to fix the data.

If it is a mkgmap bug then we will need more information.  Does it
happen with unpatched mkgmap? With just the basic options?

Failing that, we will need to obtain the file that causes the problem.

Regards,
..Steve
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-17 Thread Johannes Formann
Hi,

  [apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:   
  deltaLong = -32818
  [apply] java.lang.AssertionError: deltaLong = 36103
  [apply]  at
uk.me.parabola.imgfmt.app.trergn.MapObject.setDeltaLong(MapObject.java:1
39)
 
 Thanks.  It is saying that there is a very large distance between two 
 points.
 
 So it is either in the data like that, or the stray line is caused by
 a bug in mkgmap or the patch you are using.
 
 If it is in the data (and the fact that the problem suddenly appeared
 points that way) it would be best to fix the data.

Just downloaded new data from geofabrik
http://download.geofabrik.de/osm/europe/germany.osm.bz2 and run mkgmap only with
your debug patch, got an exception again.
   [apply] SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area too 
small to split at
http://www.openstreetmap.org/?mlat=54.63765mlon=9.72279zoom=17 (reduce the 
density of points, length of lines, etc.)
   [apply] java.lang.AssertionError: deltaLong = 36103
   [apply]  at 
uk.me.parabola.imgfmt.app.trergn.MapObject.setDeltaLong(MapObject.java:139)
   [apply]  at 
uk.me.parabola.imgfmt.app.trergn.MapObject.setLongitude(MapObject.java:128)
   [apply]  at 
uk.me.parabola.imgfmt.app.trergn.LinePreparer.calcLatLong(LinePreparer.java:176)
   [apply]  at 
uk.me.parabola.imgfmt.app.trergn.LinePreparer.init(LinePreparer.java:62)
   [apply]  at 
uk.me.parabola.imgfmt.app.trergn.Polyline.write(Polyline.java:83)
   [apply]  at 
uk.me.parabola.imgfmt.app.trergn.RGNFile.addMapObject(RGNFile.java:140)
   [apply]  at uk.me.parabola.imgfmt.app.map.Map.addMapObject(Map.java:241)
   [apply]  at 
uk.me.parabola.mkgmap.build.MapBuilder$LineAddFilter.doFilter(MapBuilder.java:1044)
   [apply]  at 
uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
   [apply]  at 
uk.me.parabola.mkgmap.filters.RemoveEmpty.doFilter(RemoveEmpty.java:61)
   [apply]  at 
uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
   [apply]  at 
uk.me.parabola.mkgmap.filters.LineSplitterFilter.doFilter(LineSplitterFilter.java:60)
   [apply]  at 
uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
   [apply]  at 
uk.me.parabola.mkgmap.build.LayerFilterChain.startFilter(LayerFilterChain.java:75)
   [apply]  at 
uk.me.parabola.mkgmap.build.MapBuilder.processLines(MapBuilder.java:902)
   [apply]  at 
uk.me.parabola.mkgmap.build.MapBuilder.makeSubdivision(MapBuilder.java:649)
   [apply]  at 
uk.me.parabola.mkgmap.build.MapBuilder.makeMapAreas(MapBuilder.java:584)
   [apply]  at 
uk.me.parabola.mkgmap.build.MapBuilder.makeMap(MapBuilder.java:195)
   [apply]  at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:97)
   [apply]  at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:61)
   [apply]  at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:220)
   [apply]  at uk.me.parabola.mkgmap.main.Main$1.call(Main.java:217)
   [apply]  at 
java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
   [apply]  at java.util.concurrent.FutureTask.run(FutureTask.java:138)
   [apply]  at 
java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:886)
   [apply]  at 
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:908)
   [apply]  at java.lang.Thread.run(Thread.java:662)
   [apply] Exiting - if you want to carry on regardless, use the --keep-going 
option


 If it is a mkgmap bug then we will need more information.  Does it
 happen with unpatched mkgmap? With just the basic options?

What are basic options?

regards

Johannes


___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-17 Thread Marko Mäkelä
On Mon, Jan 17, 2011 at 09:01:38PM +0100, Johannes Formann wrote:
Just downloaded new data from geofabrik
http://download.geofabrik.de/osm/europe/germany.osm.bz2 and run mkgmap 
only with your debug patch, got an exception again.

How exactly did you invoke mkgmap? Did you split the Germany extract 
first? If so, with which exact commands? Which software versions did you use?

 If it is a mkgmap bug then we will need more information.  Does it 
 happen with unpatched mkgmap? With just the basic options?

What are basic options?

You can find a rather basic set of options in my scripts at 
http://www.polkupyoraily.net/osm/. Of those options, I would consider 
generate-sea fancy.

Best regards,

Marko
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-17 Thread Johannes Formann
Marko Mäkelä marko.mak...@iki.fi wrote:
 On Mon, Jan 17, 2011 at 09:01:38PM +0100, Johannes Formann wrote:
 Just downloaded new data from geofabrik
 http://download.geofabrik.de/osm/europe/germany.osm.bz2 and run mkgmap
 only with your debug patch, got an exception again.
 
 How exactly did you invoke mkgmap? 

From an ant-File (http://pastebin.com/mHGKt7fp ).
Used Parameters:
'--max-jobs=1'
'--style-file=radkarte'
'--overview-mapnumber=5942'
'--overview-mapname=5942'
'--series-name=OSM_Radkarte'
'--product-id=1'
'--family-id=5942'
'--family-name=OSM Radkarte 17.01.2011'
'--country-name=Deutschland'
'--country-abbr=DE'
'--latin1'
'--code-page=1252'
'--add-pois-to-areas'
'--adjust-turn-headings'
'--drive-on-right'
'--check-roundabouts'
'--ignore-maxspeeds'
'--ignore-turn-restrictions'
'--location-autofill=1'
'--preserve-element-order'
'--remove-short-arcs=3.3'
'--road-name-pois'
'--show-profiles=1'
'--net'
'--route'
'--gmapsupp'
'--tdbfile'
'--index'
'--nsis'


 Did you split the Germany extract 
 first? If so, with which exact commands? Which software versions did you use?

The spliter in revision 161.
exact command options (for java)
'-Xms256m'
'-Xmx2560m'
'-jar'
'splitter.jar'
'--resolution=14'
'--mapid=59420001'
'--max-nodes=120'
'--max-threads=1'
'--overlap=4000'
'--write-kml=areas.kml'
'--cache=/home/osm/build/cache'
'--geonames-file=/home/osm/radkarte/cities1000.zip'
'/home/osm/build/germany.osm.bz2'
'/home/osm/radkarte/contourdata.osm.gz'

The full output from the whole build process is copied to a logfile:
http://pastebin.com/jUQpzvYz

  If it is a mkgmap bug then we will need more information.  Does it
  happen with unpatched mkgmap? With just the basic options?
 
 What are basic options?
 
 You can find a rather basic set of options in my scripts at 
 http://www.polkupyoraily.net/osm/. Of those options, I would consider
 generate-sea fancy.

Ok, I'll try a run with reduced options tomorrow.

greetings

Johannes 

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-14 Thread Torsten Leistikow
Johannes Formann schrieb am 13.01.2011 22:32:
 The generate_ways_from_relations.patch is used to give cycleroutes good 
 attributes (road_class, speed), so they were preferred over normal roads, 
 independed on which roads they actually run. (But dependent on the network 
 different, rcn other than ncn and so on).

I haven't loked at the patch, but for this task you need not to patch mkgmap,
you can get such a result just by using an appropriate style during the map
creation.

Gruss
Torsten
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-14 Thread WanMil
 WanMilwmgc...@web.de  wrote:

 Hello WanMil,


 what do you mean with branch?

 I mean a branch of the original Radkarte. The original author has more or
 less abandoned to update the map, so I had startet buildig a map every week
 an tweeked a bit the style.

 Which mkgmap release do you use before you apply your patches?

 Always trunk/the latest. A svn checkout/update is included in the
 build process.

 Can you post the patches here?

 At the End of the Message or there:
 http://bazaar.launchpad.net/%7Eluckyguess/radkarte/main/annotate/head%3A/generate_ways_from_relations.patch

 Can you explain why you need the generate_ways_from_relations.patch and
 what that starts_with.patch does?

 The generate_ways_from_relations.patch is used to give cycleroutes good
 attributes (road_class, speed), so they were preferred over normal roads,
 independed on which roads they actually run. (But dependent on the network
 different, rcn other than ncn and so on).

 The starts_with.patch prefixes the POI names, but I could disable it too.
 A new map ist currently generatet only with the 
 generate_ways_from_relations.patch
 an the debug patch from Steve.

 I propose to have a deep look on your patches because we didn't receive
 any similar complaint on this mailing list before.

 I guess the patch must have something to do witch it too, but I don't have
 enough knowledge of the mkgmap-internals to dig it out alone.

 regards

 Johannes



 Index: uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
 ===
 --- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java (revision 
 1580)
 +++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java (working copy)

Johannes,

your patch patches revision 1580. The current revision of mkgmap is 
1773. The patched files contain lots of changes between 1580 and 1773. I 
wonder how it is possible to use your patch with the latest revision 
1773 without manual changes?

I assume either you don't use the latest mkgmap release or you haven't 
posted your latest patch.

WanMil
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-14 Thread Johannes Formann
WanMil wmgc...@web.de wrote:

  Index: uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
  ===
  --- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java  (revision 1580)
  +++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java  (working copy)
 
 Johannes,
 
 your patch patches revision 1580. The current revision of mkgmap is 
 1773. The patched files contain lots of changes between 1580 and 1773. I 
 wonder how it is possible to use your patch with the latest revision 
 1773 without manual changes?
 
 I assume either you don't use the latest mkgmap release or you haven't 
 posted your latest patch.


I'm quite shure, both are the latest, but when I can archive the same
results without the patch (as Thorsten suggested), I'll throw it away.

But if I need to rewrite it, any suggestions where I should start looking, to 
understand how
everything works together?

regards

Johannes

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-14 Thread Johannes Formann
Torsten Leistikow de_m...@gmx.de wrote:
 Johannes Formann schrieb am 13.01.2011 22:32:
  The generate_ways_from_relations.patch is used to give cycleroutes good
  attributes (road_class, speed), so they were preferred over normal roads,
  independed on which roads they actually run. (But dependent on the network
  different, rcn other than ncn and so on).
 
 I haven't loked at the patch, but for this task you need not to patch mkgmap,
 you can get such a result just by using an appropriate style during the map
 creation.

Could the styles avoid also the turn-penalty that should exist in the
garmin routing alorithm?

regards

Johannes

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-14 Thread WanMil
 WanMilwmgc...@web.de  wrote:

 Index: uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
 ===
 --- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java  (revision 1580)
 +++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java  (working copy)

 Johannes,

 your patch patches revision 1580. The current revision of mkgmap is
 1773. The patched files contain lots of changes between 1580 and 1773. I
 wonder how it is possible to use your patch with the latest revision
 1773 without manual changes?

 I assume either you don't use the latest mkgmap release or you haven't
 posted your latest patch.


 I'm quite shure, both are the latest, but when I can archive the same
 results without the patch (as Thorsten suggested), I'll throw it away.

Your patch tells you the revision for which the patch is created:
  --- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java 
(revision 1580)
You can see it's revision 1580 and not 1773.


 But if I need to rewrite it, any suggestions where I should start looking, to 
 understand how
 everything works together?

If you are lucky you don't have to change very much. If you use eclipse 
or a similar development tool you can manually apply the patch to the 
latest release. You will get some conflicts where the patch tool cannot 
automatically patch and you have to resolve these conflicts.

WanMil


 regards

 Johannes


___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-14 Thread Johannes Formann
WanMil wmgc...@web.de wrote:

  I'm quite shure, both are the latest, but when I can archive the same
  results without the patch (as Thorsten suggested), I'll throw it away.
 
 Your patch tells you the revision for which the patch is created:
   --- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java 
 (revision 1580)
 You can see it's revision 1580 and not 1773.

You were right, stupid mistake from me.
The used patch were noch included in the repository. The really used
patch is following.


regards

diff -Nru -U1 --exclude='*.orig' 
mkgmap-r1716-prev/src/uk/me/parabola/mkgmap/main/StyleTester.java 
mkgmap-r1716/src/uk/me/parabola/mkgmap/main/StyleTester.java
--- mkgmap-r1716-prev/src/uk/me/parabola/mkgmap/main/StyleTester.java   
2010-09-24 21:59:49.0 +0200
+++ mkgmap-r1716/src/uk/me/parabola/mkgmap/main/StyleTester.java
2010-10-20 23:13:58.0 +0200
@@ -29,6 +29,7 @@
 import java.util.Formatter;
 import java.util.List;
 import java.util.Locale;
+import java.util.Map;
 import java.util.Properties;
 import java.util.Set;
 import java.util.regex.Pattern;
@@ -275,8 +276,8 @@
converter.convertNode(node);
}
 
-   public void convertRelation(Relation relation) {
-   converter.convertRelation(relation);
+   public void convertRelation(Relation relation, MapLong, Way wayMap) {
+   converter.convertRelation(relation, wayMap);
}
 
public void setBoundingBox(Area bbox) {
diff -Nru -U1 --exclude='*.orig' 
mkgmap-r1716-prev/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java 
mkgmap-r1716/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
--- mkgmap-r1716-prev/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java   
2010-09-26 22:23:54.0 +0200
+++ mkgmap-r1716/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
2010-10-20 23:13:58.0 +0200
@@ -19,8 +19,10 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.IdentityHashMap;
 import java.util.List;
+import java.util.ListIterator;
 import java.util.Map;
 import java.util.Properties;
 import java.util.regex.Pattern;
@@ -50,6 +52,7 @@
 import uk.me.parabola.mkgmap.general.RoadNetwork;
 import uk.me.parabola.mkgmap.reader.osm.CoordPOI;
 import uk.me.parabola.mkgmap.reader.osm.Element;
+import uk.me.parabola.mkgmap.reader.osm.FakeIdGenerator;
 import uk.me.parabola.mkgmap.reader.osm.GType;
 import uk.me.parabola.mkgmap.reader.osm.Node;
 import uk.me.parabola.mkgmap.reader.osm.OsmConverter;
@@ -180,6 +183,14 @@
 
private static final Pattern commaPattern = Pattern.compile(,);
 
+   private String makeKeyFromGType(GType type) {
+   String key = String.valueOf(type.getFeatureKind()) + , + 
String.valueOf(type.getType()) + , + String.valueOf(type.getMinResolution())
+   + , + String.valueOf(type.getMaxResolution());
+   if (type.isRoad())
+   key += , + String.valueOf(type.getRoadClass()) + , 
+ String.valueOf(type.getRoadSpeed());
+   return key;
+   }
+
private GType makeGTypeFromTags(Element element) {
String[] vals = 
commaPattern.split(element.getTag(mkgmap:gtype));
 
@@ -460,10 +471,38 @@
 *
 * @param relation The relation to convert.
 */
-   public void convertRelation(Relation relation) {
-   // Relations never resolve to a GType and so we ignore the 
return
-   // value.
-   relationRules.resolveType(relation, TypeResult.NULL_RESULT);
+   public void convertRelation(Relation relation, final MapLong, Way 
wayMap) {
+   // If the relation resolves to a GType of a way then add that 
way to the map
+   preConvertRules(relation);
+   relationRules.resolveType(relation, new TypeResult() {
+   public void add(Element el, GType type) {
+   Relation relation = (Relation) el;
+   postConvertRules(relation, type);
+
+   // Create a hash set from the relation 
elements. This makes sure that each element
+   // occurs at most once.
+   HashSetElement elements = new 
HashSet(relation.getElements().size());
+   for (Map.EntryString,Element mapEntry : 
relation.getElements()) {
+   elements.add(mapEntry.getValue());
+   }
+
+   // Extract all the ways that belong to the 
relation
+   ListWay ways = new 
ArrayListWay(elements.size());
+   for (Element ele : elements) {
+   if (ele instanceof Way)
+   
addWayToListAndChainIfPossible(ways, (Way) 

[mkgmap-dev] How to solve/debug weird problem

2011-01-13 Thread Johannes Formann
Hello,

I run a branch ( Some information in german
:http://www.formann.de/tag/radkarte/ - Used scripts, style and patches
http://bazaar.launchpad.net/~luckyguess/radkarte/main/files) from the
routable bicycle map Radkarte
(http://wiki.openstreetmap.org/wiki/User:Radfahrer/Radkarte).  

About two weeks ago, some weird error had show up, some streets, paths
other lines and polygons seems to make random jumps.

Examples:
http://radkarte.formann.de/mkgmap_weird1.png
http://radkarte.formann.de/mkgmap_weird2.png

I thought the problem might be in one of the used patches, but after
disabling all except the generate_ways_from_relations.patch (is needed)
and the starts_with.patch (is also needed and has nothing to to with
polygons oder lines) the problem still exists.

Any ideas how to solve/debug that problem?

regards

Johannes

___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-13 Thread Johannes Formann
Johannes Formann johan...@formann.de wrote:

 I thought the problem might be in one of the used patches, but after
 disabling all except the generate_ways_from_relations.patch (is needed)
 and the starts_with.patch (is also needed and has nothing to to with
 polygons oder lines) the problem still exists.


Some more information. mkgmap is called with these options:
'--max-jobs=1'
'--style-file=radkarte'
'--overview-mapnumber=5942'
'--overview-mapname=5942'
'--series-name=OSM_Radkarte'
'--product-id=1'
'--family-id=5942'
'--family-name=OSM Radkarte 13.01.2011'
'--country-name=Deutschland'
'--country-abbr=DE'
'--latin1'
'--code-page=1252'
'--add-pois-to-areas'
'--adjust-turn-headings'
'--drive-on-right'
'--check-roundabouts'
'--ignore-maxspeeds'
'--ignore-turn-restrictions'
'--location-autofill=1'
'--preserve-element-order'
'--remove-short-arcs=3.3'
'--road-name-pois'
'--show-profiles=1'
'--net'
'--route'
'--gmapsupp'
'--tdbfile'
'--index'
'--nsis'
'M0001736.TYP'
'-c'
'/home/osm/build/template.args'

The output has some unusual warnings/errors:

[apply] SEVERE (MapSplitter): /home/osm/build/59420004.osm.gz: Area
too small to split at
http://www.openstreetmap.org/?mlat=50.97661mlon=14.58289zoom=17
(reduce the density of points, length of lines, etc.)
[apply] SEVERE (MapSplitter): /home/osm/build/59420004.osm.gz: Area
too small to split at
http://www.openstreetmap.org/?mlat=51.03692mlon=14.54871zoom=17
(reduce the density of points, length of lines, etc.)
[apply] SEVERE (MapSplitter): /home/osm/build/59420004.osm.gz: Area
too small to split at
http://www.openstreetmap.org/?mlat=51.03692mlon=14.58289zoom=17
(reduce the density of points, length of lines, etc.)
[apply] SEVERE (MapSplitter): /home/osm/build/59420030.osm.gz: Area
too small to split at
http://www.openstreetmap.org/?mlat=48.68774mlon=10.88108zoom=17
(reduce the density of points, length of lines, etc.)
[apply] SEVERE (MapSplitter): /home/osm/build/59420030.osm.gz: Area
too small to split at
http://www.openstreetmap.org/?mlat=48.68774mlon=10.88108zoom=17
(reduce the density of points, length of lines, etc.)
[apply] SEVERE (MapSplitter): /home/osm/build/59420030.osm.gz: Area
too small to split at
http://www.openstreetmap.org/?mlat=48.68774mlon=10.88108zoom=17
(reduce the density of points, length of lines, etc.)
[apply] SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area
too small to split at
http://www.openstreetmap.org/?mlat=54.54720mlon=9.61862zoom=17 (reduce
the density of points, length of lines, etc.)
[apply] SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area
too small to split at
http://www.openstreetmap.org/?mlat=54.63765mlon=9.72279zoom=17 (reduce
the density of points, length of lines, etc.)
[apply] SEVERE (MapSplitter): /home/osm/build/59420066.osm.gz: Area
too small to split at
http://www.openstreetmap.org/?mlat=48.99465mlon=12.29662zoom=17
(reduce the density of points, length of lines, etc.)
[apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz: Problem
writing line (class uk.me.parabola.imgfmt.app.trergn.Polyline) of type
0x10a0c containing 2 points and starting at
http://www.openstreetmap.org/?mlat=49.18023mlon=12.08496zoom=17
[apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:
Subdivision shift is 0 and its centre is at
http://www.openstreetmap.org/?mlat=49.03790mlon=12.78916zoom=17
[apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:
deltaLong = -32818
[apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz: Problem
writing line (class uk.me.parabola.imgfmt.app.trergn.Polyline) of type
0x10a0c containing 2 points and starting at
http://www.openstreetmap.org/?mlat=49.18654mlon=12.08496zoom=17
[apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:
Subdivision shift is 0 and its centre is at
http://www.openstreetmap.org/?mlat=49.03790mlon=12.78916zoom=17
[apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:
deltaLong = -32818
[apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz: Problem
writing line (class uk.me.parabola.imgfmt.app.trergn.Polyline) of type
0x10a0c containing 2 points and starting at
http://www.openstreetmap.org/?mlat=49.18392mlon=12.08496zoom=17
[apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:
Subdivision shift is 0 and its centre is at
http://www.openstreetmap.org/?mlat=49.03790mlon=12.78916zoom=17
[apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:
deltaLong = -32818
[apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz: Problem
writing line (class uk.me.parabola.imgfmt.app.trergn.Polyline) of type
0x20 containing 2 points and starting at
http://www.openstreetmap.org/?mlat=48.88916mlon=13.63431zoom=17
[apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:
Subdivision shift is 0 and its centre is at
http://www.openstreetmap.org/?mlat=49.07661mlon=12.85963zoom=17
[apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:
deltaLong = 36103

Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-13 Thread WanMil
Johannes,

what do you mean with branch?
Which mkgmap release do you use before you apply your patches?
Can you post the patches here?

Can you explain why you need the generate_ways_from_relations.patch and 
what that starts_with.patch does?

I propose to have a deep look on your patches because we didn't receive 
any similar complaint on this mailing list before.

Have fun!
WanMil

 Hello,

 I run a branch ( Some information in german
 :http://www.formann.de/tag/radkarte/ - Used scripts, style and patches
 http://bazaar.launchpad.net/~luckyguess/radkarte/main/files) from the
 routable bicycle map Radkarte
 (http://wiki.openstreetmap.org/wiki/User:Radfahrer/Radkarte).

 About two weeks ago, some weird error had show up, some streets, paths
 other lines and polygons seems to make random jumps.

 Examples:
 http://radkarte.formann.de/mkgmap_weird1.png
 http://radkarte.formann.de/mkgmap_weird2.png

 I thought the problem might be in one of the used patches, but after
 disabling all except the generate_ways_from_relations.patch (is needed)
 and the starts_with.patch (is also needed and has nothing to to with
 polygons oder lines) the problem still exists.

 Any ideas how to solve/debug that problem?

 regards

 Johannes

 ___
 mkgmap-dev mailing list
 mkgmap-dev@lists.mkgmap.org.uk
 http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev


Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-13 Thread Steve Ratcliffe

Hello

I kind of recognise the symptoms, but the cause could be just about 
anything.



 [apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz: Problem
writing line (class uk.me.parabola.imgfmt.app.trergn.Polyline) of type
0x10a0c containing 2 points and starting at
http://www.openstreetmap.org/?mlat=49.18023mlon=12.08496zoom=17



I think this error is appropriate, except that the real error has been 
caught in order to print the error message, so hiding the real error.


If you could apply the attached patch and run the same thing you should
get a better error to send me.

Alternatively it might be obvious by looking at the url printed in the 
messages if the problem is in the data - look for road with very long 
segments or something obviously wrong with them.


..Steve
Index: src/uk/me/parabola/imgfmt/app/trergn/Polyline.java
===
--- src/uk/me/parabola/imgfmt/app/trergn/Polyline.java	(revision 1650)
+++ src/uk/me/parabola/imgfmt/app/trergn/Polyline.java	(revision )
@@ -79,19 +79,8 @@
 		// Prepare for writing by doing all the required calculations.
 
 		LinePreparer w;
-		try {
-			// Prepare the information that we need.
-			w = new LinePreparer(this);
+		// Prepare the information that we need.
+		w = new LinePreparer(this);
-		}
-		catch (AssertionError ae) {
-			log.error(Problem writing line ( + getClass() + ) of type 0x + Integer.toHexString(getType()) +  containing  + points.size() +  points and starting at  + points.get(0).toOSMURL());
-			log.error(  Subdivision shift is  + getSubdiv().getShift() +
-	   and its centre is at  + new Coord(getSubdiv().getLatitude(), getSubdiv().getLongitude()).toOSMURL());
-			log.error(   + ae.getMessage());
-			if(roaddef != null)
-log.error(  Way is  + roaddef);
-			return;
-		}
 
 		int minPointsRequired = (this instanceof Polygon)? 3 : 2;
 		BitWriter bw = w.makeBitStream(minPointsRequired);
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-13 Thread Johannes Formann
WanMil wmgc...@web.de wrote:

Hello WanMil,


 what do you mean with branch?

I mean a branch of the original Radkarte. The original author has more or
less abandoned to update the map, so I had startet buildig a map every week
an tweeked a bit the style.

 Which mkgmap release do you use before you apply your patches?

Always trunk/the latest. A svn checkout/update is included in the
build process.

 Can you post the patches here?

At the End of the Message or there:
http://bazaar.launchpad.net/%7Eluckyguess/radkarte/main/annotate/head%3A/generate_ways_from_relations.patch

 Can you explain why you need the generate_ways_from_relations.patch and 
 what that starts_with.patch does?

The generate_ways_from_relations.patch is used to give cycleroutes good 
attributes (road_class, speed), so they were preferred over normal roads, 
independed on which roads they actually run. (But dependent on the network 
different, rcn other than ncn and so on).

The starts_with.patch prefixes the POI names, but I could disable it too.
A new map ist currently generatet only with the 
generate_ways_from_relations.patch
an the debug patch from Steve.

 I propose to have a deep look on your patches because we didn't receive 
 any similar complaint on this mailing list before.

I guess the patch must have something to do witch it too, but I don't have
enough knowledge of the mkgmap-internals to dig it out alone.

regards

Johannes



Index: uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
===
--- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java (revision 1580)
+++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java (working copy)
@@ -19,8 +19,10 @@
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.HashMap;
+import java.util.HashSet;
 import java.util.IdentityHashMap;
 import java.util.List;
+import java.util.ListIterator;
 import java.util.Map;
 import java.util.Map.Entry;
 import java.util.Properties;
@@ -49,6 +51,7 @@
 import uk.me.parabola.mkgmap.general.RoadNetwork;
 import uk.me.parabola.mkgmap.reader.osm.CoordPOI;
 import uk.me.parabola.mkgmap.reader.osm.Element;
+import uk.me.parabola.mkgmap.reader.osm.FakeIdGenerator;
 import uk.me.parabola.mkgmap.reader.osm.GType;
 import uk.me.parabola.mkgmap.reader.osm.Node;
 import uk.me.parabola.mkgmap.reader.osm.OsmConverter;
@@ -173,6 +176,14 @@
 
private static final Pattern commaPattern = Pattern.compile(,);
 
+   private String makeKeyFromGType(GType type) {
+   String key = String.valueOf(type.getFeatureKind()) + , + 
String.valueOf(type.getType()) + , + String.valueOf(type.getMinResolution())
+   + , + String.valueOf(type.getMaxResolution());
+   if (type.isRoad())
+   key += , + String.valueOf(type.getRoadClass()) + , 
+ String.valueOf(type.getRoadSpeed());
+   return key;
+   }
+
private GType makeGTypeFromTags(Element element) {
String[] vals = 
commaPattern.split(element.getTag(mkgmap:gtype));
 
@@ -442,10 +453,38 @@
 *
 * @param relation The relation to convert.
 */
-   public void convertRelation(Relation relation) {
-   // Relations never resolve to a GType and so we ignore the 
return
-   // value.
-   relationRules.resolveType(relation, TypeResult.NULL_RESULT);
+   public void convertRelation(Relation relation, final MapLong, Way 
wayMap) {
+   // If the relation resolves to a GType of a way then add that 
way to the map
+   preConvertRules(relation);
+   relationRules.resolveType(relation, new TypeResult() {
+   public void add(Element el, GType type) {
+   Relation relation = (Relation) el;
+   postConvertRules(relation, type);
+
+   // Create a hash set from the relation 
elements. This makes sure that each element
+   // occurs at most once.
+   HashSetElement elements = new 
HashSet(relation.getElements().size());
+   for (Map.EntryString,Element mapEntry : 
relation.getElements()) {
+   elements.add(mapEntry.getValue());
+   }
+
+   // Extract all the ways that belong to the 
relation
+   ListWay ways = new 
ArrayListWay(elements.size());
+   for (Element ele : elements) {
+   if (ele instanceof Way)
+   
addWayToListAndChainIfPossible(ways, (Way) ele, type.isRoad()); // care about 
oneways if it is a road
+   }
+
+   for (Way w : ways) {
+

Re: [mkgmap-dev] How to solve/debug weird problem

2011-01-13 Thread Johannes Formann
Hello Steve,

Steve Ratcliffe st...@parabola.me.uk wrote:

 I kind of recognise the symptoms, but the cause could be just about 
 anything.
 
   [apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz: Problem
  writing line (class uk.me.parabola.imgfmt.app.trergn.Polyline) of type
  0x10a0c containing 2 points and starting at
  http://www.openstreetmap.org/?mlat=49.18023mlon=12.08496zoom=17
 
 
 I think this error is appropriate, except that the real error has been 
 caught in order to print the error message, so hiding the real error.
 
 If you could apply the attached patch and run the same thing you should
 get a better error to send me.


Here is the stacktrace:

[echo] Executing mkgmap...
   [apply] SEVERE (MapSplitter): /home/osm/build/59420004.osm.gz: Area too 
small to split at
http://www.openstreetmap.org/?mlat=50.97661mlon=14.58289zoom=17 (reduce the 
density of points, length of lines, etc.)
   [apply] SEVERE (MapSplitter): /home/osm/build/59420004.osm.gz: Area too 
small to split at
http://www.openstreetmap.org/?mlat=51.03692mlon=14.54871zoom=17 (reduce the 
density of points, length of lines, etc.)
   [apply] SEVERE (MapSplitter): /home/osm/build/59420004.osm.gz: Area too 
small to split at
http://www.openstreetmap.org/?mlat=51.03692mlon=14.58289zoom=17 (reduce the 
density of points, length of lines, etc.)
   [apply] SEVERE (MapSplitter): /home/osm/build/59420030.osm.gz: Area too 
small to split at
http://www.openstreetmap.org/?mlat=48.67113mlon=10.70727zoom=17 (reduce the 
density of points, length of lines, etc.)
   [apply] SEVERE (MapSplitter): /home/osm/build/59420030.osm.gz: Area too 
small to split at
http://www.openstreetmap.org/?mlat=48.73409mlon=11.11031zoom=17 (reduce the 
density of points, length of lines, etc.)
   [apply] SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area too 
small to split at
http://www.openstreetmap.org/?mlat=54.54720mlon=9.61862zoom=17 (reduce the 
density of points, length of lines, etc.)
   [apply] SEVERE (MapSplitter): /home/osm/build/59420059.osm.gz: Area too 
small to split at
http://www.openstreetmap.org/?mlat=54.63765mlon=9.72279zoom=17 (reduce the 
density of points, length of lines, etc.)
   [apply] SEVERE (MapSplitter): /home/osm/build/59420066.osm.gz: Area too 
small to split at
http://www.openstreetmap.org/?mlat=48.99465mlon=12.29662zoom=17 (reduce the 
density of points, length of lines, etc.)
   [apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz: Problem writing 
line (class
uk.me.parabola.imgfmt.app.trergn.Polyline) of type 0x10a0c containing 2 points 
and starting at
http://www.openstreetmap.org/?mlat=49.18392mlon=12.08496zoom=17
   [apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:   Subdivision 
shift is 0 and its centre is at
http://www.openstreetmap.org/?mlat=49.03790mlon=12.78916zoom=17
   [apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:   deltaLong = 
-32818
   [apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz: Problem writing 
line (class
uk.me.parabola.imgfmt.app.trergn.Polyline) of type 0x10a0c containing 2 points 
and starting at
http://www.openstreetmap.org/?mlat=49.18654mlon=12.08496zoom=17
   [apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:   Subdivision 
shift is 0 and its centre is at
http://www.openstreetmap.org/?mlat=49.03790mlon=12.78916zoom=17
   [apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:   deltaLong = 
-32818
   [apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz: Problem writing 
line (class
uk.me.parabola.imgfmt.app.trergn.Polyline) of type 0x10a0c containing 2 points 
and starting at
http://www.openstreetmap.org/?mlat=49.18025mlon=12.08496zoom=17
   [apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:   Subdivision 
shift is 0 and its centre is at
http://www.openstreetmap.org/?mlat=49.03790mlon=12.78916zoom=17
   [apply] SEVERE (Polyline): /home/osm/build/59420066.osm.gz:   deltaLong = 
-32818
   [apply] java.lang.AssertionError: deltaLong = 36103
   [apply]  at 
uk.me.parabola.imgfmt.app.trergn.MapObject.setDeltaLong(MapObject.java:139)
   [apply]  at 
uk.me.parabola.imgfmt.app.trergn.MapObject.setLongitude(MapObject.java:128)
   [apply]  at 
uk.me.parabola.imgfmt.app.trergn.LinePreparer.calcLatLong(LinePreparer.java:176)
   [apply]  at 
uk.me.parabola.imgfmt.app.trergn.LinePreparer.init(LinePreparer.java:62)
   [apply]  at 
uk.me.parabola.imgfmt.app.trergn.Polyline.write(Polyline.java:83)
   [apply]  at 
uk.me.parabola.imgfmt.app.trergn.RGNFile.addMapObject(RGNFile.java:140)
   [apply]  at uk.me.parabola.imgfmt.app.map.Map.addMapObject(Map.java:241)
   [apply]  at 
uk.me.parabola.mkgmap.build.MapBuilder$LineAddFilter.doFilter(MapBuilder.java:1044)
   [apply]  at 
uk.me.parabola.mkgmap.build.LayerFilterChain.doFilter(LayerFilterChain.java:57)
   [apply]  at 
uk.me.parabola.mkgmap.filters.RemoveEmpty.doFilter(RemoveEmpty.java:61)
   [apply]  at