Opened 3 years ago

Closed 3 years ago

#745 closed feature (fixed)

Petascope to serve GML in JPEG2000 files

Reported by: pcampalani Owned by: pcampalani
Priority: blocker Milestone: 9.0.x
Component: petascope Version: development
Keywords: gmljp2 format Cc: pbaumann, dmisev, gmerticariu
Complexity: Medium


(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:

Change History (13)

comment:1 Changed 3 years ago by pcampalani

  • Status changed from new to accepted

comment:2 Changed 3 years ago by pcampalani

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

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 Changed 3 years ago by dmisev

  • Resolution fixed deleted
  • Status changed from closed to reopened

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(
	at petascope.wcs2.extensions.GMLJP2FormatExtension.handle(
	at petascope.wcs2.extensions.MultipartFormatExtension.handle(
	at petascope.wcs2.handlers.GetCoverageHandler.handle(
	at petascope.wcs2.handlers.GetCoverageHandler.handle(
	at petascope.wcs2.extensions.AbstractProtocolExtension.handle(
	at petascope.PetascopeInterface.handleWcs2Request(
	at petascope.PetascopeInterface.handleWcsRequest(
	at petascope.PetascopeInterface.doGet(
	at petascope.PetascopeInterface.doPost(
	at javax.servlet.http.HttpServlet.service(
	at javax.servlet.http.HttpServlet.service(
	at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(
	at org.apache.catalina.core.ApplicationFilterChain.doFilter(
	at org.apache.catalina.core.StandardWrapperValve.invoke(
	at org.apache.catalina.core.StandardContextValve.invoke(
	at org.apache.catalina.core.StandardHostValve.invoke(
	at org.apache.catalina.valves.ErrorReportValve.invoke(
	at org.apache.catalina.valves.AccessLogValve.invoke(
	at org.apache.catalina.core.StandardEngineValve.invoke(
	at org.apache.catalina.connector.CoyoteAdapter.service(
	at org.apache.coyote.http11.Http11Processor.process(
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
	at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(
	at java.util.concurrent.ThreadPoolExecutor.runWorker(
	at java.util.concurrent.ThreadPoolExecutor$
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(
	at petascope.util.ras.RasUtil.executeRasqlQuery(
	at petascope.wcs2.extensions.AbstractFormatExtension.executeRasqlQuery(
	... 27 more
Caused by: org.odmg.QueryException: Unexpected internal server error.
	at rasj.odmg.RasOQLQuery.execute(
	at petascope.util.ras.RasUtil.executeRasqlQuery(
	... 29 more
 DEBUG [16:40:23] PetascopeInterface@533: Done marshalling Error Report.

comment:4 Changed 3 years ago by pcampalani

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 Changed 3 years ago by dmisev

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 Changed 3 years ago by pcampalani

But a test is marked as skipped indeed by adding its name in the known_fail file (see ./systemtest/util/ : $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 Changed 3 years ago by dmisev

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 Changed 3 years ago by dmisev

  • Priority changed from minor to blocker

comment:9 Changed 3 years ago by dmisev

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

comment:10 Changed 3 years ago by dmisev

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 Changed 3 years ago by pcampalani

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 Changed 3 years ago by pcampalani

  • Cc dmisev gmerticariu 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 Changed 3 years ago by pcampalani

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

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.