Opened 8 years ago

Closed 8 years ago

#1214 closed defect (fixed)

Rasql_should returns error if try to encode 1D and 3D in PNG, Tiff

Reported by: Bang Pham Huu Owned by: Dimitar Misev
Priority: major Milestone: 10.0
Component: rasql Version: development
Keywords: rasql query, exception, convert 1D, 3D in WCPS Cc: Dimitar Misev, Vlad Merticariu
Complexity: Medium

Description

WCPS query

for c in (eobstest) return encode( (c[ t("1950-01-01T13-0500":"1950-01-03T13-0500"), Long(35.5:37), Lat(10:15)]), "png", "nodata=0")

which translates to Rasql

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

and return an Semantic Error 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[0:2,21:24,121:131], "PNG", "nodata=0;xmin=35.5;xmax=37.0;ymin=10.0;ymax=15.0;crs=EPSG:4326") from eobstest AS c where oid(c)=46081
</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="RasdamanRequestFailed">
<ows:ExceptionText>
Error evaluating rasdaman query: 'select encode(c[0:2,21:24,121:131], "PNG", "nodata=0;xmin=35.5;xmax=37.0;ymin=10.0;ymax=15.0;crs=EPSG:4326") from eobstest AS c where oid(c)=46081
</ows:ExceptionText>
</ows:Exception>
<ows:Exception exceptionCode="RuntimeError">
<ows:ExceptionText>
org.odmg.QueryException : Unexpected internal server error.
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

should returns Invalid Request same exception as WCS

<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="InvalidRequest">
<ows:ExceptionText>
The PNG format extension only supports regularly gridded coverages with exactly two dimensions
</ows:ExceptionText>
</ows:Exception>
</ows:ExceptionReport>

Should I fix it in WCPS 1.0 or WCPS 1.5 ?

Change History (4)

comment:1 by Dimitar Misev, 8 years ago

No this should be fixed in rasql, the encode function should throw a proper exception. I think there is already a ticket about this, search around the trac.

comment:2 by Bang Pham Huu, 8 years ago

Component: petascoperasql
Keywords: rasql query convert 1D 3D in WCPS added; wcs 2.0 WCST-Exception removed
Owner: changed from Bang Pham Huu to Dimitar Misev
Status: newassigned

Agree, I've thought it should be like this, I've checked and active ticket now does not have this problem. Then, you can assign to someone to fix this in Rasql.

comment:3 by Bang Pham Huu, 8 years ago

Summary: WCPS_Should returns error if try to encode 1D and 3D in PNG, TiffRasql_should returns error if try to encode 1D and 3D in PNG, Tiff

comment:4 by Dimitar Misev, 8 years ago

Resolution: fixed
Status: assignedclosed

Ok now I get:

<ows:ExceptionReport version="2.0.0"
    xsd:schemaLocation="http://www.opengis.net/ows/2.0 http://schemas.opengis.net/ows/2.0/owsExceptionReport.xsd"
    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">
    <ows:Exception exceptionCode="SemanticError">
        <ows:ExceptionText>Error evaluating rasdaman query: 'select encode(c[0:2,21:24,121:131], "PNG", "nodata=0;xmin=35.5;xmax=37.0;ymin=10.0;ymax=15.0;crs=EPSG:4326") from eobstest AS c where oid(c)=1537</ows:ExceptionText>
    </ows:Exception>
    <ows:Exception exceptionCode="RasdamanRequestFailed">
        <ows:ExceptionText>Error evaluating rasdaman query: 'select encode(c[0:2,21:24,121:131], "PNG", "nodata=0;xmin=35.5;xmax=37.0;ymin=10.0;ymax=15.0;crs=EPSG:4326") from eobstest AS c where oid(c)=1537</ows:ExceptionText>
    </ows:Exception>
    <ows:Exception exceptionCode="RuntimeError">
        <ows:ExceptionText>org.odmg.QueryException : Execution error 381 in line 1, column 8, near token encode: Error in convertor of the selected data exchange format.</ows:ExceptionText>
    </ows:Exception>

</ows:ExceptionReport>

and the rasdaman log says:

[ERROR] - 23/06/2016 15:07:23.201274, gdal.cc:281: only 2D data can be encoded with GDAL.
Error number: 381 Token: encode Line: 1 Column: 8
Note: See TracTickets for help on using tickets.