Opened 3 years ago

Closed 3 years ago

#2482 closed defect (fixed)

petascope - error with parsing uom label for Time Axis from https SECORE

Reported by: Bang Pham Huu Owned by: Bang Pham Huu
Priority: major Milestone: 10.0
Component: petascope Version: 9.8
Keywords: Cc: Dimitar Misev, Vlad Merticariu, ocampos
Complexity: Medium

Description

In petascope CrsUtil.java it has this code

// UoM attribute can be either a String or as well a dereferenced definition (URL)
if (!uomAtt.getValue().contains(HTTP_PREFIX)) {
    uomName = uomAtt.getValue().split(" ")[0]; // UoM is meant as one word only
} 

which will not work with SECORE URL with https like secore_urls=https://ows.rasdaman.org/def is set in petascope.properties`.

Because, petascope will only check for http:// but not with https:// and it sets axis uom for e.g. AnsiDate CRS with https://ows.rasdaman.org/def//uom/UCUM/0/d.

This causes problem in petascope for converting time uom in TimeUtil.java

  INFO [2021-07-30 16:16:11] PetascopeController@164: Received request: COVERAGEID=AER_ASO_3826&REQUEST=DescribeCoverage&SERVICE=WCS&VERSION=2.0.1
 ERROR [2021-07-30 16:16:11] ExceptionUtil@40: Catched an exception 
petascope.exceptions.PetascopeException: Unsupported temporal Unit of Measure [https://ows.rasdaman.org/def//uom/UCUM/0/d].
	at petascope.util.TimeUtil.getMillis(TimeUtil.java:361)
	at petascope.util.TimeUtil.getMillis(TimeUtil.java:283)
	at petascope.util.TimeUtil.valueToISODateTime(TimeUtil.java:300)
	at petascope.wcps.metadata.model.Axis.getLowerGeoBoundRepresentation(Axis.java:193)
	at petascope.core.gml.cis10.GMLCoreCIS10Builder.buildEnvelope(GMLCoreCIS10Builder.java:96)
	at petascope.core.gml.cis10.GMLCoreCIS10Builder.buildBoundedBy(GMLCoreCIS10Builder.java:115)
	at petascope.core.gml.cis10.GMLCoreCIS10Builder.build(GMLCoreCIS10Builder.java:345)
	at petascope.core.gml.GMLDescribeCoverageBuilder.buildGMLCISDescribeCoverage(GMLDescribeCoverageBuilder.java:93)
	at petascope.core.gml.GMLDescribeCoverageBuilder.buildWCSDescribeCoverageResult(GMLDescribeCoverageBuilder.java:120)

Change History (1)

comment:1 by Bang Pham Huu, 3 years ago

Resolution: fixed
Status: assignedclosed
Note: See TracTickets for help on using tickets.