logo separator

[mkgmap-dev] highwayCount

From GerdP gpetermann_muenchen at hotmail.com on Thu Feb 7 08:37:51 GMT 2013

Hi,

I think we should clean the code regarding the usage of highwayCount,
treatAsNode, onBoundary and other attributes of Coord.

My understanding is this:
1) highwayCount should be increased for each coord instance that is part of
a road.
I think the right place to do that is in an extra loop at the beginning of 
StyledConverter.removeShortArcsByMergingNodes(). 
A coord instance that is part of more than one road is considered to become
a road junction.

2) in many places I see something like this:
						if(co.getOnBoundary()) {
							// this point lies on a boundary
							// make sure it becomes a node
							co.incHighwayCount();
						} 
I think this is an abuse of the highwayCount. The highwayCount is 
used to determine junctions of roads (e.g. in the frigRoundabout() method)
and I don't see why the attribute "onBoundary" should change the
"highwayCount" 

If "onBoundary = true" and "highwayCount > 1" both have a meaning like
"isRoadJunction"
I suggest that we create a new flag with this name.

Does that make sense?
If yes, how can I verify the results of my changes ? 
With my logic, I see ~20% fewer coords with highwayCount > 1^, so 
the change is big.
The unit tests do not help much, SimpleRouteTest failes because
the NOD size is different, but I doubt that the expected size is a must?

ciao,
Gerd



 



--
View this message in context: http://gis.19327.n5.nabble.com/highwayCount-tp5748434.html
Sent from the Mkgmap Development mailing list archive at Nabble.com.


More information about the mkgmap-dev mailing list