Opened 11 years ago

Last modified 11 years ago

#422 closed defect

RasUtil methods don't handle result of metadata queries — at Version 9

Reported by: Dirk Daems Owned by: abeccati
Priority: major Milestone:
Component: petascope Version: 8.4
Keywords: Cc: Alireza
Complexity: Medium

Description (last modified by Dimitar Misev)

The method executeWcpsQuery of the RasUtil class fails when executing a WCPS query which only retrieves metadata. E.g. in case of query:

for c in (Biopar_Africa_LAI) return crsSet(c)

It will try to execute RASQL query

t:CRS:1, x:http://www.opengis.net/def/crs/EPSG/0/4326 CRS:1, y:http://www.opengis.net/def/crs/EPSG/0/4326 CRS:1

which of course fails.

The PetascopeInterface.handleProcessCoverages(..) method handles this, and this handling should be factored into RasUtil.

Change History (10)

comment:1 by Dimitar Misev, 11 years ago

Perhaps it has something to do with the fact that your data is 3D? Here it executes fine

for c in (mean_summer_airtemp) return crsSet(c)

and I get result

x:http://www.opengis.net/def/crs/EPSG/0/4326 CRS:1, y:http://www.opengis.net/def/crs/EPSG/0/4326 CRS:1

comment:2 by Dirk Daems, 11 years ago

I tried a 2D coverage, but the error remains. Did you also try using the RasUtil executeWcpsQuery method? When I execute it using the Petascope servlets, the queries also run fine.

comment:3 by Dimitar Misev, 11 years ago

Ah ok, I didn't notice it's specific to RasUtil. I'm just guessing you didn't initialize something, can you post your code?

comment:4 by Dimitar Misev, 11 years ago

Did you initialize ConfigManager with

ConfigManager.getInstance(String confDir)

where confDir is absolute path to the dir containing petascope.properties and log4j.properties?

by Dirk Daems, 11 years ago

Attachment: WcpsTest.java added

comment:5 by Dirk Daems, 11 years ago

Yes, the ConfigManager is initialized. See attached file. The query which is commented executes normally.

comment:6 by Dimitar Misev, 11 years ago

Have a look at PetascopeInterface.handleProcessCoverages the handling is somewhat more involved in order to take care of metadata results. Let me know if this fixes your problem.

comment:7 by Dirk Daems, 11 years ago

Indeed, the implementation of the PetascopeInterface.handleProcessCoverages takes care of WCPS queries which don't actually end up in a RASQL query. However, a working utility method / API to execute WCPS queries would be useful.

comment:8 by Dimitar Misev, 11 years ago

Summary: RasUtil: method executeWcpsQuery fails when executing WCPS queries which only retrieve metadataRasUtil methods don't handle result of metadata queries

Yes definitely, I'll change the ticket subject to match this.

comment:9 by Dimitar Misev, 11 years ago

Description: modified (diff)
Note: See TracTickets for help on using tickets.