Opened 3 years ago

Closed 3 years ago

#2512 closed defect (fixed)

WCPS parser error with band name .Hillshade

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 (last modified by Bang Pham Huu)

WCPS parser thinks bandname .Hillshade is .Hi and it has the error

coverageid=test&format=application/netcdf&rangesubset=DEM,Hillshade&request=GetCoverage&service=WCS&subset=ansi("2011-01-01T00:00:00.000Z")&version=2.0.1'

which generated this WCPS query 

{{{
for c in (test) return encode({ DEM: c[ansi("2011-01-01T00:00:00.000Z")].DEM; Hillshade: c[ansi("2011-01-01T00:00:00.000Z")].Hillshade }, "application/netcdf", "")
}}}


Reason: <![CDATA[A parsing error occurred at line '1', column '189'. Offending token is '.Hi'. Reason: extraneous input '.Hi' expecting {AND, '/', '.', '=', '>', '>=', IS, '[', '<', '<=', '-', '*', '!=', OR, OVERLAY, '+', '}', ';', XOR}.]]>
[2021-11-17 14:50:46] Caught an exception: <![CDATA[A parsing error occurred at line '1', column '189'. Offending token is '.Hi'. Reason: extraneous input '.Hi' expecting {AND, '/', '.', '=', '>', '>=', IS, '[', '<', '<=', '-', '*', '!=', OR, OVERLAY, '+', '}', ';', XOR}.]]>

also in petascope.wcps.parser.WcpsTranslator.getTranslationTree(WcpsTranslator.java:90)

it should throw the WCPS query which ANTLR4 cannot parse.

Change History (2)

comment:1 by Bang Pham Huu, 3 years ago

Description: modified (diff)

comment:2 by Bang Pham Huu, 3 years ago

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