Re: [mkgmap-dev] Error while generating the index

2011-09-20 Thread Steve Ratcliffe

Hi


I don't know why but I tried it again with 2028 an new data and there
isn't any error any more. I tried it with default-style and my own
style. Both where fine.


OK, so I can't go any further with the original problem unless it 
happens again in a more repeatable way.


I do have a patch (attached) for the bug that I found with the file that 
you uploaded, which I will commit.


..Steve
Index: src/uk/me/parabola/imgfmt/app/net/NETFileReader.java
===
--- src/uk/me/parabola/imgfmt/app/net/NETFileReader.java	(revision 2028)
+++ src/uk/me/parabola/imgfmt/app/net/NETFileReader.java	(revision )
@@ -222,8 +222,14 @@
 
 		ListInteger offsets = new ArrayListInteger();
 		while (reader.position()  end) {
-			int off = reader.getu3();
-			offsets.add(off);
+			int net1 = reader.getu3();
+
+			// The offset is stored in the bottom 22 bits. The top 2 bits are an index into the list
+			// of lbl pointers in the net1 entry. Since we pick up all the labels at a particular net1
+			// entry we only need one of the offsets so pick the first one.
+			int idx = (net1  22)  0x3;
+			if (idx == 0)
+offsets.add(net1  0x3f);
 		}
 
 		// Sort in address order in the hope of speeding up reading.
___
mkgmap-dev mailing list
mkgmap-dev@lists.mkgmap.org.uk
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Re: [mkgmap-dev] Error while generating the index

2011-09-16 Thread Henning Scholland

Hi,
I don't know why but I tried it again with 2028 an new data and there 
isn't any error any more. I tried it with default-style and my own 
style. Both where fine.


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

Re: [mkgmap-dev] Error while generating the index

2011-09-14 Thread Steve Ratcliffe

Hi

 look in the data you can find the splitted pbf and the resulting img
 here: http://www.aighes.de/data/tile_with_problem.7z

Thanks. However I get a different error:

Exception in thread main java.lang.AssertionError: Invalid label 
offset found 4611728
at 
uk.me.parabola.imgfmt.app.lbl.LBLFileReader.fetchLabel(LBLFileReader.java:86)
at 
uk.me.parabola.imgfmt.app.net.NETFileReader.readLabels(NETFileReader.java:187)
at 
uk.me.parabola.imgfmt.app.net.NETFileReader.getRoads(NETFileReader.java:87)

Also if I compile the pbf with the current version of mkgmap with
minimal options, I don't get the error. Anyway I shall look into the
error that I do see.

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


Re: [mkgmap-dev] Error while generating the index

2011-09-13 Thread Henning Scholland
Am 12.09.2011 23:31, schrieb Steve Ratcliffe:
 On 12/09/11 13:01, Henning Scholland wrote:
 No guesses what could cause the following error? Would it help to upload
 the img-files?

 Am 08.09.2011 10:14, schrieb Henning Scholland:
 Exception in thread main java.lang.IndexOutOfBoundsException: Index:
 44120, Size: 361
 at java.util.ArrayList.rangeCheck(Unknown Source)
 at java.util.ArrayList.get(Unknown Source)
 at
 uk.me.parabola.imgfmt.app.net.NETFileReader.fetchZipCity(NETFileReader.java:145)
 That error means that mkgmap cannot understand the format of the input
 .img file. So probably it was written incorrectly, assuming it was
 created by mkgmap itself.

 So it would probably help to identify the particular file that causes
 the error and upload it and if possible, the .osm file it was created
 from.

 ..Steve
Hi Steve,
Thanks for your hint. I figured out that tile number 26 causes the error 
(from Lübeck to north end of Sylt). If you would like to take a deeper 
look in the data you can find the splitted pbf and the resulting img 
here: http://www.aighes.de/data/tile_with_problem.7z

If I generate the index without tile 26 everything is as fine as normal.

Source of the data is a planet-file updated 2011-09-12T20\:00\:00Z.

If you need further information let me know.

Henning

Henning

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


Re: [mkgmap-dev] Error while generating the index

2011-09-12 Thread Henning Scholland
No guesses what could cause the following error? Would it help to upload 
the img-files?


Am 08.09.2011 10:14, schrieb Henning Scholland:
 Exception in thread main java.lang.IndexOutOfBoundsException: Index:
 44120, Size: 361
   at java.util.ArrayList.rangeCheck(Unknown Source)
   at java.util.ArrayList.get(Unknown Source)
   at
 uk.me.parabola.imgfmt.app.net.NETFileReader.fetchZipCity(NETFileReader.java:145)
   at
 uk.me.parabola.imgfmt.app.net.NETFileReader.getRoads(NETFileReader.java:115)
   at
 uk.me.parabola.imgfmt.app.map.MapReader.getRoads(MapReader.java:180)
   at
 uk.me.parabola.mkgmap.combiners.MdrBuilder.addStreets(MdrBuilder.java:300)
   at
 uk.me.parabola.mkgmap.combiners.MdrBuilder.onMapEnd(MdrBuilder.java:171)
   at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:431)
   at
 uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126)
   at uk.me.parabola.mkgmap.main.Main.main(Main.java:132)


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


Re: [mkgmap-dev] Error while generating the index

2011-09-12 Thread Steve Ratcliffe
On 12/09/11 13:01, Henning Scholland wrote:
 No guesses what could cause the following error? Would it help to upload
 the img-files?

 Am 08.09.2011 10:14, schrieb Henning Scholland:
 Exception in thread main java.lang.IndexOutOfBoundsException: Index:
 44120, Size: 361
at java.util.ArrayList.rangeCheck(Unknown Source)
at java.util.ArrayList.get(Unknown Source)
at
 uk.me.parabola.imgfmt.app.net.NETFileReader.fetchZipCity(NETFileReader.java:145)

That error means that mkgmap cannot understand the format of the input
.img file. So probably it was written incorrectly, assuming it was
created by mkgmap itself.

So it would probably help to identify the particular file that causes
the error and upload it and if possible, the .osm file it was created
from.

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


Re: [mkgmap-dev] Error while generating the index

2011-09-08 Thread Henning Scholland

Nobody any guesses or hints?

My mkgmaps-call:

mkgmap.jar --max-jobs=1 --style-file=data\style --draw-priority=24 
--tdbfile --code-page=%codepage% --route --remove-short-arcs 
--location-autofill=bounds,is_in,nearest --index --bounds=data\bounds 
--ignore-maxspeeds --add-pois-to-areas --mapname=%id%00 
--overview-mapname=%id%00 --family-name=RRK %name% 
--series-name=RRK %name% %heute% --description=RadReiseKarte 
--family-id=%id%00 --product-id=1 
--levels=0:24,1:22,2:21,3:20,4:19,5:18,6:16 --reduce-point-density=2.6 
--reduce-point-density-polygon=8 --merge-lines 
--generate-sea=extend-sea-sectors,close-gaps=6000 
--output-dir=maps\%name% --gmapsupp TYP\%id%00.typ %id%*.pbf


In all style-files I put the mkgmap:...-rules WanMil told with r2020. It 
works fine now for all maps beside Germany. If I remove 
--location-autofil nothing changes. If I remove --index, there is no 
error anymore but also no index ;-) .



Am 07.09.2011 09:36, schrieb Henning Scholland:

Hi,
while generating index with 2023 I got with some maps this error. Has 
someone an idea what went wrong? It happens with my map of Germany and 
Denmark, all other maps were ok. Processing of the tiles was fine for 
all maps.


Henning


Exception in thread main java.lang.NegativeArraySizeException at 
uk.me.parabola.imgfmt.app.BufferedImgFileReader.get(BufferedImgFileReader.java:165)
at 
uk.me.parabola.imgfmt.app.net.NETFileReader.fetchZipCity(NETFileReader.java:151)
at 
uk.me.parabola.imgfmt.app.net.NETFileReader.getRoads(NETFileReader.java:115)
at 
uk.me.parabola.imgfmt.app.map.MapReader.getRoads(MapReader.java:180)
at 
uk.me.parabola.mkgmap.combiners.MdrBuilder.addStreets(MdrBuilder.java:300)
at 
uk.me.parabola.mkgmap.combiners.MdrBuilder.onMapEnd(MdrBuilder.java:171)

at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:431)
at 
uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126)

at uk.me.parabola.mkgmap.main.Main.main(Main.java:132)
___
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] Error while generating the index

2011-09-08 Thread Henning Scholland
Hi again

If I let mkgmap only create index, I got the following exception:

Exception in thread main java.lang.IndexOutOfBoundsException: Index: 
44120, Size: 361
 at java.util.ArrayList.rangeCheck(Unknown Source)
 at java.util.ArrayList.get(Unknown Source)
 at 
uk.me.parabola.imgfmt.app.net.NETFileReader.fetchZipCity(NETFileReader.java:145)
 at 
uk.me.parabola.imgfmt.app.net.NETFileReader.getRoads(NETFileReader.java:115)
 at 
uk.me.parabola.imgfmt.app.map.MapReader.getRoads(MapReader.java:180)
 at 
uk.me.parabola.mkgmap.combiners.MdrBuilder.addStreets(MdrBuilder.java:300)
 at 
uk.me.parabola.mkgmap.combiners.MdrBuilder.onMapEnd(MdrBuilder.java:171)
 at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:431)
 at 
uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:126)
 at uk.me.parabola.mkgmap.main.Main.main(Main.java:132)

parameters:
mkgmap.jar --max-jobs=1 --tdbfile --code-page=%codepage% --index 
--mapname=%id%00 --overview-mapname=%id%00 --family-name=RRK 
%name% --series-name=RRK %name% %heute% --description=RadReiseKarte 
--family-id=%id%00 --product-id=1 --output-dir=maps\%name% --gmapsupp 
TYP\%id%00.typ maps\Germany\%id%*.img

Henning


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


Re: [mkgmap-dev] Error while generating the index

2011-09-08 Thread Henning Scholland

Am 08.09.2011 10:18, schrieb Carsten Schwede:

Hi Henning,

do you have got a completely fresh version of mkgmap? Once I had also
similiar errors, they were gone with a really fresh version of the
sources. I had removed my local sources completely and had downloaded
the mkgmap sources again.

I use always the compiled version from mkgmap-download-page. Also other 
maps were fine. The Map of Germany is the biggest one with 106 tiles and 
about 1.37gb. Last week with 2018 (I think)  everything was ok.


Has someone an older versions of mkgmap before addr-Tags integration was 
added and could e-mail it to me? Then I could find the last working version.


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