Opened 9 years ago
Closed 9 years ago
#1260 closed defect (fixed)
Petascope cannot encode coverages that have a CRS containing a ' " ' character (WCST_Import also).
Reported by: | Alex Dumitru | Owned by: | Vlad Merticariu |
---|---|---|---|
Priority: | major | Milestone: | 10.0 |
Component: | petascope | Version: | development |
Keywords: | Cc: | Bang Pham Huu | |
Complexity: | Medium |
Description (last modified by )
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" , "xmin=147.2;xmax=152.32;ymin=-39.66;ymax=-34.54;crs=OGC:AnsiDate?axis-label=time") FROM time3d AS c
WCPS 1.0 have this problem with Rasql:
select encode((c) [80:180,96:296,1], "PNG", "xmin=148.0;xmax=149.0;ymin=-37.5;ymax=-35.5;crs=OGC:AnsiDate?axis-label="time"") from time3d AS c where oid(c)=117761
Change History (8)
comment:1 by , 9 years ago
comment:2 by , 9 years ago
To test it in WCPS 1.5, try to import a coverage that has the following crs for the time axis:
http://localhost:8080/def/crs/OGC/0/AnsiDate?axis-label="time"
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 by , 9 years ago
You need to select something 3D so that you can get the whole CRS including the crs with the " character.
comment:4 by , 9 years ago
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_crs": "http://localhost:8080/def/crs/OGC/0/AnsiDate?axis-label=\"time\"", "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 by , 9 years ago
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() else: 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 by , 9 years ago
Summary: | Petascope cannot encode coverages that have a CRS containing a ' " ' character → Petascope cannot encode coverages that have a CRS containing a ' " ' character (WCST_Import also). |
---|
comment:7 by , 9 years ago
Description: | modified (diff) |
---|
comment:8 by , 9 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
close as patch was accepted, thanks.
@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
returns Rasql
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.