istSOS / istsos2

Easily manage your sensor network and distribute your data in a standard way
Other
16 stars 31 forks source link

gml:boundedBy issue with BBOX definition #21

Open ninsbl opened 7 years ago

ninsbl commented 7 years ago

When we (me and @pesekon2) tried using the sos4R client (https://cran.r-project.org/web/packages/sos4R/index.html) to fetch data from istSOS we ran into issues with spatial data of the response. In particular, bounding box of the offerings was returned as NULL.

When looking at the response here: http://istsos.org/istsos/demo?request=getCapabilities&section=contents&service=SOS it seems that the bounding box is given differently from GML definition of envelope (www.datypic.com/sc/niem21/e-gml32_boundedBy.html). In fact, the response does not seem to be correct as only one coordinate pair is given (not both upper and lower corner). A second point and maybe the proper XML tags seem to be missing...

In comparison, http://sensorweb.demo.52north.org/52n-sos-webapp/service?service=SOS&request=GetCapabilities gives the BBOX exactly as in the GML definition... Maybe a bug?

ninsbl commented 7 years ago

Now I tested also with OWSlib, and OWSlib also returns neither BoundingBox nor CRS...

ninsbl commented 7 years ago

Seems to affect also the QGIS SOS client, which does not use OWSlib I think...

ninsbl commented 7 years ago

Seems to affect only SOS 1.0.0 https://github.com/istSOS/istsos2/blob/d3f90ac6a27687dd5903e2ed7fe2628a6e95745b/istsoslib/renderers/GCresponseRender.py#L137 as the bpoundedBy definition for SOS 2.0 appears to be correct https://github.com/istSOS/istsos2/blob/d3f90ac6a27687dd5903e2ed7fe2628a6e95745b/istsoslib/renderers/GCresponseRender.py#L408

@pesekon2 do you think you could work on this and create a PR?

ninsbl commented 7 years ago

The bug can also be here: https://github.com/istSOS/istsos2/blob/31ae03f0c81dd438106b3336696b65883dc9e2db/istsoslib/responders/GCresponse.py#L276

ninsbl commented 7 years ago

Actually, in:

https://github.com/istSOS/istsos2/blob/31ae03f0c81dd438106b3336696b65883dc9e2db/istsoslib/responders/GCresponse.py#L286

a full GML 3 Envelope could be build like this: SELECT ST_AsGML(3, ST_Collect(u.geom), 15, 32) as ext

pesekon2 commented 7 years ago

The problem is that ofl in GCresponseRender has just a method boundedBy and boundedBy nor ofl doesn't contain anything like lowerX.

For me, the best way seems to involve here also this part from version 2.0.0 somehow. But before I start something like this, I would like to know from istSOS developers whether is it acceptable way and whether it can't destroy something.

PS: Is there any way to activate the debug level when quering through html request?