logo separator

[mkgmap-dev] [PATCH v1] make DP filter avoid removing points located at nodes

From Mark Burton markb at ordern.com on Mon Nov 23 10:06:43 GMT 2009

Hi Johann,

> Isn't the only difference between routable and non routable lines the 
> occurence of CoordNodes? Is I understand the structure of the classes, a 
> Coord has only a location info, and a CoordNode is nearly the same, but 
> means, that this coord has connections to multiple ways. This means not 
> neccessarily that the way is routable, but that there are 
> interconnections of lines.
> (I have not looked into the code up to now, this is my understanding 
> from remembering)

That's correct.

> Your patch has moved the information 'this is a connecting node' from 
> the class level to a member level. I would not say it is wrong, but this 
> increases memory consumption, as this adds a new member (4 bytes?) to 
> every instance of coord!

But does it increase the size of a Coord? I admit to not having
actually measured the size but I've added a boolean to an object that
already contains a boolean. If the Java implementers are smart they
would be stored as single bits rather than bytes/shorts/words. Perhaps
someone who knows about this could comment.

Also, the patch removes a field from the CoordNode class that
basically did the same job, so it's actually possible that there is a
net reduction in memory required.
 
> So in my opinion the error is in the copy function of the line. If a 
> line contains CoordNodes, than also the copy should contain CoordNodes. 
> Can you point me to the code, where the lines gets duplicated?

Whenever a routable way gets split to limit the number of points or
nodes it makes a new list of points so any changes to the points in the
new list will not be visible in the original list.
 
> This all was some unfinished work of the dp filter. I would need some 
> time to understand the classes structure in full and prepare a solution.

Well, I think the outstanding issue at the moment is whether the DP
filter can be made more aggressive at the lower resolutions.

The idea of combining ways to reduce the number of segments is
interesting but at odds with our current strategy of limiting the
length of ways due to routing problems. More thought required there.

Cheers,

Mark





More information about the mkgmap-dev mailing list