#1260 closed defect (fixed)

Petascope cannot encode coverages that have a CRS containing a ' " ' character (WCST_Import also).

Reported by: mdumitru Owned by: vmerticariu
Priority: major Milestone: 10.0
Component: petascope Version: development
Keywords: Cc: bphamhuu
Complexity: Medium

Description (last modified by bphamhuu)

Due to the way it calls rasdaman, the '"' is interpreted as the end of the query and because of it, it fails.
See in wcps/server/core/EncodeDataExpr.java, the last reference to result.
@Bang please check if this is the case in WCPS 1.5 as well.

Bang: update for better understanding:

So, WCPS 1.5 don't have "" with time Axis-label.

here is an example: WCPS 1.5

for c in (time3d) return encode(c[Lat(-37.5:-35.5), Long(148:149), time("1950-01-02")], "tiff")

Rasql query:

SELECT encode(c[80:179,96:295,1], "GTiff" , 
FROM time3d AS c

WCPS 1.0 have this problem with Rasql:

select encode((c) [80:180,96:296,1], "PNG", 
from time3d AS c where oid(c)=117761

Change History (8)

comment:1 Changed 19 months ago by bphamhuu

@Alex: sorry, I did not understand correctly your request. I've tried to get an example with CRS containing (") character, such as "eobstest"

e.g, in time axis, it has


and in WCPS 1.0, I can encode this coverage normally

for c in (eobstest) return encode(extend(c[t(0)], { Long(-45:90),  Lat(5:80) } ), "tiff")

returns Rasql

select encode(extend((c) [0,*:*,*:*],[-140:130,-9:141]), 
 from eobstest AS c where oid(c)=1537

and the coverage without problem.

I've also checked in the toRasQL of wcps/server/core/EncodeDataExpr.java and could not see the error from CRS containing the (") character as in time axis above.

comment:2 Changed 19 months ago by vmerticariu

To test it in WCPS 1.5, try to import a coverage that has the following crs for the time axis:


Then try a WCPS 1.5 query on that coverage (e.g. selecting a time slice), and check if that succeeds (check the rasql).

comment:3 Changed 19 months ago by mdumitru

You need to select something 3D so that you can get the whole CRS including the crs with the " character.

comment:4 Changed 19 months ago by bphamhuu

Ok, I got the idea, thanks. But I could not use WCST_Import to insert a test coverage with the time axis and label as Vlad's suggestion.

"options": {           
	      "time_start": "1950-01-01T00:00:00",
	      "time_format": "auto",
	      "time_step": "1 seconds",
	      "tiling": "ALIGNED [0:1, 0:1, 0:2]" 

It will returns error from WCST_Import.

RUNTIME ERROR: Unsupported time CRS AnsiDate?axis-label="time"

Then, I change to

 "time_crs": "http://localhost:8080/def/crs/OGC/0/AnsiDate?axis-label='d'"

it still return error

RUNTIME ERROR: Unsupported time CRS AnsiDate?axis-label='d'

So, how is the correct way to using axis-label in recipe? thanks.

comment:5 Changed 17 months ago by bphamhuu

Ok, answer by myself (after Vlad also tried to help). The problem when I cannot use axis-label="time" when use wcst_import is

in time_util.py, it check like this

        if self.CRS_CODE_ANSI_DATE == self.time_crs_code:
            return self.to_ansi()
        elif self.CRS_CODE_UNIX_TIME == self.time_crs_code:
            return self.to_unix()
            return self.to_unknown()

then of course if in recipe use not only "AnsiDate?" but also "AnsiDate??axis-label=\"time\"", it will return to self.to_unknown() and throw exception "Unsupported time CRS AnsiDate??axis-label="time"". Then now, I can check the behaviour as Alex requested.

comment:6 Changed 17 months ago by bphamhuu

  • Summary changed from Petascope cannot encode coverages that have a CRS containing a ' " ' character to Petascope cannot encode coverages that have a CRS containing a ' " ' character (WCST_Import also).

comment:7 Changed 17 months ago by bphamhuu

  • Description modified (diff)

comment:8 Changed 16 months ago by bphamhuu

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

close as patch was accepted, thanks.

Note: See TracTickets for help on using tickets.