Parsing of ":" and "."

Hallo, Sorry Mark for probably bugging you again.... First the probably easier question, why is it not possible to use a line like 1. highway=* & source=plan.at [0x07 resolution 24] in my style file? The point in plan.at throws an exception. 2. highway:plan.at=* &..... Same problem. In Austria due to the import many ways can be identified like this, and one could decrease the road_class and/or road_speed because the quality of the data is very bad. Now the harder part, would it be possible to enable in the osm5xmlhandler.java the parsing of ":" ? String mtb:scaleTag = currentWay.getTag("mtb:scale"); if ( ("0".equals(mtb:scaleTag)) || ("1".equals(mtb:scaleTag) ) || ("true".equals(mtb:scaleTag) )) { // Add additional mtb:scale over old highway long mtb:scaleId = currentWay.getId() + MTB_ID_OFFSET; Way mtb:scaleWay = new Way(mtb:scaleId); wayMap.put(mtb:scaleId, mtb:scaleWay); List<Coord> points = currentWay.getPoints(); for(int i = 0; i < points.size(); ++i) mtb:scaleWay.addPoint(points.get(i)); mtb:scaleWay.addTag("mtb:scale", "11"); log.info("Making additional mtb:scale '" + mtb:scaleWay.getTag("name") + "'"); } If I have these lines added, mkgmap.jar does not compile. Felix

Hi Felix,
Sorry Mark for probably bugging you again....
First the probably easier question, why is it not possible to use a line like 1. highway=* & source=plan.at [0x07 resolution 24] in my style file? The point in plan.at throws an exception. 2. highway:plan.at=* &..... Same problem. In Austria due to the import many ways can be identified like this, and one could decrease the road_class and/or road_speed because the quality of the data is very bad.
Sorry, I know nothing about the style stuff but I guess Steve must have not allowed . within a value string. Can you quote it? .e.g source="plan.at"
Now the harder part, would it be possible to enable in the osm5xmlhandler.java the parsing of ":" ?
String mtb:scaleTag = currentWay.getTag("mtb:scale"); if ( ("0".equals(mtb:scaleTag)) || ("1".equals(mtb:scaleTag) ) || ("true".equals(mtb:scaleTag) )) { // Add additional mtb:scale over old highway long mtb:scaleId = currentWay.getId() + MTB_ID_OFFSET; Way mtb:scaleWay = new Way(mtb:scaleId); wayMap.put(mtb:scaleId, mtb:scaleWay); List<Coord> points = currentWay.getPoints(); for(int i = 0; i < points.size(); ++i) mtb:scaleWay.addPoint(points.get(i));
mtb:scaleWay.addTag("mtb:scale", "11");
log.info("Making additional mtb:scale '" + mtb:scaleWay.getTag("name") + "'"); }
If I have these lines added, mkgmap.jar does not compile.
Err, I don't think that is valid Java syntax. How about using an _ instead? i.e. mtb_scaleWay Cheers, Mark BTW - in case you missed it, there's now an IRC channel for mkgmap-dev #mkgmap-dev at irc.oftc.net - so if you have a quick question you may find me there (as burto).

Hi Mark, Thanks for the answer... in that case User:sletuffe and me should not have proposed this tag as mtb:scale tag and pushed it through the votes.... Little did we know. If there is no possibility of parsing this, then maybe we have to propose to change the tag to mtb_scale=*. And find out how to retag all currently given tags of this kind in osm correctly. using mtb_scaleWay would be okay I know, but I have to read the tag in first place, don't I? if ( ("0".equals(mtb:scaleTag)) ) { and this allone is enough to not compile. I will try out out source="plan.at" , let's see if it works. Mark Burton wrote:
Hi Felix,
Err, I don't think that is valid Java syntax. How about using an _ instead? i.e. mtb_scaleWay
Cheers,
Mark
BTW - in case you missed it, there's now an IRC channel for mkgmap-dev #mkgmap-dev at irc.oftc.net - so if you have a quick question you may find me there (as burto).
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev

Hi Felix,
Thanks for the answer... in that case User:sletuffe and me should not have proposed this tag as mtb:scale tag and pushed it through the votes.... Little did we know. If there is no possibility of parsing this, then maybe we have to propose to change the tag to mtb_scale=*. And find out how to retag all currently given tags of this kind in osm correctly.
using mtb_scaleWay would be okay I know, but I have to read the tag in first place, don't I?
It's not the XML tag that's the problem - it's the Java identifiers - mtb:scale is fine as an XML tag. mtb:scaleTag is not a valid Java ID.
I will try out out source="plan.at" , let's see if it works.
OK Cheers, Mark
participants (2)
-
Felix Hartmann
-
Mark Burton