lang problem building maps

I'm getting the error below building maps with r1020. I suppose it's related with recent changes for codepage, but I don't know how to fix it. I'm using --latin1 --code-page=1252 options. Any hint? /Exception in thread "main" java.lang.AssertionError at uk.me.parabola.mkgmap.osmstyle.eval.ExpressionReader.readConditions(ExpressionReader.java:49) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.load(RuleFileReader.java:86) at uk.me.parabola.mkgmap.osmstyle.RuleFileReader.load(RuleFileReader.java:73) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.readRules(StyleImpl.java:224) at uk.me.parabola.mkgmap.osmstyle.StyleImpl.<init>(StyleImpl.java:128) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.createStyler(Osm5MapDataSource.java:119) at uk.me.parabola.mkgmap.reader.osm.xml.Osm5MapDataSource.load(Osm5MapDataSource.java:79) at uk.me.parabola.mkgmap.main.MapMaker.loadFromFile(MapMaker.java:137) at uk.me.parabola.mkgmap.main.MapMaker.makeMap(MapMaker.java:53) at uk.me.parabola.mkgmap.main.Main.processFilename(Main.java:150) at uk.me.parabola.mkgmap.CommandArgs$Filename.processArg(CommandArgs.java:340) at uk.me.parabola.mkgmap.CommandArgs.readArgs(CommandArgs.java:119) at uk.me.parabola.mkgmap.main.Main.main(Main.java:91) /Regards Carlos/ /

Hi Carlos,
I'm getting the error below building maps with r1020. I suppose it's related with recent changes for codepage, but I don't know how to fix it. I'm using --latin1 --code-page=1252 options. Any hint?
I'm not familiar with any of that code but the assertion is related to processing of a style file. Have you changed anything in the style files that could cause an upset? Cheers, Mark

Mark Burton escribió:
Hi Carlos,
I'm getting the error below building maps with r1020. I suppose it's related with recent changes for codepage, but I don't know how to fix it. I'm using --latin1 --code-page=1252 options. Any hint?
I'm not familiar with any of that code but the assertion is related to processing of a style file. Have you changed anything in the style files that could cause an upset? I don't find anything suspicious in my files (no recent changes), but I attach my differences with current code so others with more knowledge can check. Regards Carlos
Index: src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java =================================================================== --- src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java (revisión: 1020) +++ src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java (copia de trabajo) @@ -367,7 +367,7 @@ String phone = element.getTag("phone"); String isIn = element.getTag("is_in"); String country = element.getTag("is_in:country"); - String region = element.getTag("is_in:county"); + String region = element.getTag("is_in:region"); if(country != null) country = element.getTag("addr:country"); Index: src/uk/me/parabola/mkgmap/build/MapBuilder.java =================================================================== --- src/uk/me/parabola/mkgmap/build/MapBuilder.java (revisión: 1020) +++ src/uk/me/parabola/mkgmap/build/MapBuilder.java (copia de trabajo) @@ -417,7 +417,7 @@ } else if (guessed && locationAutofillLevel > 0) { - Label streetName = lbl.newLabel("FIX MY ADDRESS"); + Label streetName = lbl.newLabel("Completar dirección"); r.setStreetName(streetName); } Index: resources/styles/default/points =================================================================== --- resources/styles/default/points (revisión: 1020) +++ resources/styles/default/points (copia de trabajo) @@ -75,10 +75,10 @@ highway=bus_stop [0x2f08 resolution 21] -highway=motorway_junction { name '${ref} ${name}' | '${ref}' | '${name}' } +highway=motorway_junction { name '${ref}: ${name}' | '${ref}' | '${name}' } highway=motorway_junction [0x2000 resolution 16] -highway=services { name '${ref} ${name}' | '${ref}' | '${name}' } +highway=services { name '${ref}: ${name}' | '${ref}' | '${name}' } highway=services [0x210f resolution 16] historic=museum [0x2c02 resolution 20] Index: resources/LocatorConfig.xml =================================================================== --- resources/LocatorConfig.xml (revisión: 1020) +++ resources/LocatorConfig.xml (copia de trabajo) @@ -27,7 +27,14 @@ <variant>IT</variant> </country> <country name="France" abr="FRA"> - </country> + </country> + <country name="España" abr="ESP" poiDispFlag="0xc"> + <variant>Spain</variant> + <variant>ES</variant> + </country> + <country name="Portugal" abr="POR" poiDispFlag="0xc"> + <variant>PT</variant> + </country> <country name="United States" abr="USA"> <variant>USA</variant> </country>

Are you using the default style? I had the same exception, and had to comment out these two lines in my points file: #amenity=restaurant & cuisine=pizza;kebab [0x2a0a resolution 20] #amenity=restaurant & cuisine=pizza;kebab [0x2a0a resolution 20] I guess the parser doesn't treat the ';' as a value character. I think that our handling of multiple values leaves much to be desired, but it's still quite low in my priorities.

Toby Speight escribió:
Are you using the default style? I had the same exception, and had to comment out these two lines in my points file:
#amenity=restaurant & cuisine=pizza;kebab [0x2a0a resolution 20] #amenity=restaurant & cuisine=pizza;kebab [0x2a0a resolution 20]
I guess the parser doesn't treat the ';' as a value character.
I think that our handling of multiple values leaves much to be desired, but it's still quite low in my priorities. Thanks Toby, commenting these two lines fixed the problem. Cheers Carlos

On Sun, Apr 26, 2009 at 08:46:38PM +0100, Toby Speight wrote:
Are you using the default style? I had the same exception, and had to comment out these two lines in my points file:
#amenity=restaurant & cuisine=pizza;kebab [0x2a0a resolution 20] #amenity=restaurant & cuisine=pizza;kebab [0x2a0a resolution 20]
I guess the parser doesn't treat the ';' as a value character.
Thats right, but you can quote the value and then it can contain any character. cuisine='pizza;kebab' ..Steve

On Sun, Apr 26, 2009 at 08:46:38PM +0100, Toby Speight wrote:
Are you using the default style? I had the same exception, and had to comment out these two lines in my points file:
#amenity=restaurant & cuisine=pizza;kebab [0x2a0a resolution 20] #amenity=restaurant & cuisine=pizza;kebab [0x2a0a resolution 20]
I guess the parser doesn't treat the ';' as a value character.
I'm sorry, but it worked for me. I'll try to remember to add quotes around labels containing 'funny' characters from now on.
I think that our handling of multiple values leaves much to be desired, but it's still quite low in my priorities.
0x2a0a is restaurant/pizza. There is no Garmin code for cuisine=kebab, as far as I know. A few restaurants were labelled pizza;kebab around here. That is why I added this label. What did you think about my idea of introducing a partial * match and a "split" operator? In this case, it would allow us to write amenity=restaurant & cuisine=pizza;* [0x2a0a resolution 20] so that cuisine=pizza;fish&chips would be mapped to 0x2a0a as well. The "split" operator would be needed in other cases, such as amenity=fuel;post_office, like this: amenity=*;post_office { split amenity=*, amenity=post_office } I can try to produce a patch for this, if there is interest. Marko

0> In article <20090427055113.GA14867@x60s>, 0> Marko Mäkelä <URL:mailto:marko.makela@iki.fi> ("Marko") wrote: Marko> 0x2a0a is restaurant/pizza. There is no Garmin code for Marko> cuisine=kebab, as far as I know. A few restaurants were Marko> labelled pizza;kebab around here. That is why I added this Marko> label. Yes, that makes sense (at least for the short term). Marko> What did you think about my idea of introducing a partial * match Marko> and a "split" operator? In this case, it would allow us to write Marko> Marko> amenity=restaurant & cuisine=pizza;* [0x2a0a resolution 20] Marko> Marko> so that cuisine=pizza;fish&chips would be mapped to 0x2a0a as Marko> well. Marko> Marko> The "split" operator would be needed in other cases, such as Marko> amenity=fuel;post_office, like this: Marko> Marko> amenity=*;post_office { split amenity=*, amenity=post_office } Marko> Marko> I can try to produce a patch for this, if there is interest. I think that the long-term solution perhaps requires more than that (and perhaps the Wiki is the right place to record some ideas). There are two cases that seem important to me, both demonstrated in this example: /-------- | shop=supermarket, amenity=atm;toilet \-------- In this case, we really ought to split the amenity value so that (logically) it's /-------- | shop=supermarket, amenity=atm, amenity=toilet \-------- and then produce POIs for all three matches. Perhaps we need some way to flag a rule as non-final - or look at the rule grammar and perhaps consider a nested list structure. This latter may appeal less to those without a Lisp background... Another example I often see - quite often a river is also an administrative boundary. Only one match is rendered to the map (just now I forget which one).
participants (5)
-
Carlos Dávila
-
Mark Burton
-
Marko Mäkelä
-
Steve Ratcliffe
-
Toby Speight