[mapserver-users] WFS OUTPUTFORMAT and application/json

Seth G sethg at geographika.co.uk
Wed Dec 19 14:27:49 PST 2018


Hi list,

Has anyone run into the following issue with using "application/json" in an OUTPUTFORMAT NAME as follows?

  OUTPUTFORMAT
    NAME "application/json"
    DRIVER "OGR/GEOJSON"
    MIMETYPE "application/json; subtype=geojson"
    FORMATOPTION "FORM=SIMPLE"
    FORMATOPTION "STORAGE=memory"
  END  

Then a request such as below:

http://localhost/mapserver/?&SERVICE=WFS&REQUEST=GetFeature&VERSION=1.1.0&OUTPUTFORMAT=application/json&TYPENAME=layer&SRSNAME=EPSG:3857

Causes the following error:

msWFSGetFeature(): WFS server error. OUTPUTFORMAT 'application/json' does not have IMAGEMODE FEATURE, and is not permitted for WFS output.

Adding a IMAGEMODE FEATURE (or RGBA) doesn't resolve the issue. 
I thought it may have been an issue with the slash in the NAME, but this works in other cases. Changing NAME to "geojson" also works fine, but I'm wondering why this occurs. GeoServer and TinyOWS both use "application/json" so it would be good if it worked for MapServer also. 


Seth


--
web:http://geographika.co.uk
twitter: @geographika



More information about the MapServer-users mailing list