Opened 8 years ago

Closed 8 years ago

#1211 closed defect (fixed)

WCPS1.5_Semantic Exception when slicing at geo-referenced axis

Reported by: Bang Pham Huu Owned by:
Priority: major Milestone: 10.0
Component: petascope Version: development
Keywords: WCPS 2.0, symantic error, symantic exception Cc: Dimitar Misev, Vlad Merticariu, Alex Dumitru
Complexity: Medium

Description

a new test with WCPS query which subset at t() and Long(35.5:35.5)

for c in (eobstest)
return encode( (c[ t("1950-01-02"), 
Long(35.5:35.5), Lat(10:15)]), 
"tiff", "nodata=0")

which is translated to Rasql by WCPS 2.0

SELECT encode( ( c[1,21,121:130] ) , "GTiff" ,
 "nodata=0;xmin=25.0;xmax=75.5;ymin=-40.5;ymax=75.5;crs=EPSG:4326") FROM eobstest AS c

It will throw an exception

<ows:ExceptionReport xmlns:ows="http://www.opengis.net/ows/2.0" xmlns:xsd="http://www.w3.org/2001/XMLSchema-instance" xmlns:xlink="http://www.w3.org/1999/xlink" version="2.0.0" xsd:schemaLocation="http://www.opengis.net/ows/2.0 http://schemas.opengis.net/ows/2.0/owsExceptionReport.xsd">
<ows:Exception exceptionCode="SemanticError">
<ows:ExceptionText>
Error evaluating rasdaman query: 'SELECT encode( ( c[1,20,121:130] ) , "GTiff" , "nodata=0;xmin=25.0;xmax=75.5;ymin=-40.5;ymax=75.5;crs=EPSG:4326") FROM eobstest AS c
</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="RasdamanRequestFailed">
<ows:ExceptionText>
Error evaluating rasdaman query: 'SELECT encode( ( c[1,20,121:130] ) , "GTiff" , "nodata=0;xmin=25.0;xmax=75.5;ymin=-40.5;ymax=75.5;crs=EPSG:4326") FROM eobstest AS c
</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="RuntimeError">
<ows:ExceptionText>
org.odmg.QueryException : Unexpected internal server error.
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

while this is translated Rasql by WCPS 1.0 and returns a coverage

select encode(c[1,21:21,121:131], "GTiff",
"nodata=0;xmin=35.5;xmax=35.5;ymin=10.0;ymax=15.0;crs=EPSG:4326") from eobstest AS c where oid(c)=46081

I think this is problem with convert 1 D to tiff but not sure why WCPS 1.0 can run normally and WPCS 2.0 returns exception?

Change History (7)

comment:1 by Dimitar Misev, 8 years ago

The WCPS 1 subset is correct 2D:

c[1,21:21,121:131]

WCPS 2 is 1D and is not correct as in the WCPS request there's only slicing on t:

c[1,21,121:130]

comment:2 by Vlad Merticariu, 8 years ago

Why is c[1, 21:21, 121:131] considered 2D (as the result is just 1 line)? Is this a convention?

comment:3 by Dimitar Misev, 8 years ago

because 21:21 is a trim not a slice. So the result is of size 1x11, not just 11. Trimming preserves the axis in the result, slicing removes it.

Last edited 8 years ago by Dimitar Misev (previous) (diff)

comment:4 by Bang Pham Huu, 8 years ago

so in this case, keep it same as WCPS 1.0 for consistence as if Vlad has no objection?

comment:5 by Dimitar Misev, 8 years ago

Yes this should be fixed in WCPS 1.5 (let's call this 1.5 btw, not 2.0).

comment:6 by Bang Pham Huu, 8 years ago

Summary: WCPS2.0_Semantic Exception when slicing at geo-referenced axisWCPS1.5_Semantic Exception when slicing at geo-referenced axis

comment:7 by Bang Pham Huu, 8 years ago

Resolution: fixed
Status: newclosed

Patch was accepted, close ticket.

Note: See TracTickets for help on using tickets.