[postgis-devel] WKT Raster: GDAL or World file upper leftcoordinates

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Thu Mar 5 07:41:50 PST 2009


Thanks Frank,

So I would suggest that we stick to World file when storing and in the
numerous Get functions. If we want to get the equivalent of what GDAL
use we can derive it from rt_raster_envelope().

Pierre

>-----Original Message-----
>From: postgis-devel-bounces at postgis.refractions.net
[mailto:postgis-devel-
>bounces at postgis.refractions.net] On Behalf Of Frank Warmerdam
>Sent: 5 mars 2009 09:54
>To: PostGIS Development Discussion
>Subject: Re: [postgis-devel] WKT Raster: GDAL or World file upper
leftcoordinates
>
>Pierre Racine wrote:
>> gdal2wktraster.py stores the GDAL version of the upper left corner
>> coordinate. This seems to be the real (or external) upper left
corner.
>>
>> World files (and WKT Raster) stores the "center" of the upper left
pixel
>> which is not the same thing. rt_raster_envelope(raster) was
implemented
>> this way. It add half of a pixelsize to get the BBOX of the raster.
So
>> now it returns an envelop a bit too big.
>>
>> We'll have to decide if we stick to GDAL specs or to World file
specs.
>>
>> Why does GDAL does not stick to the Word File specs? What are the
pros
>> and cons of one way over the other?
>
>Pierre,
>
>"Why does GDAL not stick to the World File specs?"
>
>Dare I suggest that the world file is not the definative georeferencing
>standard for raster data from which all others are derived?  God did
>not create the world file specification during the first six days and
>declare it to be in his image.
>
>The decision to go with center of top left pixel or top left corner
>of top left pixel as the origin of a raster is relatively arbitrary.
>The most important thing is to be consistent and well documented with
>regard to what is done.
>
>I do think that a raster envelope for a raster needs to be out to the
>edges of the pixels if the pixels are considered to be areas as is the
>case with most optical and area oriented GIS raster data.
>
>Best regards,
>--
>---------------------------------------+-------------------------------
-------
>I set the clouds in motion - turn up   | Frank Warmerdam,
warmerdam at pobox.com
>light and sound - activate the windows | http://pobox.com/~warmerdam
>and watch the world go round - Rush    | Geospatial Programmer for Rent
>
>_______________________________________________
>postgis-devel mailing list
>postgis-devel at postgis.refractions.net
>http://postgis.refractions.net/mailman/listinfo/postgis-devel



More information about the postgis-devel mailing list