-
-
Notifications
You must be signed in to change notification settings - Fork 3k
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
Allow add WCS Layer with EPSG: 0 in DescribeCoverage #34569
Comments
I strongly suspect this is a thredds bug (or a server configuration bug). EPSG:0 is clearly an invalid code... |
Ok, looks like its not something I'm doing wrong with our NetCDF4 file, even the Thredds example/sample WCS endpoint from their documentation has the same issue: https://thredds.ucar.edu/thredds/wcs/galeon/testdata/striped.nc?request=DescribeCoverage&version=1.0.0&service=WCS&coverage=ta |
I can't find much public mention of "EPSG:0". http://osgeo-org.1560.x6.nabble.com/Adding-support-for-a-new-EPSG-code-EPSG-0-td4270761.html suggest that it could be a special keyword indicating "no projection" (or non-world projection), but that proposal seems to have been voted down. If this is the case, we could represent this in QGIS by setting the layer's CRS to "no projection"? |
Yes believe they are using "EPSG: 0" to represent "no projection" though the use of "Latitude_Longitue" in the name suggests its probably supposed to be a CRS with I've discovered that removing the "&responsecrs=" component of the GetCoverage request string will allow the request to return the expected result. So perhaps the setting the layer to "no projection" and removing the "&responsecrs=" component of the request is a valid solution in the case of encountering the "EPSG: 0" |
I've done some digging, looks like this weird coordinate system does come from my netcdf4 file. I am looking through the Thredds WCS code and found where EPSG: 0 is defined here: https://github.com/Unidata/thredds/blob/e96a74578920315f02acaeb88b9592e10db6ac41/cdm/src/main/java/ucar/unidata/geoloc/ogc/EPSG_OGC_CF_Helper.java#L66 It mentions "Added in CF-1.2". CF is a NetCDF4 convention spec. See example 5.8 in the CF-1.2 spec: So when a netcdf4 file has "crs.grid_mapping_name=latitude_longitude" it appears that Thredds specifies the WCS responsecrs "EPSG:0 [Latitude_Longitude]" |
FWIW, all of the relevant metadata in my netcdf4 file is the following:
|
@ashleysommer where do we stand with this report? |
The QGIS project highly values your report and would love to see it addressed. However, this issue has been left in feedback mode for the last 14 days and is being automatically marked as "stale". |
I believe this is still a bug and still needs to be addressed. |
@ashleysommer URL is not working anymore. |
That's right. We no longer host a Thredds instace on that domain. However this issue is not unique to our deployment. All Thredds WCS endpoints exhibit the same behaviour. For example, you can test with the official Thredds WCS Sample/Example endpoint: |
Describe the bug
Not sure if its a bug or not.
I'm having trouble with QGIS interacting with our Thredds WCS endpoint. I'm not sure if its a bug in Thredds or QGIS or neither, or if I'm just interpreting it wrong.
Please see the NetCDF4 file served by Thredds 4.6.14 here:
http://esoil.io/thredds/wcs/SMIPSall/SMIPSv0.5.nc?service=WCS&version=1.0.0&request=GetCapabilities
Specifically the DescribeCoverage endpoint here: http://esoil.io/thredds/wcs/SMIPSall/SMIPSv0.5.nc?service=WCS&version=1.0.0&request=DescribeCoverage
The ResponseCRSs field contains:
EPSG:0 [Latitude_Longitude]
How to Reproduce
Add that WCS endpoint as a new WCS layer in Thredds, connect to the server, and try to add one of the layers to your project.
When QGIS queries the supportedCRSs from the DescribeCoverage endpoint, it sees the "EPSG:0" entry and interprets as an invalid CRS, so it ignores it.
When requesting data via a GetCoverage request, QGIS instead uses
&responsecrs=OGC:CRS84
which of course causes Thredds to throw this error:Response CRS [OGC:CRS84] not the supported CRS [EPSG:0 [Latitude_Longitude]]
If I substitute that with "EPSG:0 [Latitude_Longitude]" I get a valid response from WCS.
QGIS and OS versions
QGIS 3.10.1, reproduced on Windows and Linux OS
Additional context
I've created a question on the Thredds repo issue tracker too, see here: Unidata/thredds#1318
This issue is related: #28864, and this PR: #9005
But it seems to actually looks to be the opposite, it claims that when EPSG: 0 is found in the responseCRSs it should be ignored and fallback to the default OGC:CRS84.
The text was updated successfully, but these errors were encountered: