stac_types/
mime.rs

1//! [Media Types](https://en.wikipedia.org/wiki/Media_type) are a key element
2//! that enables STAC to be a rich source of information for clients.
3//!
4//! The best practice is to use as specific of a media type as is possible (so
5//! if a file is a GeoJSON then don't use a JSON media type), and to use
6//! [registered](https://www.iana.org/assignments/media-types/media-types.xhtml)
7//! IANA types as much as possible.  The following table lists types that
8//! commonly show up in STAC assets.
9
10/// GeoTIFF with standardized georeferencing metadata
11#[deprecated(since = "0.9.0", note = "Prefer IMAGE_GEOTIFF")]
12pub const GEOTIFF: &str = "image/tiff; application=geotiff";
13
14/// GeoTIFF with standardized georeferencing metadata
15pub const IMAGE_GEOTIFF: &str = "image/tiff; application=geotiff";
16
17/// [Cloud Optimized GeoTIFF](https://www.cogeo.org/) (unofficial).
18#[deprecated(since = "0.9.0", note = "Prefer IMAGE_GEOTIFF")]
19pub const COG: &str = "image/tiff; application=geotiff; profile=cloud-optimized";
20
21/// [Cloud Optimized GeoTIFF](https://www.cogeo.org/) (unofficial).
22///
23/// Once there is an [official media
24/// type](http://osgeo-org.1560.x6.nabble.com/Media-type-tc5411498.html) it will
25/// be added and the custom media type here will be deprecated.
26pub const IMAGE_COG: &str = "image/tiff; application=geotiff; profile=cloud-optimized";
27
28/// JPEG 2000
29#[deprecated(since = "0.9.0", note = "Prefer IMAGE_JP2")]
30pub const JP2: &str = "image/jp2";
31
32/// JPEG 2000
33pub const IMAGE_JP2: &str = "image/jp2";
34
35/// Visual PNGs (e.g. thumbnails)
36#[deprecated(since = "0.9.0", note = "Prefer ::mime::IMAGE_PNG")]
37pub const PNG: &str = "image/png";
38
39/// Visual JPEGs (e.g. thumbnails, oblique)
40#[deprecated(since = "0.9.0", note = "Prefer ::mime::IMAGE_JPEG")]
41pub const JPEG: &str = "image/jpeg";
42
43/// XML metadata [RFC 7303](https://www.ietf.org/rfc/rfc7303.txt)
44#[deprecated(since = "0.9.0", note = "Prefer ::mime::TEXT_JPEG")]
45pub const XML: &str = "text/xml";
46
47/// A JSON file (often metadata, or [labels](https://github.com/radiantearth/stac-spec/tree/master/extensions/label#labels-required))
48#[deprecated(since = "0.9.0", note = "Prefer ::mime::APPLICATION_JSON")]
49pub const JSON: &str = "application/json";
50
51/// Plain text (often metadata)
52#[deprecated(since = "0.9.0", note = "Prefer ::mime::TEXT_PLAIN")]
53pub const TEXT: &str = "text/plain";
54
55/// [GeoJSON](https://geojson.org/)
56#[deprecated(since = "0.9.0", note = "Prefer APPLICATION_GEOJSON")]
57pub const GEOJSON: &str = "application/geo+json";
58
59/// [GeoJSON](https://geojson.org/)
60pub const APPLICATION_GEOJSON: &str = "application/geo+json";
61
62/// [GeoPackage](https://www.geopackage.org/)
63#[deprecated(since = "0.9.0", note = "Prefer APPLICATION_GEOPACKAGE")]
64pub const GEOPACKAGE: &str = "application/geopackage+sqlite3";
65
66/// [GeoPackage](https://www.geopackage.org/)
67pub const APPLICATION_GEOPACKAGE: &str = "application/geopackage+sqlite3";
68
69/// Hierarchical Data Format version 5                           
70#[deprecated(since = "0.9.0", note = "Prefer APPLICATION_HDF5")]
71pub const HDF5: &str = "application/x-hdf5";
72
73/// Hierarchical Data Format version 5                           
74pub const APPLICATION_HDF5: &str = "application/x-hdf5";
75
76/// Hierarchical Data Format versions 4 and earlier.
77#[deprecated(since = "0.9.0", note = "Prefer APPLICATION_HDF")]
78pub const HDF: &str = "application/x-hdf";
79
80/// Hierarchical Data Format versions 4 and earlier.
81pub const APPLICATION_HDF: &str = "application/x-hdf";
82
83/// The OpenAPI 3.0 content type.
84pub const APPLICATION_OPENAPI_3_0: &str = "application/vnd.oai.openapi+json;version=3.0";
85
86/// [COPC](https://copc.io/) Cloud optimized point cloud
87pub const APPLICATION_COPC: &str = "application/vnd.laszip+copc";
88
89/// Apache [Geoparquet](https://geoparquet.org/)
90pub const APPLICATION_PARQUET: &str = "application/vnd.apache.parquet";
91
92/// [OGC 3D Tiles](https://www.ogc.org/standard/3dtiles/)       
93pub const APPLICATION_3DTILES: &str = "application/3dtiles+json";
94
95/// Protomaps [PMTiles](https://github.com/protomaps/PMTiles/blob/main/spec/v3/spec.md)
96pub const APPLICATION_PMTILES: &str = "application/vnd.pmtiles";