logo separator

[mkgmap-dev] class Numbers

From Steve Ratcliffe steve at parabola.me.uk on Mon Apr 20 11:55:25 BST 2015

On 20/04/15 10:31, Gerd Petermann wrote:
> just noticed that img file starts with optional zip code info, followed
> by optional city info,
> followed by numbers.
> So, maybe it is not a good idea to combine them in one class?

It makes a lot of sense to keep them separate I agree.  A road with
more than one city does not even need any road numbers, or there may
be no road numbers at the point where the city changes.

> Would that make reading difficult?
It would make reading a little more difficult since you would have to
merge the two streams, but we don't need to read it for map making
purposes, only for display.  Writing is already pretty difficult, so
it wouldn't make much difference there ;)

So if it saved a lot of space it would be possible, but I'm not sure
that it would.  Most roads will have one city, so having the two pointers
for each segment would be wasted space.

> My current thinking is that we should have the number of RoadNumbers
> before we start to read them (because we have the number of "Number nodes").
> So, it should be possible to allocate an array of RoadNumbers instances
> and fill those whenever we have data for one node.

I do think that is a upper bound to the number you will need.

..Steve


More information about the mkgmap-dev mailing list