location-autofill=nearest breaks compiling

Compiling British Isles map with location-autofill=is_in,nearest throws the following error: Exception in thread "main" java.lang.AssertionError: Invalid label offset found 105 at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.fetchLabel(LBLFileReader.java:86) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:351) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.<init>(LBLFileReader.java:74) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:545) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.main(Main.java:119) Removing the "nearest" part of location-autofill it works fine. All other maps I compile with location-autofill=is_in,nearest also compile without problems. Any idea why this particular map may be going wrong?

Hi Carlos, looks like a special case. Please post a link to the input file and all info that is needed to reproduce the problem. Gerd Carlos Dávila-2 wrote
Compiling British Isles map with location-autofill=is_in,nearest throws the following error: Exception in thread "main" java.lang.AssertionError: Invalid label offset found 105 at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.fetchLabel(LBLFileReader.java:86) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:351) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader. <init> (LBLFileReader.java:74) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:545) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.main(Main.java:119) Removing the "nearest" part of location-autofill it works fine. All other maps I compile with location-autofill=is_in,nearest also compile without problems. Any idea why this particular map may be going wrong? _______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/location-autofill-nearest-breaks-compiling-tp... Sent from the Mkgmap Development mailing list archive at Nabble.com.

You can get the input file at http://mapas.alternativaslibres.es/british-isles.o5m I've been updating it for several days and always got the same error. Used variables: export MAPA=British-Isles pais=british-isles FID=52 ABR=BRI MAXNODES=1800000 NAMETAG=name DRIVEON=left splitter: java -Xmx1500M -jar splitter.jar --max-nodes=$MAXNODES --geonames-file=geonames/cities15000_$ABR.zip --mapid=551${FID}001 $pais.o5m mkgmap: java -Xmx2000m -ea -Dlog.config=logging.properties -jar mkgmap.jar --output-dir=./tmp --bounds=bounds.zip --precomp-sea=sea --max-jobs --route --latin1 --code-page=1252 --area-name=$MAPA --family-name="OpenStreetMap $MAPA" --family-id=1$FID --product-id=1 --series-name="OSM-$MAPA" --overview-mapname=$ABR-1${FID} --overview-mapnumber=551${FID}000 --name-tag-list=$NAMETAG --index --road-name-pois=0x640a --process-destination --process-exits --x-housenumbers --ignore-maxspeeds --reduce-point-density=4 --reduce-point-density-polygon=8 --polygon-size-limits="24:12, 18:10, 16:0" --add-pois-to-areas --adjust-turn-headings --report-similar-arcs --link-pois-to-ways --location-autofill=is_in,nearest --drive-on-$DRIVEON --check-roundabouts --check-roundabout-flares --license-file=license_ODbL.txt --copyright-message="OpenStreetMap contributors, ODbL. See: http://www.openstreetmap.org/copyright" --style=mio --check-styles -c $pais.args args file is splitter generated template.args + typ file added at the end. I tried with default style with the same result. El 15/08/13 22:29, GerdP escribió:
Hi Carlos,
looks like a special case. Please post a link to the input file and all info that is needed to reproduce the problem.
Gerd
Carlos Dávila-2 wrote
Compiling British Isles map with location-autofill=is_in,nearest throws the following error: Exception in thread "main" java.lang.AssertionError: Invalid label offset found 105 at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.fetchLabel(LBLFileReader.java:86) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:351) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader. <init> (LBLFileReader.java:74) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:545) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.main(Main.java:119) Removing the "nearest" part of location-autofill it works fine. All other maps I compile with location-autofill=is_in,nearest also compile without problems. Any idea why this particular map may be going wrong?

Hi Carlos, just to let you know: I am able to reproduce the problem with tile 55152011. I did not yet find the cause. Gerd
Date: Thu, 15 Aug 2013 22:51:11 +0200 From: cdavilam@orangecorreo.es To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] location-autofill=nearest breaks compiling
You can get the input file at http://mapas.alternativaslibres.es/british-isles.o5m I've been updating it for several days and always got the same error. Used variables: export MAPA=British-Isles pais=british-isles FID=52 ABR=BRI MAXNODES=1800000 NAMETAG=name DRIVEON=left splitter: java -Xmx1500M -jar splitter.jar --max-nodes=$MAXNODES --geonames-file=geonames/cities15000_$ABR.zip --mapid=551${FID}001 $pais.o5m mkgmap: java -Xmx2000m -ea -Dlog.config=logging.properties -jar mkgmap.jar --output-dir=./tmp --bounds=bounds.zip --precomp-sea=sea --max-jobs --route --latin1 --code-page=1252 --area-name=$MAPA --family-name="OpenStreetMap $MAPA" --family-id=1$FID --product-id=1 --series-name="OSM-$MAPA" --overview-mapname=$ABR-1${FID} --overview-mapnumber=551${FID}000 --name-tag-list=$NAMETAG --index --road-name-pois=0x640a --process-destination --process-exits --x-housenumbers --ignore-maxspeeds --reduce-point-density=4 --reduce-point-density-polygon=8 --polygon-size-limits="24:12, 18:10, 16:0" --add-pois-to-areas --adjust-turn-headings --report-similar-arcs --link-pois-to-ways --location-autofill=is_in,nearest --drive-on-$DRIVEON --check-roundabouts --check-roundabout-flares --license-file=license_ODbL.txt --copyright-message="OpenStreetMap contributors, ODbL. See: http://www.openstreetmap.org/copyright" --style=mio --check-styles -c $pais.args args file is splitter generated template.args + typ file added at the end. I tried with default style with the same result.
El 15/08/13 22:29, GerdP escribió:
Hi Carlos,
looks like a special case. Please post a link to the input file and all info that is needed to reproduce the problem.
Gerd
Carlos Dávila-2 wrote
Compiling British Isles map with location-autofill=is_in,nearest throws the following error: Exception in thread "main" java.lang.AssertionError: Invalid label offset found 105 at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.fetchLabel(LBLFileReader.java:86) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:351) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader. <init> (LBLFileReader.java:74) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:545) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.main(Main.java:119) Removing the "nearest" part of location-autofill it works fine. All other maps I compile with location-autofill=is_in,nearest also compile without problems. Any idea why this particular map may be going wrong?
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi, the problem is caused by a limit in the Garmin img format. The tile 55152011.osm.pbf contains many pois. It requires more than 0x3fffff bytes to store all the data, but the format doesn't allow that. So, a quick solution for you should be to use a smaller max-nodes value for splitter. @Steve: I am not sure where a check is missing. It could be added to the Label.setOffset() method or to the POIRecord.write() method. Please can you habe a look at it? Gerd
Date: Thu, 15 Aug 2013 22:51:11 +0200 From: cdavilam@orangecorreo.es To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] location-autofill=nearest breaks compiling
You can get the input file at http://mapas.alternativaslibres.es/british-isles.o5m I've been updating it for several days and always got the same error. Used variables: export MAPA=British-Isles pais=british-isles FID=52 ABR=BRI MAXNODES=1800000 NAMETAG=name DRIVEON=left splitter: java -Xmx1500M -jar splitter.jar --max-nodes=$MAXNODES --geonames-file=geonames/cities15000_$ABR.zip --mapid=551${FID}001 $pais.o5m mkgmap: java -Xmx2000m -ea -Dlog.config=logging.properties -jar mkgmap.jar --output-dir=./tmp --bounds=bounds.zip --precomp-sea=sea --max-jobs --route --latin1 --code-page=1252 --area-name=$MAPA --family-name="OpenStreetMap $MAPA" --family-id=1$FID --product-id=1 --series-name="OSM-$MAPA" --overview-mapname=$ABR-1${FID} --overview-mapnumber=551${FID}000 --name-tag-list=$NAMETAG --index --road-name-pois=0x640a --process-destination --process-exits --x-housenumbers --ignore-maxspeeds --reduce-point-density=4 --reduce-point-density-polygon=8 --polygon-size-limits="24:12, 18:10, 16:0" --add-pois-to-areas --adjust-turn-headings --report-similar-arcs --link-pois-to-ways --location-autofill=is_in,nearest --drive-on-$DRIVEON --check-roundabouts --check-roundabout-flares --license-file=license_ODbL.txt --copyright-message="OpenStreetMap contributors, ODbL. See: http://www.openstreetmap.org/copyright" --style=mio --check-styles -c $pais.args args file is splitter generated template.args + typ file added at the end. I tried with default style with the same result.
El 15/08/13 22:29, GerdP escribió:
Hi Carlos,
looks like a special case. Please post a link to the input file and all info that is needed to reproduce the problem.
Gerd
Carlos Dávila-2 wrote
Compiling British Isles map with location-autofill=is_in,nearest throws the following error: Exception in thread "main" java.lang.AssertionError: Invalid label offset found 105 at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.fetchLabel(LBLFileReader.java:86) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader.readPoiInfo(LBLFileReader.java:351) at uk.me.parabola.imgfmt.app.lbl.LBLFileReader. <init> (LBLFileReader.java:74) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:326) at uk.me.parabola.mkgmap.combiners.FileInfo.lblInfo(FileInfo.java:313) at uk.me.parabola.mkgmap.combiners.FileInfo.imgInfo(FileInfo.java:259) at uk.me.parabola.mkgmap.combiners.FileInfo.getFileInfo(FileInfo.java:152) at uk.me.parabola.mkgmap.main.Main.endOptions(Main.java:545) at uk.me.parabola.mkgmap.CommandArgsReader.readArgs(CommandArgsReader.java:128) at uk.me.parabola.mkgmap.main.Main.main(Main.java:119) Removing the "nearest" part of location-autofill it works fine. All other maps I compile with location-autofill=is_in,nearest also compile without problems. Any idea why this particular map may be going wrong?
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

El 18/08/13 09:30, Gerd Petermann escribió:
Hi,
the problem is caused by a limit in the Garmin img format. The tile 55152011.osm.pbf contains many pois. It requires more than 0x3fffff bytes to store all the data, but the format doesn't allow that. So, a quick solution for you should be to use a smaller max-nodes value for splitter.
Thank you very much for working on it Gerd. I'll follow your suggestion.

Hi
@Steve: I am not sure where a check is missing. It could be added to the Label.setOffset() method or to the POIRecord.write() method. Please can you habe a look at it?
Thanks for finding that. I will take a look at it. The format does allow for larger offsets as you can set a bit that causes all LBL offsets to be stored divided by 2. You then have to 2 byte align everything in LBL so you can't easily switch once you realise that there is not enough room. Its interesting that this is the first time the problem has been seen! ..Steve

Steve Ratcliffe wrote
Its interesting that this is the first time the problem has been seen!
I guess it's because one of my changes makes it less likely that the warning regarding the "There is not enough room in a single garmin map ..." occurs without good reason, so now we hit real limits. Gerd -- View this message in context: http://gis.19327.n5.nabble.com/location-autofill-nearest-breaks-compiling-tp... Sent from the Mkgmap Development mailing list archive at Nabble.com.

Hi
I am not sure where a check is missing. It could be added to the Label.setOffset() method or to the POIRecord.write() method. Please can you habe a look at it?
I've written a patch (attached) which implements writing out the labels with offsets divided by 2. Will therefore allow twice as much label space. There is also a check for overflow in the patch. The required code to read labels with this flag set was already implemented, so the patch is quite small. I think it is probably best to not attempt to work out if the multiplier is required or not and just always use it. ..Steve

Hi Steve, thanks for the patch, works fine for me. The img file size is only incremented by a few kb, so I agree that the multiplier should always be used. Gerd Date: Mon, 2 Sep 2013 22:16:37 +0100 From: steve@parabola.me.uk To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] location-autofill=nearest breaks compiling Hi
I am not sure where a check is missing. It could be added to the Label.setOffset() method or to the POIRecord.write() method. Please can you habe a look at it?
I've written a patch (attached) which implements writing out the labels with offsets divided by 2. Will therefore allow twice as much label space. There is also a check for overflow in the patch. The required code to read labels with this flag set was already implemented, so the patch is quite small. I think it is probably best to not attempt to work out if the multiplier is required or not and just always use it. ..Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Steve, you did not commit this patch. Is that intended? Since it seems to allow larger tiles, I think it is a good idea to have it? Gerd From: gpetermann_muenchen@hotmail.com To: mkgmap-dev@lists.mkgmap.org.uk Date: Thu, 19 Sep 2013 10:08:00 +0200 Subject: Re: [mkgmap-dev] location-autofill=nearest breaks compiling Hi Steve, thanks for the patch, works fine for me. The img file size is only incremented by a few kb, so I agree that the multiplier should always be used. Gerd Date: Mon, 2 Sep 2013 22:16:37 +0100 From: steve@parabola.me.uk To: mkgmap-dev@lists.mkgmap.org.uk Subject: Re: [mkgmap-dev] location-autofill=nearest breaks compiling Hi
I am not sure where a check is missing. It could be added to the Label.setOffset() method or to the POIRecord.write() method. Please can you habe a look at it?
I've written a patch (attached) which implements writing out the labels with offsets divided by 2. Will therefore allow twice as much label space. There is also a check for overflow in the patch. The required code to read labels with this flag set was already implemented, so the patch is quite small. I think it is probably best to not attempt to work out if the multiplier is required or not and just always use it. ..Steve _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
participants (4)
-
Carlos Dávila
-
Gerd Petermann
-
GerdP
-
Steve Ratcliffe