[GeoJSON] Content-type

Jukka Rahkonen jukka.rahkonen at latuviitta.fi
Sun Nov 3 12:50:54 PST 2013


Hi,

Erik Wilde wrote:
> hello jukka.
>
> On 2013-11-03, 10:20 , Jukka Rahkonen wrote:
>> I can see that my WMS server advertises one image output option with
>> MIME
>> type image/png; mode=8bit and my WFS server delivers either text/xml;
>> subtype="gml/3.1.1" or text/xml; subtype="gml/2.1.2"
>> Could it be application/json; type=geojson or something like that?
>
> i may read you wrong here, but it seems to me that you're assuming that
> using type or subtype media type parameters on media types just works.
> it doesn't, there is "standard media type parameter" you can just use. i
> all depends on the media type. application/json does not define any
> parameters: http://tools.ietf.org/html/rfc4627#section-6

I don't know enough about MIME things for making such assumptions. I just
checked how servers which I know are behaving in situatios which feel
somehow analogous for me. That is, both GML2 and GML3 are of MIME type
text/xml but WFS server differentiate them with the "subtype" parameter.
The same with 8- or 24-bit png images, they both are of MIME image/png
type but WMS servers seem to make them different with "mode" or "subtype"
parameters.

> (btw, i am pretty sure that your WMS server is not behaving correctly
> here, because the parameters for these other media types in all
> likelihood do not exist as well, but i did not check.)

I believe you. I also checked that all major open source WMS servers are
using those parameters: Mapserver http://demo.mapserver.org/cgi-bin/wms,
Geoserver http://demo.opengeo.org/geoserver/wms and deegree
http://demo.deegree.org/deegree-wms/services

-Jukka Rahkonen-

> this means that you cannot use any parameters, and i certainly would not
> advise to change GeoJSON in a way that pretends there is a media type
> parameter, when there isn't. with RFC 4627 being revised, maybe it's a
> good time to propose that there could be a parameter for exposing
> profiles/types, though.
>
> http://www.ietf.org/mail-archive/web/apps-discuss/current/msg10708.html
>
> cheers,
>
> dret.
>
> --
> erik wilde | mailto:dret at berkeley.edu  -  tel:+1-510-2061079 |
>             | UC Berkeley  -  School of Information (ISchool) |
>             | http://dret.net/netdret http://twitter.com/dret |
>





More information about the GeoJSON mailing list