Opened 3 years ago

Closed 5 months ago

#721 closed defect (fixed)

WCPS coverage information does not update the CRS on slices

Reported by: pcampalani Owned by: bphamhuu
Priority: major Milestone: 9.3
Component: petascope Version: development
Keywords: dynamic coverage singleton update Cc: vmerticariu, mdumitru
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 follow-up: Changed 3 years ago by 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).

comment:2 Changed 22 months ago by dmisev

  • Cc vmerticariu mdumitru added
  • Milestone changed from 9.1 to 9.2

comment:3 Changed 16 months ago by pbaumann

  • Milestone changed from 9.2 to Future

to be fixed with WCPS 2.0, spec under work.

comment:4 in reply to: ↑ 1 Changed 8 months ago by bphamhuu

  • Milestone changed from Future to 9.3
  • Resolution set to fixed
  • Status changed from new to closed

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 follow-up: Changed 8 months ago by pbaumann

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

comment:6 in reply to: ↑ 5 Changed 8 months ago by bphamhuu

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 follow-up: Changed 8 months ago by pbaumann

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

comment:8 in reply to: ↑ 7 Changed 8 months ago by bphamhuu

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 Changed 8 months ago by pbaumann

  • Resolution fixed deleted
  • Status changed from closed to reopened

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

comment:10 Changed 7 months ago by dmisev

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 Changed 7 months ago by bphamhuu

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

comment:12 Changed 7 months ago by pbaumann

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 Changed 5 months ago by dmisev

  • Owner changed from pbaumann to bphamhuu
  • Status changed from reopened to assigned

comment:14 Changed 5 months ago by dmisev

  • Resolution set to fixed
  • Status changed from assigned to closed

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

Note: See TracTickets for help on using tickets.