Opened 11 years ago

Closed 10 years ago

#745 closed feature (fixed)

Petascope to serve GML in JPEG2000 files

Reported by: Piero Campalani Owned by: Piero Campalani
Priority: blocker Milestone: 9.0.x
Component: petascope Version: development
Keywords: gmljp2 format Cc: Peter Baumann, Dimitar Misev, George Merticariu
Complexity: Medium

Description

(depends on ticket #744)

Now that the GMLJP2 OGC standard is on the way to be an official standard, Petascope should provide means to retrieve binary images with GML content following the standard.

Before submitting a patch, the way to resolve the MIME-type clash with simple JPEG2000 formats should be addressed (it's currently the same, by standard).

One way, WCS-wise, might be to use the mediaType parameter to a GetCoverage request so to distinguish from JPEG2000 and JPEG2000+GML output formats. Its value, by WCS 2.0 standard, shall be fixed to multipart/related: this could make sense, although ideally a new WCS extension with additional tuning parameters (like with the GeoTiff extension)is probably the definitive solution.

OGC GMLJP2 page: http://www.opengeospatial.org/standards/gmljp2

Change History (13)

comment:1 by Piero Campalani, 11 years ago

Status: newaccepted

comment:2 by Piero Campalani, 11 years ago

Resolution: fixed
Status: acceptedclosed

Enabled in changeset:3e95f40 : Petascope serving GML in JPEG2000 if format is set to the MIME of JPEG2000 and mediaType parameter is set to multipart/related (requires GDAL ≥ 1.10).

comment:3 by Dimitar Misev, 11 years ago

Resolution: fixed
Status: closedreopened

I have

$ gdalinfo --version
GDAL 1.9.0, released 2011/12/29

but the systemtest seems to be still running the new GMLJP2 tests and fails:

 ERROR [16:40:23] PetascopeInterface@481: Error stack trace:
RasdamanRequestFailed: Error executing rasql query: Error evaluating rasdaman query: 'select encode(c, "JP2OpenJPEG", "CODEC=jp2;xmin=111.975;xmax=156.275;ymin=-44.525;ymax=-8.975;crs=EPSG:4326;config=GMLJP2OVERRIDE /home/dimitar/apps/apache-tomcat/temp/mean_summer_airtemp_jp2openjpeg7051803050539190448.tmp") from mean_summer_airtemp AS c where oid(c)=75265
	at petascope.wcs2.extensions.AbstractFormatExtension.executeRasqlQuery(AbstractFormatExtension.java:289)
	at petascope.wcs2.extensions.GMLJP2FormatExtension.handle(GMLJP2FormatExtension.java:147)
	at petascope.wcs2.extensions.MultipartFormatExtension.handle(MultipartFormatExtension.java:59)
	at petascope.wcs2.handlers.GetCoverageHandler.handle(GetCoverageHandler.java:53)
	at petascope.wcs2.handlers.GetCoverageHandler.handle(GetCoverageHandler.java:38)
	at petascope.wcs2.extensions.AbstractProtocolExtension.handle(AbstractProtocolExtension.java:70)
	at petascope.PetascopeInterface.handleWcs2Request(PetascopeInterface.java:634)
	at petascope.PetascopeInterface.handleWcsRequest(PetascopeInterface.java:564)
	at petascope.PetascopeInterface.doGet(PetascopeInterface.java:416)
	at petascope.PetascopeInterface.doPost(PetascopeInterface.java:242)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:641)
	at javax.servlet.http.HttpServlet.service(HttpServlet.java:722)
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:304)
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208)
	at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:240)
	at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:203)
	at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:164)
	at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:108)
	at org.apache.catalina.valves.AccessLogValve.invoke(AccessLogValve.java:558)
	at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:118)
	at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:379)
	at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:242)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:259)
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:237)
	at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:281)
	at java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1145)
	at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:615)
	at java.lang.Thread.run(Thread.java:724)
Caused by: RasdamanRequestFailed: Error evaluating rasdaman query: 'select encode(c, "JP2OpenJPEG", "CODEC=jp2;xmin=111.975;xmax=156.275;ymin=-44.525;ymax=-8.975;crs=EPSG:4326;config=GMLJP2OVERRIDE /home/dimitar/apps/apache-tomcat/temp/mean_summer_airtemp_jp2openjpeg7051803050539190448.tmp") from mean_summer_airtemp AS c where oid(c)=75265
	at petascope.util.ras.RasUtil.executeRasqlQuery(RasUtil.java:143)
	at petascope.util.ras.RasUtil.executeRasqlQuery(RasUtil.java:78)
	at petascope.wcs2.extensions.AbstractFormatExtension.executeRasqlQuery(AbstractFormatExtension.java:286)
	... 27 more
Caused by: org.odmg.QueryException: Unexpected internal server error.
	at rasj.odmg.RasOQLQuery.execute(RasOQLQuery.java:259)
	at petascope.util.ras.RasUtil.executeRasqlQuery(RasUtil.java:136)
	... 29 more
 DEBUG [16:40:23] PetascopeInterface@533: Done marshalling Error Report.

comment:4 by Piero Campalani, 11 years ago

hi Dimitar,
thanks for spotting this, at least the rasdaman conversion test gets skipped right?
We did not discuss about how to dynamically skip WC*S tests: I was thinking to dynamically append the line with the test name to the known_fail file if GDAL version is not >1.10.

comment:5 by Dimitar Misev, 11 years ago

You could just mark them as skipped within the test script, I think it's overcomplicating to modify the known_fails (it will appear in 'git status' then for example).

comment:6 by Piero Campalani, 11 years ago

But a test is marked as skipped indeed by adding its name in the known_fail file (see ./systemtest/util/common.sh:update_result() : $known_fail is set if test name is parsed in that file).
Did you just forget this or do you have something different in mind..?

comment:7 by Dimitar Misev, 11 years ago

Yes I know, in any case that doesn't fit here:

  • those tests are not known_fails, they just can't be executed on my machine
  • modifying the known_fails dynamically is not good, because it is a versioned file

comment:8 by Dimitar Misev, 11 years ago

Priority: minorblocker

comment:9 by Dimitar Misev, 11 years ago

I raise priority, it's blocking for the continuous integration service.

comment:10 by Dimitar Misev, 11 years ago

Piero I gave my opinion, but of course you can implement it in the way that seems most fit to you, it's no problem with me :) But we need to fix it.

comment:11 by Piero Campalani, 11 years ago

Got it, this ticket just slipped through as there were urgent fixes to be done on WCS extensions, but I'm done with those now and I see this affects the integration service so I underevaluated the priority. !

comment:12 by Piero Campalani, 11 years ago

Cc: Dimitar Misev George Merticariu added

Patch submitted: Dimitar (and/or George?), can you please verify that there is no issue in the integration service anymore and directly close the ticket in case? thank you.

comment:13 by Piero Campalani, 10 years ago

Resolution: fixed
Status: reopenedclosed

GMLJP2 WCS tests to be automatically skipped from changeset:e6cf821.
I know Dimitar has tested this fix already, so I can close this ticket.

I opted for Dimitar's solution: known_fail is not touched, and the WCS tests which ask for image/jp2 + multipart/related media type are tested against GDAL version before being executed.

Note: See TracTickets for help on using tickets.