logo separator

[mkgmap-dev] random housenumbers

From Gerd Petermann gpetermann_muenchen at hotmail.com on Fri Jan 9 05:54:19 GMT 2015

Hi Steve,

thanks, don't know what I have missed before that I went so wrong :-O

Two open questions:
1)  Why do we need the new class NumberCoord?
I'd say we just have to use one of the spare bits in the Coord.flags field.
Major problem is to find all places where we create copies of existing
Coord instances and make sure that the info is copied properly?

2) Is a CoordNode always also a number node?  Or is it possible
to combine the numbers for multiple arcs? I guess that would allow
to save some bytes.

Gerd


> Date: Thu, 8 Jan 2015 23:26:04 +0000
> From: steve at parabola.me.uk
> To: mkgmap-dev at lists.mkgmap.org.uk
> Subject: Re: [mkgmap-dev] random housenumbers
> 
> 
> Hi Gerd
> 
> > I guess we have to
> > 1) add a flag to RouteNode which says whether or not the node is used
> > for routing. A RouteNode for housenumbers will have arcs
> > like a normal one, but they are only used to allow placing the
> > housenumber infos.
> 
> I don't think the change will involve RouteNode.
> 
> Currently we have road lines made up of Coord
> and CoordNode.  There should be something between those two.
> Lets call it NumberCoord here for want of a better name.
> 
> Add a method to Coord that returns false.
> 
> class Coord {
>    	public boolean isNumberNode() { return false; }
> }
> 
> // Then NumberCoord extends that and overrides it to return true.
> class NumberCoord extends Coord {
> 	... isNumberNode() { return true; }
> }
> Then CoordNode extends NumberCoord.
> 
> Then in LinePreparer around line 380 where it says:
> 
> 	* Current thought is that the node indicator is set when
> 	* the point is a node. There's a separate first extra bit
> 	* that always appears to be false. The last points' extra bit
> 	* is set if the point is a node and this is not the last
> 	* polyline making up the road.
> 	* Todo: special case the last bit
> 
> The comment needs the 'current thought' changing ;)
> 
> Then use co.isNumberNode() instead of co.getId()
> 
> > 2) change RoadDef.writeNod2()
> > to create the bitstream using this flag.
> > 3) What happens with the complex
> > routing routines in RouteNode, e.g.
> > addArcsToMajorRoads() ?
> 
> I don't think you would have to change any of that so
> long as there are no invalid assumptions in there.
> 
> > Do we have to add arcs to the "housenumber nodes" ?
> 
> No. Well you could but then they would be routing nodes ;)
> 
> > 4) In StyledConverter I see a call
> > road.setStartsWithNode(nodeIndices.get(0) == 0);
> > which seems to always set the bit to true.
> > The code in RoadHelper may be work different.
> > Do you have an example that explains this?
> 
> I believe that code is intended to deal with the case
> where the first node is a dead end.
> 
> > Attached patch shows how I intend to implement the random
> > housenumbers, it doesn't do anything useful yet.
> > Maybe you can tell me if I am on the right way?
> 
> I think that is probably not the place to start as explained above.
> Sorry I may have been misleading as there are so many things called
> Node.  We need some new terms!
> 
> The NetCheck program was written after this was understood so
> it will correctly display housenumbers in this case. The output
> is a bit verbose, just look for the Number lines.
> 
> ..Steve
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev
 		 	   		  
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.mkgmap.org.uk/pipermail/mkgmap-dev/attachments/20150109/c11093ab/attachment.html>


More information about the mkgmap-dev mailing list