Skip to content
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
Closed

WCS: Origin of rectifiedGrid #5511

ajolma opened this issue Nov 7, 2017 · 5 comments

Comments

@ajolma
Copy link
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
Copy link
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
Copy link
Contributor Author

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
…rrespond to the coordinate of the pixel center (fixes #5511)
@rouault rouault closed this as completed in 31c25df Nov 9, 2017
@rouault
Copy link
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
Copy link
Member

Schpidi commented Nov 10, 2017

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

@ajolma
Copy link
Contributor Author

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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants