check if road is connected to one side only

Would it be (without too much programming effort, nor too much computation time) possible to extend the current is connected check, to check for streets/lines connected to one side only? I would love to have road_class and road_speed lowered by 2- respectively -1 if this is the case.... Advantage would be a nicer routing graph I imagine - and thereby maybe a little improvement for long distance routing... -- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org

Hi Felix, yes, it is quite easy to implement that check, I already did it for oneways only (on my pc only) for the dead-end-check. The only problem are roads which cross tile boundaries, for those we have to disable the check because we will not know whether there are other roads on the other side of the boundary. Question is how to implement the change in attributes. As you know, the check occurs after the style was evaluated, so we'd need something like a special tag with a simple rule, maybe "mkgmap:dead-end-check-action=set road_class=&road_class - 2" The interpretation would be quite complex. The only other solution that I see is the two-pass interpreter that I already suggested, with a new rule file roads. I did not find a simple change to implement this, but I did not try long. Any ideas? Gerd Felix Hartmann-2 wrote
Would it be (without too much programming effort, nor too much computation time) possible to extend the current is connected check, to check for streets/lines connected to one side only? I would love to have road_class and road_speed lowered by 2- respectively -1 if this is the case....
Advantage would be a nicer routing graph I imagine - and thereby maybe a little improvement for long distance routing...
-- keep on biking and discovering new trails
Felix openmtbmap.org & www.velomap.org
_______________________________________________ mkgmap-dev mailing list
mkgmap-dev@.org
-- View this message in context: http://gis.19327.n5.nabble.com/check-if-road-is-connected-to-one-side-only-t... Sent from the Mkgmap Development mailing list archive at Nabble.com.

On 21.03.2013 14:26, GerdP wrote:
Hi Felix,
yes, it is quite easy to implement that check, I already did it for oneways only (on my pc only) for the dead-end-check. The only problem are roads which cross tile boundaries, for those we have to disable the check because we will not know whether there are other roads on the other side of the boundary. no prob, those are not the majority anyhow. If we can catch 99% easily, then let's catch them and don't care about 1% if that's twice the work...
Question is how to implement the change in attributes. As you know, the check occurs after the style was evaluated, so we'd need something like a special tag with a simple rule, maybe "mkgmap:dead-end-check-action=set road_class=&road_class - 2" The interpretation would be quite complex. The only other solution that I see is the two-pass interpreter that I already suggested, with a new rule file roads. I did not find a simple change to implement this, but I did not try long.
Any ideas? well it could be an option, but then I'm against further flooding the options menu...
so either add a roads file to the style, for actions to be run later (sounds clean and opens up for future functionality), or a complex call from the lines file. For me both is equally fine....
Gerd
Felix Hartmann-2 wrote
Would it be (without too much programming effort, nor too much computation time) possible to extend the current is connected check, to check for streets/lines connected to one side only? I would love to have road_class and road_speed lowered by 2- respectively -1 if this is the case....
Advantage would be a nicer routing graph I imagine - and thereby maybe a little improvement for long distance routing...
-- keep on biking and discovering new trails
Felix openmtbmap.org & www.velomap.org
_______________________________________________ mkgmap-dev mailing list mkgmap-dev@.org http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- View this message in context: http://gis.19327.n5.nabble.com/check-if-road-is-connected-to-one-side-only-t... Sent from the Mkgmap Development mailing list archive at Nabble.com. _______________________________________________ mkgmap-dev mailing list mkgmap-dev@lists.mkgmap.org.uk http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
-- keep on biking and discovering new trails Felix openmtbmap.org & www.velomap.org
participants (2)
-
Felix Hartmann
-
GerdP