Hi Torben,

Thank you for your answer.

On 06/06/2011 10:05 AM, Torben Dannhauer wrote:
Hi Simon,

have you checked that there is no systematic offset in your data? Maybe your 
procedure is right and the data is wrong...

I'm not aware of any offsets in my geotiff data. But maybe the metadata is incorrect. I suspect that it was converted from CH1903 to WGS84 coordinates.

GDAL info of a texture and a dem file:

$ gdalinfo SPOT_Clip_1306.tif
Driver: GTiff/GeoTIFF
Files: SPOT_Clip_1306.tif
Size is 4199, 2001
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (7.245054310000000,46.250672700000003)
Pixel Size = (0.000054049666900,-0.000054049666900)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=PIXEL
Corner Coordinates:
Upper Left  (   7.2450543,  46.2506727)
Lower Left  (   7.2450543,  46.1425193)
Upper Right (   7.4720089,  46.2506727)
Lower Right (   7.4720089,  46.1425193)
Center      (   7.3585316,  46.1965960)
Band 1 Block=4199x128 Type=Byte, ColorInterp=Red
Band 2 Block=4199x128 Type=Byte, ColorInterp=Green
Band 3 Block=4199x128 Type=Byte, ColorInterp=Blue


$ gdalinfo DOM_Clip_1306_1.tif
Driver: GTiff/GeoTIFF
Files: DOM_Clip_1306_1.tif
Size is 5557, 4999
Coordinate System is:
GEOGCS["WGS 84",
    DATUM["WGS_1984",
        SPHEROID["WGS 84",6378137,298.257223563,
            AUTHORITY["EPSG","7030"]],
        AUTHORITY["EPSG","6326"]],
    PRIMEM["Greenwich",0],
    UNIT["degree",0.0174532925199433],
    AUTHORITY["EPSG","4326"]]
Origin = (7.245041308711802,46.250657149589699)
Pixel Size = (0.000021630687580,-0.000021630687580)
Metadata:
  AREA_OR_POINT=Area
Image Structure Metadata:
  INTERLEAVE=BAND
Corner Coordinates:
Upper Left  (   7.2450413,  46.2506571)
Lower Left  (   7.2450413,  46.1425253)
Upper Right (   7.3652430,  46.2506571)
Lower Right (   7.3652430,  46.1425253)
Center      (   7.3051422,  46.1965912)
Band 1 Block=5557x128 Type=Int32, ColorInterp=Gray
  NoData Value=2147483647

It seems your are labeling only summits, so you could search for local maxima 
next to your label position to get the real summit.

Adding a treshold in that search function you could use to to allow such a 
correction algorith only for summits, not for ridges.

Detecting local maxima feels like a dirty hack. I would like to be able to label arbitrary POIs in the future.
Cheers,
Torben

------------------
Read this topic online here:
http://forum.openscenegraph.org/viewtopic.php?p=40101#40101

Cheers,
Simon
_______________________________________________
osg-users mailing list
[email protected]
http://lists.openscenegraph.org/listinfo.cgi/osg-users-openscenegraph.org

Reply via email to