logo separator

[mkgmap-dev] RFE --merge-lines only from resolution X

From Felix Hartmann extremecarver at gmail.com on Mon Nov 1 22:50:45 GMT 2010


On 01.11.2010 23:28, Steve Ratcliffe wrote:
> Hi
>
>> It currently works at all resolutions. However at 24 and 22 I could not
> Well all I can say is that the code is only called for
> resolutions less than 24:
>
> 	if (mergeLines&&  res<  24) {
> 		LineMergeFilter merger = new LineMergeFilter();
> 		lines = merger.merge(lines);
> 	}
>
> The resolution 24 may be affected somehow by the other levels on the
> device somehow I suppose.
Ups no, sorry for the trouble. There are no probs on resolution=24. So 
an intermediary fix would be to take out 22 and 23 because 22 is still 
for many outdoor sports the most used resolution on the GPS and not used 
for overview (where am I? where is place X that I want to got to?) and 
hence no speed increase in map drawing is really needed (anyhow it is 
very small - it gets larger the further one zooms out). I use 21 usually 
not anymore while following a trail on bicycle or hiking - hence here 
the problems are not so severe.

Which file is this in? If so would changing this to

if (mergeLines&&  res<  22) {
		LineMergeFilter merger = new LineMergeFilter();
		lines = merger.merge(lines);
	}

work out for me? Or do I run into problems on further lines? (I do think 
this should be changed on the trunk too - I got about 15 mails/comments 
about this bug from users of my map after I put --merge-lines into my 
build process during 2 days....)
>> I'm not sure how the code works currently, but ideally it should be
>> working on every resolution separately. For example while at resolution
> Currently it does apply at every resolution separately, but I think
> that is likely the problem. It is also not done to the road
> definitions which can't be right.
What do you mean by this? In my eyes any road type (e.g. 0x01) could be 
merged as long as there is no change in name (because routing is only at 
resolution=24 - so no need to look whether road_class or road_speed are 
the same, that would only apply for resolution=24 (or resolution=23 if 
you produce maps without 24 - but mkgmap is severly broken in that 
regard anyhow. You currently cannot get a map to work that has 
resolution=23 as routing and most detailed resolution without big 
problems (at least 6 month ago when I tried this)).
> There is no advantage of working on each resolution separately with
> the way the code exists since it starts out as one single set of lines
> and as long as you take care to not join lines that are meant to be
> displayed at different levels, then there is nothing I think you can
> do per level that you can't do before calculating the subdivisions.
>
> I think that the place to do merging is before the subdivisions are
> created.  I realise that one of the comments was that there is no
> suitable 'in between' place to do this, but I'd be happy if need be
> to introduce such a place.
>
> I also think that the lines must be merged before adding to the road
> network.
Yes that would be best to do. But may be difficult - because you would 
have to parse the style-file first to find out whether or not the parts 
can be merged or not.
> ..Steve
> _______________________________________________
> mkgmap-dev mailing list
> mkgmap-dev at lists.mkgmap.org.uk
> http://www.mkgmap.org.uk/mailman/listinfo/mkgmap-dev



More information about the mkgmap-dev mailing list