[gdal-dev] ​Re: Raster origin coodinates in file header

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] ​Re: Raster origin coodinates in file header

Piero Campa
Adrien,

OGC in its GML standard document -- of course in line with ISO -- recommends that:

"When a grid point is used to represent a sample space (e.g. image pixel), the grid point represents the center of the sample space (see ISO 19123:2005, 8.2.2)"
. ​

​GML encodes the locations of a raster/gridded-coverage by means of a grid of ​0D points.

​You can always put your raster origin wherever you want, i.e. in whatever corner you prefer.
Alas, there's no way -- that I am aware of -- to specify what is the shape of a measurement footprint/sample-space, nor to say if the footprint surrounds the point-geometry equally (point is pixel-centre) or some other way (point is pixel-upper-left-corner?).

Hence raster creators should probably stick to this recommended encoding until standards do not offer more freedom on this :)

​@seeAlso

-
​Piero !​


On 29 June 2015 at 21:00, <[hidden email]> wrote:
Date: Mon, 29 Jun 2015 11:12:11 +0200
From: Adrien ANDR? <[hidden email]>
To: [hidden email]
Subject: [gdal-dev] Raster origin coodinates in file header
Message-ID: <[hidden email]>
Content-Type: text/plain; charset=utf-8; format=flowed

Dear list,

opening 2 rasters with different resolutions i noticed a shift.

Asking our imagery provider, i was told the origin coordinates they
store in image header (JP2 files) are those of the top left pixel center.

GDAL reads origin coordinates as the top left pixel top left corner
coordinates, as i'm used to.


Of course, i fixed my problem, the hacky way, playing with
gdal_translate a_ullr option, but:

How to deal with this?
How not to worry about georeferencing each time i load a raster file?
Is there any OGC recommendation about origin coordinates storage?


Thanking you in advance,

Regards,

Adrien



_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] ​Re: Raster origin coodinates in file header

Adrien ANDRÉ
Even, Piero,

thank you very much for your detailed answers !


Adrien


Le 30/06/2015 08:41, Piero Campalani a écrit :

> Adrien,
>
> OGC in its GML standard document -- of course in line with ISO --
> recommends that:/
>
> "When a grid point is used to represent a sample space (e.g. image
> pixel), the grid point represents the center of the sample space (see
> ISO 19123:2005, 8.2.2)"/. ​
>
> ​GML encodes the locations of a raster/gridded-coverage by means of a
> grid of ​0D points.
>
> ​You can always put your raster origin wherever you want, i.e. in
> whatever corner you prefer.
> Alas, there's no way -- that I am aware of -- to specify what is the
> shape of a measurement footprint/sample-space, nor to say if the
> footprint surrounds the point-geometry equally (point is pixel-centre)
> or some other way (point is pixel-upper-left-corner?).
>
> Hence raster creators should probably stick to this recommended encoding
> until standards do not offer more freedom on this :)
>
> ​@seeAlso
> ​http://rasdaman.org/wiki/PetascopeSubsets
> http://rasdaman.org/ticket/680​
>
> -
> ​Piero !​
> ​
>
> On 29 June 2015 at 21:00, <[hidden email]
> <mailto:[hidden email]>> wrote:
>
>     Date: Mon, 29 Jun 2015 11:12:11 +0200
>     From: Adrien ANDR? <[hidden email]
>     <mailto:[hidden email]>>
>     To: [hidden email] <mailto:[hidden email]>
>     Subject: [gdal-dev] Raster origin coodinates in file header
>     Message-ID: <[hidden email]
>     <mailto:[hidden email]>>
>     Content-Type: text/plain; charset=utf-8; format=flowed
>
>     Dear list,
>
>     opening 2 rasters with different resolutions i noticed a shift.
>
>     Asking our imagery provider, i was told the origin coordinates they
>     store in image header (JP2 files) are those of the top left pixel
>     center.
>
>     GDAL reads origin coordinates as the top left pixel top left corner
>     coordinates, as i'm used to.
>
>
>     Of course, i fixed my problem, the hacky way, playing with
>     gdal_translate a_ullr option, but:
>
>     How to deal with this?
>     How not to worry about georeferencing each time i load a raster file?
>     Is there any OGC recommendation about origin coordinates storage?
>
>
>     Thanking you in advance,
>
>     Regards,
>
>     Adrien
>
>
>
>
>
> _______________________________________________
> gdal-dev mailing list
> [hidden email]
> http://lists.osgeo.org/mailman/listinfo/gdal-dev
>
_______________________________________________
gdal-dev mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/gdal-dev