Felix,
> highway=* & oneway=yes {set name "{name} oneway"} [0x27 resolution 24
> continue]
> highway=residential [0x07 resolution 22]
>
> Usually now every street with oneway=yes I have an additional line
> displaying small arrows to indicate street is oneay.
> However using link-pois-to-ways in all sections where the
> road_speed/road_class is changed the 0x27 is not included. Without using
> the link-pois-to-ways action 0x27 is included.
>
> The same holds true for all other lines with "continue"
OK, thanks for spelling it out.
I think the problem here is that the processing done in
StyledConverter when the way has a POI (barrier or traffic lights, etc.)
splits the original way into segments. This should not be a problem if
you process the way as a non-road first (which I think your example
rules do) but, unfortunately, the code as it stands will share the
way's list of points between the road and the line and so if the list
gets truncated when processing the way as a road, the line gets
truncated as well (even though it was processed earlier).
Please try the attached patch and see if it cures the problem.
Remember, even with this patch, the style rules must process the way as
a road last so that if it gets truncated, it doesn't matter as you have
already processed it as a line.
BTW - this is not a new issue as splitting of ways has always
happened and is not really specific to the link pois stuff, that's just
making the problem more visible.
Cheers,
Mark
diff --git a/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java b/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
index 49af609..5a0b3b6 100644
--- a/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
+++ b/src/uk/me/parabola/mkgmap/osmstyle/StyledConverter.java
@@ -1050,9 +1050,15 @@ public class StyledConverter implements OsmConverter {
MapLine line = new MapLine();
elementSetup(line, gt, way);
- line.setPoints(points);
+ // to avoid problems when more than one line/road is generated
+ // from the same way, make a copy of the way's points list
+ // because setPoints() doesn't, it just uses the same list
+ line.setPoints(new ArrayList<Coord>(points));
MapRoad road = new MapRoad(way.getId(), line);
+ // points now needs to be the list of points from the road and
+ // not the original way
+ points = road.getPoints();
if("roundabout".equals(way.getTag("junction")))
road.setRoundabout(true);
_______________________________________________
mkgmap-dev mailing list
[email protected]
http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev