<html>
<head>
<style><!--
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
font-size: 12pt;
font-family:Calibri
}
--></style></head>
<body class='hmmessage'><div dir='ltr'>Hi Steve,<br><br>thanks, don't know what I have missed before that I went so wrong :-O<br><br>Two open questions:<br>1) Why do we need the new class NumberCoord?<br>I'd say we just have to use one of the spare bits in the Coord.flags field.<br>Major problem is to find all places where we create copies of existing<br>Coord instances and make sure that the info is copied properly?<br><br>2) Is a CoordNode always also a number node? Or is it possible<br>to combine the numbers for multiple arcs? I guess that would allow<br>to save some bytes.<br><br>Gerd<br><br><br><div>> Date: Thu, 8 Jan 2015 23:26:04 +0000<br>> From: steve@parabola.me.uk<br>> To: mkgmap-dev@lists.mkgmap.org.uk<br>> Subject: Re: [mkgmap-dev] random housenumbers<br>> <br>> <br>> Hi Gerd<br>> <br>> > I guess we have to<br>> > 1) add a flag to RouteNode which says whether or not the node is used<br>> > for routing. A RouteNode for housenumbers will have arcs<br>> > like a normal one, but they are only used to allow placing the<br>> > housenumber infos.<br>> <br>> I don't think the change will involve RouteNode.<br>> <br>> Currently we have road lines made up of Coord<br>> and CoordNode. There should be something between those two.<br>> Lets call it NumberCoord here for want of a better name.<br>> <br>> Add a method to Coord that returns false.<br>> <br>> class Coord {<br>>         public boolean isNumberNode() { return false; }<br>> }<br>> <br>> // Then NumberCoord extends that and overrides it to return true.<br>> class NumberCoord extends Coord {<br>>         ... isNumberNode() { return true; }<br>> }<br>> Then CoordNode extends NumberCoord.<br>> <br>> Then in LinePreparer around line 380 where it says:<br>> <br>>         * Current thought is that the node indicator is set when<br>>         * the point is a node. There's a separate first extra bit<br>>         * that always appears to be false. The last points' extra bit<br>>         * is set if the point is a node and this is not the last<br>>         * polyline making up the road.<br>>         * Todo: special case the last bit<br>> <br>> The comment needs the 'current thought' changing ;)<br>> <br>> Then use co.isNumberNode() instead of co.getId()<br>> <br>> > 2) change RoadDef.writeNod2()<br>> > to create the bitstream using this flag.<br>> > 3) What happens with the complex<br>> > routing routines in RouteNode, e.g.<br>> > addArcsToMajorRoads() ?<br>> <br>> I don't think you would have to change any of that so<br>> long as there are no invalid assumptions in there.<br>> <br>> > Do we have to add arcs to the "housenumber nodes" ?<br>> <br>> No. Well you could but then they would be routing nodes ;)<br>> <br>> > 4) In StyledConverter I see a call<br>> > road.setStartsWithNode(nodeIndices.get(0) == 0);<br>> > which seems to always set the bit to true.<br>> > The code in RoadHelper may be work different.<br>> > Do you have an example that explains this?<br>> <br>> I believe that code is intended to deal with the case<br>> where the first node is a dead end.<br>> <br>> > Attached patch shows how I intend to implement the random<br>> > housenumbers, it doesn't do anything useful yet.<br>> > Maybe you can tell me if I am on the right way?<br>> <br>> I think that is probably not the place to start as explained above.<br>> Sorry I may have been misleading as there are so many things called<br>> Node. We need some new terms!<br>> <br>> The NetCheck program was written after this was understood so<br>> it will correctly display housenumbers in this case. The output<br>> is a bit verbose, just look for the Number lines.<br>> <br>> ..Steve<br>> _______________________________________________<br>> mkgmap-dev mailing list<br>> mkgmap-dev@lists.mkgmap.org.uk<br>> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev<br></div>                                            </div></body>
</html>