New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WCS: Origin of rectifiedGrid #5511

Closed
ajolma opened this Issue Nov 7, 2017 · 5 comments

Comments

Projects
None yet
3 participants
@ajolma
Contributor

ajolma commented Nov 7, 2017

The origin of the rectifiedGrid is written (mapwcs.c:1193) as geotransform[0] and [3], which is extent boundaries. The origin should be expressed as the center of the grid point.

@rouault

This comment has been minimized.

Show comment
Hide comment
@rouault

rouault Nov 8, 2017

Contributor

mapwcs.c is about WCS 1.0 and whole GDAL & MapServer code use pixel-corner convention, so I don't think things should be changed there
mapwcs11.c applies a half pixel shift for GridOrigin per https://github.com/mapserver/mapserver/blob/branch-7-0/mapwcs11.c#L724
So it looks the issue is for WCS 2.0 where this half pixel shift is not applied, but it should. @Schpidi any opinion ?

Contributor

rouault commented Nov 8, 2017

mapwcs.c is about WCS 1.0 and whole GDAL & MapServer code use pixel-corner convention, so I don't think things should be changed there
mapwcs11.c applies a half pixel shift for GridOrigin per https://github.com/mapserver/mapserver/blob/branch-7-0/mapwcs11.c#L724
So it looks the issue is for WCS 2.0 where this half pixel shift is not applied, but it should. @Schpidi any opinion ?

@ajolma

This comment has been minimized.

Show comment
Hide comment
@ajolma

ajolma Nov 8, 2017

Contributor

Yes, sorry, I was too quick to point to the place in code. I saw the error in XML returned by a server when testing the new GDAL WCS driver in 2.0.1 mode.

Contributor

ajolma commented Nov 8, 2017

Yes, sorry, I was too quick to point to the place in code. I saw the error in XML returned by a server when testing the new GDAL WCS driver in 2.0.1 mode.

rouault added a commit that referenced this issue Nov 9, 2017

WCS 2.0 DescribeCoverage result: fix RectifiedGrid.origin.Point to co…
…rrespond to the coordinate of the pixel center (fixes #5511)

@rouault rouault closed this in 31c25df Nov 9, 2017

@rouault

This comment has been minimized.

Show comment
Hide comment
@rouault

rouault Nov 9, 2017

Contributor

Fix committed per 31c25df
Both GeoServer and Rasdaman also use the center of grid point convention, so this fix was needed.

Contributor

rouault commented Nov 9, 2017

Fix committed per 31c25df
Both GeoServer and Rasdaman also use the center of grid point convention, so this fix was needed.

@Schpidi

This comment has been minimized.

Show comment
Hide comment
@Schpidi

Schpidi Nov 10, 2017

Member

@rouault I fully agree with the necessary changes, many thanks for taking care!

Member

Schpidi commented Nov 10, 2017

@rouault I fully agree with the necessary changes, many thanks for taking care!

@ajolma

This comment has been minimized.

Show comment
Hide comment
@ajolma

ajolma Nov 18, 2017

Contributor

I think this issue is also valid for 1.0.0. See for example http://194.66.252.155/cgi-bin/BGS_EMODnet_bathymetry/ows?SERVICE=WCS&REQUEST=DescribeCoverage&VERSION=1.0.0&COVERAGE=BGS_EMODNET_CentralMed-MCol
In 1.0.0 the origin is at the center of pixel in ArcGIS and GeoServer

Contributor

ajolma commented Nov 18, 2017

I think this issue is also valid for 1.0.0. See for example http://194.66.252.155/cgi-bin/BGS_EMODnet_bathymetry/ows?SERVICE=WCS&REQUEST=DescribeCoverage&VERSION=1.0.0&COVERAGE=BGS_EMODNET_CentralMed-MCol
In 1.0.0 the origin is at the center of pixel in ArcGIS and GeoServer

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment