[OSM-dev] RFC: OSM data format MIME types

Jochen Topf jochen at remote.org
Thu Sep 15 13:07:47 UTC 2016


On Wed, Sep 14, 2016 at 08:55:16PM -0700, Paul Norman wrote:
> I'm planning on registering MIME types for OSM formats in the vendor tree
> and could use feedback. If you're unfamiliar with registering MIME types,
> https://github.com/mapbox/vector-tile-spec/issues/48 is a reasonable
> overview for a registration that took place with a different format.
> 
> 
> The obvious type for OSM XML is application/vnd.osm+xml, but there are a few
> unanswered questions

Why not application/vns.openstreetmap... ? Longer, but much easier to
understand and search for.

> - Is .osc a different type? I'm think yes. Tools that parse one don't
> normally accept the other in its place, they normally have different file
> suffixes, and the top-level XML elements are different.
> 
> - Is osc returned from the server a different type from what is uploaded?
> I'm inclined towards no. This is more a matter of selection of valid
> identifiers.
> 
> - Where does history fit in
> 
> I'm inclined towards
> 
> - application/vnd.osm+xml for OSM XML
> 
> - application/vnd.osm.osc+xml for OsmChange XML
> 
> - application/vnd.osm.osh+xml for historical XML
> 
> - application/vnd.osm.osmpbf for current data PBFs. pbf is not a MIME
> suffix.
> 
> - application/vnd.osm.oshpbf for historical PBFs.
> 
> - application/vnd.osm.o5m
> 
> - application/vnd.osm.o5c

These all more or less are the file suffixes used. How about something
like

application/vnd.openstreetmap.data+xml
application/vnd.openstreetmap.data.pbf
application/vnd.openstreetmap.history.pbf
application/vnd.openstreetmap.changes+xml

Not sure myself. The naming and file formats are a mess as they are. :-(

> I'm not sure where to slot changeset data into this. Changeset data can be
> present in an OSM XML file alongside other data (e.g. with planet dumps) or
> standalone.

Jochen
-- 
Jochen Topf  jochen at remote.org  http://www.jochentopf.com/  +49-351-31778688



More information about the dev mailing list