Opened 10 years ago

Closed 7 years ago

#721 closed defect (fixed)

WCPS coverage information does not update the CRS on slices

Reported by: Piero Campalani Owned by: Bang Pham Huu
Priority: major Milestone: 9.3
Component: petascope Version: development
Keywords: dynamic coverage singleton update Cc: Vlad Merticariu, Alex Dumitru
Complexity: Hard

Description

Upon slicings, the (cell) dimensionality of a coverage is properly decreased by calling the setDimension() method of the petascope.wcps.server.core.CoverageInfo class.

However, like done for on the WCS counterpart (petascope.wcs2.parsers.GetCoverageMetadata class), the CRS must be updated too:

crsName = CrsUtil.sliceAxesOut(meta.getCrsUris(), slicedAxes);

From petascope.wcs2.extensions.AbstractFormatExtension.

This bug highlights the need for a refactoring in the handling of dynamic coverage metadata (static is in petascope.core.CoverageMetadata): WCS GetCoverageMetadata should be including and actively using the metadata from CoverageInfo on the WCPS side. We need a singleton point of metadata update.

Change History (14)

comment:1 by Piero Campalani, 10 years ago

This bug ends up delivering wrong RasQL encode queries (e.g. the whole compound CRS URI is passed to the class handling the GDAL parameters, and the extracted auth:code for GDAL is pointing to the last single URI).

comment:2 by Dimitar Misev, 9 years ago

Cc: Vlad Merticariu Alex Dumitru added
Milestone: 9.19.2

comment:3 by Peter Baumann, 8 years ago

Milestone: 9.2Future

to be fixed with WCPS 2.0, spec under work.

in reply to:  1 comment:4 by Bang Pham Huu, 8 years ago

Milestone: Future9.3
Resolution: fixed
Status: newclosed

Replying to pcampalani:

This bug ends up delivering wrong RasQL encode queries (e.g. the whole compound CRS URI is passed to the class handling the GDAL parameters, and the extracted auth:code for GDAL is pointing to the last single URI).

with the new WCPS 1.5 service (it uses completely news classes), it will add the correct CRS from compound CRS in this case (i.e: slicing a 3D: eobstest coverage on time axis to a 2D coverage) correctly, so I think this ticket can be closed.

eobtest's CRS in GML:

http://localhost:8080/def/crs-compound?
1=http://localhost:8080/def/crs/EPSG/0/4326&
2=http://localhost:8080/def/crs/OGC/0/AnsiDate?axis-label="t"

WCPS query:

for c in (eobstest) return encode(c[t("1950-01-01")], "tiff")

and Rasql query:

SELECT encode(c[0,0:100,0:231], "gtiff" , 
"xmin=-40.50;ymin=25.00;xmax=75.50;ymax=75.50;crs=EPSG:4326") 
FROM eobstest AS c

comment:5 by Peter Baumann, 8 years ago

great to see this work!
What happens if you slice in x and retain y/t?

in reply to:  5 comment:6 by Bang Pham Huu, 8 years ago

Replying to pbaumann:

great to see this work!
What happens if you slice in x and retain y/t?

In your case, the output still a 2D coverage and the combination of y and t axes is not a valid CRS (neither geo-referenced CRS nor time CRS), then it will set the coverage's output CRS to Index2D.

comment:7 by Peter Baumann, 8 years ago

yes, I agree to some extent. It is a good way to solve an otherwise really hard problem.
Is this behavior documented?

in reply to:  7 comment:8 by Bang Pham Huu, 8 years ago

Replying to pbaumann:

yes, I agree to some extent. It is a good way to solve an otherwise really hard problem.
Is this behavior documented?

wrt your question, I think it is not yet in any documents as far as know.

comment:9 by Peter Baumann, 8 years ago

Resolution: fixed
Status: closedreopened

…then this should be done. Reopening for this purpose.

comment:10 by Dimitar Misev, 8 years ago

What is the petascope documentation, where can this information be put? Any suggestion Bang?

We have these petascope pages:

PetascopeDevGuide
PetascopeEmbedded
PetascopeInstallGuide
PetascopeOld
PetascopeSubsets
PetascopeTimeHandling
PetascopeUserGuide

comment:11 by Bang Pham Huu, 8 years ago

For me, it seems http://rasdaman.org/wiki/PetascopeSubsets is the most suitable for adding this information (subset on axes and CRSs).

comment:12 by Peter Baumann, 8 years ago

seeing this again:
what about extracting the axes from the CRSs involved (at least EPSG lists identifiers) and recombine a CRS in cases where we cannot directly derive from a compound CRS?

comment:13 by Dimitar Misev, 7 years ago

Owner: changed from Peter Baumann to Bang Pham Huu
Status: reopenedassigned

comment:14 by Dimitar Misev, 7 years ago

Resolution: fixed
Status: assignedclosed

Should be closed, documentation has been updated already at http://rasdaman.org/wiki/PetascopeSubsets#SetCRSforoutputcoverage

Note: See TracTickets for help on using tickets.