logo separator

[mkgmap-dev] Commit: r1367: Rewrite pickArea() to avoid a problem with unequally sized areas.

From Carlos Dávila cdavilam at jemila.jazztel.es on Wed Nov 11 16:40:04 GMT 2009

svn commit escribió:
> Version 1367 was commited by markb on 2009-11-11 11:21:31 +0000 (Wed, 11 Nov 2009) 
> Rewrite pickArea() to avoid a problem with unequally sized areas.
> The original pickArea() assumed that all the areas to choose from had
> the same widths and the same heights. Unfortunately, that is not true and
> so it was occasionally putting elements in the wrong area.
> This new version simply iterates through the areas testing to see if the
> element is contained within one. It may be slower for large numbers of
> areas but at least it should get the answer right. Mind you, I don't think
> the number of areas is ever that large because the subdivision process
> just divides areas by something small like 2 or 4. So probably not really
> slower at all.
> Also, it now throws away elements that are outside of the whole area and
> emits an error message.
I suppose errors below come from this change, but, how to fix them? I
have tried to download the areas reported from a couple of these errors,
but JOSM just say "No data found for this area"
GRAVE (MapArea): Map element with type 0x1c (class
uk.me.parabola.mkgmap.general.MapLine at
http://www.openstreetmap.org/?lat=41.95737&lon=-6.94390&zoom=17 is
outside of the map area centred on
http://www.openstreetmap.org/?lat=41.78339&lon=-6.42048&zoom=17 width =
22164 height = 33765

More information about the mkgmap-dev mailing list