logo separator

[mkgmap-dev] problems at map intersections?

From Valentijn Sessink valentyn at blub.net on Fri Jul 17 16:20:41 BST 2009

Hi,

Since no one replies to my mail, I'll do it myself ;)

Warning: I'm not much of a programmer and I just looked around in the
mkgmap source for the first time today, so there's more things that I
don't understand than there are things that I do understand.

What I found is the following. Splitting a file with a border will
produce a file that has the exact "bounds", without the overlap, in the
resulting map.

For example I have an area.list entry that has:
63240008: 2428928,153600 to 2443264,231424
#       : 52.119141,3.295898 to 52.426758,4.965820

... then the resulting map has exactly these:
<bounds minlat='52.119140625' minlon='3.2958984375'
maxlat='52.4267578125' maxlon='4.9658203125'/>

So from the bounds section, you seem to have lost the overlap you produced.

However, the map does contain the overlap, which you can clearly see
when you load the map in JOSM.

As I said in my previous mail, something seems to go wrong at the edges
of splitted maps, Mapsource showing a shifted bounds rectangle and
seeming to choose the wrong map (i.e. one without data) at some zooming
levels.

After fiddling with the data and putting some random numbers in the
mkgmap source, I think I know what Garmin wants us to do:

- it wants to know the bounds including some overlap: splitter.jar
should have output:
<bounds minlat='52.097110625' minlon='3.2738684375'
maxlat='52.4487878125' maxlon='4.9878503125'/>

(... which is a larger area, 0.02203 is added - which is the deviation I
measured in Mapsource. Maybe I'm being stupid here and the 0.02203
number is a random number, has a meaning due to rounding, or whatever. I
don't know - it works for me).

Then, in addToOverviewMap, I added "-1" to the minimum lat/lon values:
int minLat = roundDown(bounds.getMinLat(), overviewMask) -1;
int minLon = roundDown(bounds.getMinLong(), overviewMask) -1;

... which results in a rectangle that is slightly larger. For some
obscure reason, the bounding rectangle looks shifted in Mapsource,
having minLat and minLon decreased by 1 just seems to work.

I'm not sure if my Gärmïn Ñüvï likes this map as well, but I'll give it
a try shortly.

Best regards,

Valentijn

Valentijn Sessink schreef:
> When trying to use a built map, I'm getting a bit odd results around the
> edges of tiles - at least, I think it's the edges. It's not exactly on
> the boundaries, but about 2.5 kilometers below the grey lines that show
> up in Mapsource (I assume these are the tiles). But strangely, the
> Splitter arealist has other numbers than Mapsource tells me.
[...]



More information about the mkgmap-dev mailing list