ckan / ckanext-geoview

CKAN Geospatial ResourceView
MIT License
43 stars 58 forks source link

WFS doesn't work #25

Closed mattfullerton closed 6 years ago

mattfullerton commented 8 years ago

But GML from a WFS link does, e.g.

For the WFS service: http://geodienste-hamburg.de/HH_WFS_BWVI_opendata?REQUEST=GetCapabilities&SERVICE=WFS

You can get a single layer like this: http://geodienste-hamburg.de/HH_WFS_BWVI_opendata?SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&TYPENAME=verkehr_baustellen_prod&srsName=EPSG:4326

The format is then GML and not WFS.

pduchesne commented 8 years ago

I have just been playing with this WFS, and I suspect the problem is related to a peculiarity of this service (i won't say a bug) : its response to a DescribeFeatureType defines the ComplexTypes inline within the Elements. Check http://geodienste-hamburg.de/HH_WFS_BWVI_opendata?SERVICE=WFS&REQUEST=DescribeFeatureType&TYPENAME=hh_emobility&VERSION=1.1.0

the OpenLayers WFS schema parser then fails to read the feature types.

I'll see if I can find a workaround.

mattfullerton commented 8 years ago

:+1: If there's anything I can do to help let me know

gjlawran commented 8 years ago

When GeoView is given a WFS getCapabilities request URL e.g.https://openmaps.gov.bc.ca/geo/pub/WHSE_BASEMAPPING.SII_LANDSAT_ACQS_DATE_AREA_SVW/ows?service=WFS&request=GetCapabilities

The requests that GeoView makes to create the preview with the OpenLayers viewer are all WMS requests.

https://openmaps.gov.bc.ca/geo/pub/WHSE_BASEMAPPING.SII_LANDSAT_ACQS_DATE_AREA_SVW/ows?LAYERS=pub%3AWHSE_BASEMAPPING.SII_LANDSAT_ACQS_DATE_AREA_SVW&TRANSPARENT=TRUE&SERVICE=WMS&VERSION=1.1.1&REQUEST=GetMap&STYLES=&FORMAT=image%2Fpng&SRS=EPSG%3A3857&BBOX=-16280475.52625,7514065.6275,-15028131.255,8766409.89875&WIDTH=256&HEIGHT=256

However, GeoView does handle a WFS getFeature response nicely - here is an example to try with GeoJSON response.

https://openmaps.gov.bc.ca/geo/pub/ows?service=WFS&version=1.0.0&request=GetFeature&typeName=pub:WHSE_BASEMAPPING.SII_LANDSAT_ACQS_DATE_AREA_SVW&maxFeatures=100&outputFormat=application%2Fjson&srsName=epsg:4326

mattfullerton commented 7 years ago

Suggestion: drop supposed support for WFS [1] :wink:

[1] https://lists.okfn.org/pipermail/ckan-dev/2016-September/010370.html

pduchesne commented 7 years ago
yeah, I know WFS is often too complex a protocol, but it has a purpose and shouldn't be dropped. That said, the original service mentioned (from Hamburg) is no longer available, so I can't test it, but there's a fix that should close this ticket.
mattfullerton commented 7 years ago

It was a tongue in cheek suggestion. I'll try merging your fix and give it another try.

@gjlawran I think the goal would be able to view the entire endpoint and switch between features, right, like we have for WMS?

mattfullerton commented 6 years ago

Looks like WFS does work, thanks @pduchesne

If any finer/more specific bugs pop up, we can create new issue(s)

pduchesne commented 6 years ago

Thank you @mattfullerton for going through all these issues. Cheers.