hi all
I'm developing a processing-service using GRASS and I've got a problem when importing GeoTiff rasters.
The import operation is implemented by means of r.in.gdal
When I import a geotiff created by means of a WCS request using geoserver 1.5, the data is shifted by half a pixel; that is, the point of origin has half a pixel offset.
The problem seems to be due to a wrong handling of meta-tags by r.in.gdal.
The import works correctly (without any shift) if geotiffs with the meta-tag AREA_OR_POINT=Area are imported. However, a WCS request to geoserver 1.5 results in a geotiff using AREA_OR_POINT=point. It seems that Grass ignores the difference: the coordinates of the point of origin are handled as if they refer to the corner, instead of the center of the pixel.
I've looked at gdal options, but I found nothing about this. Has anyone encontered the same problem?
thanx
Raffaello
Raffaello Brondi wrote:
hi all
I'm developing a processing-service using GRASS and I've got a problem when importing GeoTiff rasters.
The import operation is implemented by means of r.in.gdal
When I import a geotiff created by means of a WCS request using geoserver 1.5, the data is shifted by half a pixel; that is, the point of origin has half a pixel offset.
The problem seems to be due to a wrong handling of meta-tags by r.in.gdal.
The import works correctly (without any shift) if geotiffs with the meta-tag AREA_OR_POINT=Area are imported. However, a WCS request to geoserver 1.5 results in a geotiff using AREA_OR_POINT=point. It seems that Grass ignores the difference: the coordinates of the point of origin are handled as if they refer to the corner, instead of the center of the pixel.
I've looked at gdal options, but I found nothing about this. Has anyone encontered the same problem?
Raffaello,
This is a long standing issue with GDAL and geotiff. I take the position
that pixel-is-point in geotiff does not change the interpretation that should
be made of the tie point while some others take the opposite opinion.
I don't have any suggestions for how to work around this.
Best regards,
--
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up | Frank Warmerdam, warmerdam@pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush | President OSGeo, http://osgeo.org