mkgmap: String index out of range: 48

Hi, I updated today to mkgmap r2278 and I'm now getting the following error when build gmapsupp.img: mkgmap --style-file=style --family-name=TK-DACH-Basemap --country-name=DACH --country-abbr=DACH --area-name=DACH --latin1 --license-file=TK-DACH-Basemap_license.txt '--copyright-message=OpenStreetMap.org contributors, CC BY-SA. See: http://wiki.openstreetmap.org/index.php/Attribution. TK-DACH-Basemap based on data from 2012-05-23.' --series-name=TK-DACH-Basemap --bounds=bounds --location-autofill=bounds,is_in,nearest --add-pois-to-areas --reduce-point-density-polygon=8 --min-size-polygon=8 --make-opposite-cycleways --remove-short-arcs --adjust-turn-headings --route --net --generate-sea=extend-sea-sectors '--pois-to-areas-placement=entrance=main;entrance=yes;building=entrance;barrier=entrance' --index --name-tag-list=name,place_name -c mkgmap.cfg --gmapsupp -c maps.cfg --description=TK-DACH-Basemap TK_DACH.TYP [...] java.lang.StringIndexOutOfBoundsException: String index out of range: 48 at java.lang.String.substring(Unknown Source) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:123) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) [...] I did already regenerate the bounds files with the new mkgmap version, but this doesn't make any difference. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

Hi Thorsten, r2278 changed only some parts of the generate-sea option. I think the change to r2276 is more suspicious. Which mkgmap release did you use before? Anyhow please try the following simple patch. WanMil Index: src/uk/me/parabola/mkgmap/build/MapSplitter.java =================================================================== --- src/uk/me/parabola/mkgmap/build/MapSplitter.java (revision 2277) +++ src/uk/me/parabola/mkgmap/build/MapSplitter.java (working copy) @@ -119,7 +119,7 @@ Area bounds = area.getBounds(); int[] sizes = area.getEstimatedSizes(); if(log.isInfoEnabled()) { - String padding = depth + " "; + String padding = depth + " "; log.info(padding.substring(0, (depth + 1) * 2) + bounds.getWidth() + "x" + bounds.getHeight() + ", res = " + res +
Hi,
I updated today to mkgmap r2278 and I'm now getting the following error when build gmapsupp.img:
mkgmap --style-file=style --family-name=TK-DACH-Basemap --country-name=DACH --country-abbr=DACH --area-name=DACH --latin1 --license-file=TK-DACH-Basemap_license.txt '--copyright-message=OpenStreetMap.org contributors, CC BY-SA. See: http://wiki.openstreetmap.org/index.php/Attribution. TK-DACH-Basemap based on data from 2012-05-23.' --series-name=TK-DACH-Basemap --bounds=bounds --location-autofill=bounds,is_in,nearest --add-pois-to-areas --reduce-point-density-polygon=8 --min-size-polygon=8 --make-opposite-cycleways --remove-short-arcs --adjust-turn-headings --route --net --generate-sea=extend-sea-sectors '--pois-to-areas-placement=entrance=main;entrance=yes;building=entrance;barrier=entrance' --index --name-tag-list=name,place_name -c mkgmap.cfg --gmapsupp -c maps.cfg --description=TK-DACH-Basemap TK_DACH.TYP [...] java.lang.StringIndexOutOfBoundsException: String index out of range: 48 at java.lang.String.substring(Unknown Source) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:123) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) at uk.me.parabola.mkgmap.build.MapSplitter.addAreasToList(MapSplitter.java:147) [...]
I did already regenerate the bounds files with the new mkgmap version, but this doesn't make any difference.
Thorsten

Hi WanMil, On Wed, May 23, WanMil wrote:
Hi Thorsten,
r2278 changed only some parts of the generate-sea option. I think the change to r2276 is more suspicious. Which mkgmap release did you use before?
r2263
Anyhow please try the following simple patch.
I will try. Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

On Wed, May 23, Thorsten Kukuk wrote:
Hi WanMil,
On Wed, May 23, WanMil wrote:
Hi Thorsten,
r2278 changed only some parts of the generate-sea option. I think the change to r2276 is more suspicious. Which mkgmap release did you use before?
r2263
Anyhow please try the following simple patch.
I will try.
Somehow the patch gots malformed from the mail system. I incresed the number of white spaces and now it works again. Thanks, Thorsten -- Thorsten Kukuk, Project Manager/Release Manager SLES SUSE LINUX Products GmbH, Maxfeldstr. 5, D-90409 Nuernberg GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg)

On Wed, May 23, Thorsten Kukuk wrote:
Hi WanMil,
On Wed, May 23, WanMil wrote:
Hi Thorsten,
r2278 changed only some parts of the generate-sea option. I think the change to r2276 is more suspicious. Which mkgmap release did you use before?
r2263
Anyhow please try the following simple patch.
I will try.
Somehow the patch gots malformed from the mail system. I incresed the number of white spaces and now it works again.
Thanks, Thorsten
Thanks Thorsten, I will commit that to fix that by now. Gerd, can you please check why your patch for r2276 increases the depth of subdivision splits and if that's intended? Can you calculate a maximum depth or a better fix than just adding some whitespaces like I did so that it will work in all cases? Thanks! WanMil

Hi WanMil, I can confirm that the depth can be deeper, it is not wanted but I think it's correct. The patch is ok. In some cases the patched MapSplitter "splits" the data into two areas, one is completely empty and the other contains all the data. The difference to the unpatched version is only in the related bbox. I'll try to detect that situation and avoid to save unwanted sub areas when I have finished the work on tile splitter. Gerd WanMil wrote
On Wed, May 23, Thorsten Kukuk wrote:
Hi WanMil,
On Wed, May 23, WanMil wrote:
Hi Thorsten,
r2278 changed only some parts of the generate-sea option. I think the change to r2276 is more suspicious. Which mkgmap release did you use before?
r2263
Anyhow please try the following simple patch.
I will try.
Somehow the patch gots malformed from the mail system. I incresed the number of white spaces and now it works again.
Thanks, Thorsten
Thanks Thorsten,
I will commit that to fix that by now.
Gerd, can you please check why your patch for r2276 increases the depth of subdivision splits and if that's intended? Can you calculate a maximum depth or a better fix than just adding some whitespaces like I did so that it will work in all cases?
Thanks! WanMil _______________________________________________ mkgmap-dev mailing list mkgmap-dev@.org http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- View this message in context: http://gis.19327.n5.nabble.com/mkgmap-String-index-out-of-range-48-tp5709968... Sent from the Mkgmap Development mailing list archive at Nabble.com.
participants (3)
-
GerdP
-
Thorsten Kukuk
-
WanMil