logo separator

[mkgmap-dev] Style function is_connected ?

From GerdP gpetermann_muenchen at hotmail.com on Fri Mar 1 11:37:31 GMT 2013

Hi,

maybe much easier:
let the style add a tag mkgmap:check_if_connected
for roads that should not be routable if not connected.
StyledConverter could evaluate that tag after all roads are known.

Gerd

GerdP wrote
> Hi Chris,
> 
> I looked into this again.
> It seems very easy to detect roads that are not connected after all lines
> were processed
> by the style system. This can be done by looking at the highwayCount value
> for each node
> of a way. If none is > 1, the way is not connected. Maybe a bit more code
> is needed to 
> detect self-intersecting roads or rings as such in the sample, but
> performance shoud be 
> no problem.
> 
> I see only one possible solution to implement this in the rule system:
> Create a new rule file (e.g.  roads) which is processed in a 2nd pass.
> I tried to implement this, but I found no simple solution.
> The problem is that the current style system doesn't allow a 2nd pass,
> which means
> we cannot yet pass the result of the 1st pass. 
> A possible weak solution woud be to use a roads file that
> include 'lines', but that seems a bit confusing to me, and maybe will not
> work at all
> regarding continue etc.
> Maybe someone else sees a simple solution?
> 
> Gerd
> 
> Chris66 wrote
>> Hi,
>> 
>> would a new style function is_connected() be difficult to implement ?
>> 
>> It should result "no" for example on this way:
>> 
>> <http://www.openstreetmap.org/browse/way/45838172>
>> 
>> Because it is not connected to any other highway.
>> 
>> Benefit: You could make such routing islands non routable.
>> 
>> Greetings
>> Chris
>> 
>> _______________________________________________
>> mkgmap-dev mailing list

>> mkgmap-dev at .org

>> http://lists.mkgmap.org.uk/mailman/listinfo/mkgmap-dev





--
View this message in context: http://gis.19327.n5.nabble.com/Style-function-is-connected-tp5750777p5751592.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.


More information about the mkgmap-dev mailing list