Hexagon Geospatial
MENU

WebGIS

Need a push in the right direction when configuring WebMap, Portal or SDI services? Looking for hints and tips, or just looking for Ideas and information? The WebGIS discussion board is where you start those discussions, connect and share information.
Showing results for 
Search instead for 
Do you mean 
Reply
Frequent Contributor
Posts: 119
Registered: ‎10-13-2015
Accepted Solution

WFS Geojson Output

[ Edited ]

Hi,

We are testing the output GeoJSON WFS services but the service returns an error. outputFormat is not correct.
Any examples or documentation?
IIS Mime types?

 

http://XXXXXXX/WFS/service.svc/get?VERSION=2.0.0&outputFormat=application/vnd.geo+json&SERVICE=WFS&REQUEST=GetFeature&TYPENAMES=gmgml:L%C3%ADmit_de_barri&SRSName=EPSG:25831&Filter=%3CFilter%20xmlns=%22http://www.opengis.net/fes/2.0%22%3E%3CBBOX%3E%3CValueReference%3EGEOMETRIA%3C/ValueReference%3E%3Cgml%3AEn...

 

 

 

Technical Evangelist
Posts: 1,121
Registered: ‎09-11-2015

Re: WFS Geojson Output

[ Edited ]

Hi Marti,

 

I found out, that you must use POST request instead of GET. You will need Fiddler or similar tool to compose it. Sample POST body:

 

<wfs:GetFeature version="2.0.0" 
service="WFS" outputFormat="application/vnd.geo+json"
count="4000" xmlns:wfs="http://www.opengis.net/wfs/2.0"
xmlns:gmgml="http://www.intergraph.com/geomedia/gml"> <wfs:Query typeNames="gmgml:States" srsName="EPSG:3857"> </wfs:Query> </wfs:GetFeature>

Jan

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Staff
Posts: 294
Registered: ‎11-05-2015

Re: WFS Geojson Output

Remember the HTTP URL encoding rules for the query part. (see https://tools.ietf.org/html/rfc3986 and https://www.w3.org/TR/html401/interact/forms.html#h-17.13.4.1)

The plus sign in a URL is a reserved character and actually denotes a space in the query part, so to have a literal plus sign in the request, you need to encode it using the percent notation:

http://demo.hexagongeospatial.com/GWM_WFS_NonTransactional/service.svc/get?request=getfeature&Servic...

Highlighted
Technical Evangelist
Posts: 1,121
Registered: ‎09-11-2015

Re: WFS Geojson Output

Ahh, good one. I didn't think about that Smiley Embarassed

Jan Neumann
Post Sales Engineer Web Applications
Hexagon Geospatial

Do you need immediate support?
If you encounter a critical issue and need immediate assistance please submit a Service Request through our Support Portal.