[gdal-dev] Corner Coordinates for a PixelisPoint type GeoTIFF

Daniele Romagnoli daniele.romagnoli at geo-solutions.it
Tue Nov 3 10:40:06 EST 2009


Hi Hermann,
as far as I know, GDAL always returns coordinates in the pixel_corner
convention.
Take a look here about conventions:
http://www.vterrain.org/Misc/cellreg.html

Therefore, I guess from gdalinfo you see the AREA_OR_POINT = POINT
(Center_extent) metadata whilst the coordinates are exposed in Corner_extent
(instead of center_extent).

I don't know how listgeo works but I guess it shows AREA_OR_POINT=POINT and
it produces coordinates in that convention (center_extent).
This will explain why you see a 50 meters (half pixel) difference between
the 2 outputs which seem coherent.

Gdal shows the coordinate of the corner of the pixel whilst listgeo shows
the coordinate of the center of the pixel. Also note that world files should
always be in pixel is center (indeed, your world file contains 1547250 and
5415950 grid origin).

Hope this helps.

Best Regards,
Daniele

-- 
-------------------------------------------------------
Eng. Daniele Romagnoli
Software Engineer

GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax:     +39 0584983027
mob:   +39 328 0559267


http://www.geo-solutions.it


On Tue, Nov 3, 2009 at 3:11 PM, Hermann Peifer <peifer at gmx.eu> wrote:

> Hi All,
>
> I am somewhat puzzled by the different sets of corner coordinates that
> gdalinfo and listgeo report for the same PixelisPoint GeoTIFF, see [1] and
> [2]. Can both be true at the same time?
>
> Thanks, Hermann
>
>
> [1]
>
> $ gdalinfo cdda100.tif
> Driver: GTiff/GeoTIFF
> Files: cdda100.tif
> Size is 56392, 44743
> Coordinate System is:
> PROJCS["ETRS_1989_LAEA",
>    GEOGCS["GCS_ETRS_1989",
>        DATUM["European_Terrestrial_Reference_System_1989",
>            SPHEROID["GRS_1980",6378137.0,298.257222101]],
>        PRIMEM["Greenwich",0.0],
>        UNIT["Degree",0.0174532925199433]],
>    PROJECTION["Lambert_Azimuthal_Equal_Area"],
>    PARAMETER["False_Easting",4321000.0],
>    PARAMETER["False_Northing",3210000.0],
>    PARAMETER["longitude_of_center",10.0],
>    PARAMETER["latitude_of_center",52.0],
>    UNIT["Meter",1.0]]
> Origin = (1547200.000000000000000,5416000.000000000000000)
> Pixel Size = (100.000000000000000,-100.000000000000000)
> Metadata:
>  AREA_OR_POINT=Point
>  TIFFTAG_SOFTWARE=Arc/Info
>  TIFFTAG_XRESOLUTION=0.0099999998
>  TIFFTAG_YRESOLUTION=0.0099999998
>  TIFFTAG_RESOLUTIONUNIT=1 (unitless)
> Image Structure Metadata:
>  COMPRESSION=LZW
>  INTERLEAVE=BAND
> Corner Coordinates:
> Upper Left  ( 1547200.000, 5416000.000) ( 48d 6'29.49"W, 60d36'53.91"N)
> Lower Left  ( 1547200.000,  941700.000) ( 17d54'14.25"W, 26d55'37.74"N)
> Upper Right ( 7186400.000, 5416000.000) ( 69d13'59.10"E, 59d59'56.41"N)
> Lower Right ( 7186400.000,  941700.000) ( 38d46'25.90"E, 26d37'44.54"N)
> Center      ( 4366800.000, 3178850.000) ( 10d39'45.86"E, 51d43'5.40"N)
> Band 1 Block=56392x2 Type=Byte, ColorInterp=Palette
>
> (...)
>
>
> [2]
>
> $ listgeo cdda100.tif
> Geotiff_Information:
>   Version: 1
>   Key_Revision: 1.0
>   Tagged_Information:
>      ModelTiepointTag (2,3):
>         0                0                0
>         1547250          5415950          0
>      ModelPixelScaleTag (1,3):
>         100              100              0
>      End_Of_Tags.
>   Keyed_Information:
>      GTModelTypeGeoKey (Short,1): Undefined
>      GTRasterTypeGeoKey (Short,1): RasterPixelIsPoint
>      GTCitationGeoKey (Ascii,304): "IMAGINE GeoTIFF Support\nCopyright 1991
> - 2005 by Leica Geosystems Geospatial Imaging, LLC. All Rights Reserved\n@(#)$RCSfile:
> egtf.c $ IMAGINE 9.0 $Revision: 10.0 $ $Date: 2005/07/26 15:10:00 EST
> $\nGeocoding information not available\nProjection Name =
> ETRS_1989_LAEA\nUnits = meters\nGeoTIFF Units = meters"
>      ProjLinearUnitsGeoKey (Short,1): Linear_Meter
>      End_Of_Keys.
>   End_Of_Geotiff.
>
> Projection Linear Units: 9001/metre (1.000000m)
>
> Corner Coordinates:
> Upper Left    ( 1547250.000, 5415950.000)
> Lower Left    ( 1547250.000,  941650.000)
> Upper Right   ( 7186450.000, 5415950.000)
> Lower Right   ( 7186450.000,  941650.000)
> Center        ( 4366850.000, 3178800.000)
>
>
> [3]
>
> $ cat  cdda100.tfw
>                 100.00000000000000
>                   0.00000000000000
>                   0.00000000000000
>                -100.00000000000000
>             1547250.00000000000000
>             5415950.00000000000000
>
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>



-- 
-------------------------------------------------------
Eng. Daniele Romagnoli
Software Engineer

GeoSolutions S.A.S.
Via Carignoni 51
55041 Camaiore (LU)
Italy

phone: +39 0584983027
fax:     +39 0584983027
mob:   +39 328 0559267


http://www.geo-solutions.it

-------------------------------------------------------
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20091103/ac516f30/attachment.html


More information about the gdal-dev mailing list