logo separator

[mkgmap-dev] Error splitting SRTM data

From Michael Prinzing mipri at gmx.net on Sun Sep 25 00:51:28 BST 2011

On Fri, 23 Sep 2011 09:27:01 +0200, Thorsten Kukuk wrote:

>On Fri, Sep 23, Michael Prinzing wrote:
>
>> On Thu, 22 Sep 2011 16:28:17 +0200, Thorsten Kukuk wrote:
>> 
>> >On Mon, Sep 19, Michael Prinzing wrote:
>> >
>> >> srtm2osm has a parameter -corrxy to shift the contour lines. Without
>> >> this parameters they are not aligned with the real heights. Is
>> >> phyghtmap handling this correct?
>> >
>> >The official version: I cannot see any code adjusting the alignment
>> >of the contour lines. For the area where I'm living, it looks
>> >perfect even without.
>> 
>> Without correction, contour lines created with srtm2osm are shifted
>> about 50m to the south and also about 50m to the west. You will need
>> some adequate terrain to see it, but take a look at 
>> 
>> http://www.wanderreitkarte.de/index.php?lon=9.8361&lat=48.6375&zoom=17
>> 
>> There is a gap in the forest to the west. It should match the contour
>> lines, but it doesn't. There is a white way with red border that should
>> follow the contour lines, but it also doesn't.
>
>Could it be that the 50m off is a Srtm2Osm bug? Even your
>area fits perfect for me.

Well, if we assume NASA did align the strm data correctly, there must
be something wrong with srtm2osm.

The srtm2osm code is old and abandonned, and since I can't compile it
at this time, I did not look too deep into it, but I could imagine the
following:

STRM data is stored in .hgt files, and for everly file the coordinates
from the filenames point to the position at which the lower left coner
of this file has to be placed. The lower left corner of the whole file
is the lower left corner of the lower left pixel in this file, and
therefore the /corner/ of this pixel has to be put to the given
coordinates. If srtm2osm instead places the /center/ of the lower left
pixel to the position given by the coordinates from the filename, this
would explain the shift to the south and to the west by half the length
of such a pixel. But it's just a guess...


Michael








More information about the mkgmap-dev mailing list