Skip to content

Instantly share code, notes, and snippets.

@darwinp
Last active December 19, 2015 19:49
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save darwinp/69bd9a03a25205559a31 to your computer and use it in GitHub Desktop.
Save darwinp/69bd9a03a25205559a31 to your computer and use it in GitHub Desktop.
Common resource formats for open data portals (developed as part of the geo.data.gov project - Original at https://github.com/okfn/ckanext-geodatagov/blob/master/ckanext/geodatagov/plugins.py#L57
RESOURCE_MAPPING = {
'text/html': ('HTML', 'Web Page'),
'application/zip': ('ZIP', 'Zip File'),
'application/xml': ('XML', 'XML File'),
'application/netcdf': ('NetCDF', 'NetCDF File'),
'application/pdf': ('PDF', 'PDF File'),
'application/x-msdownload': ('EXE', 'Windows Executable Program'),
'application/rdf+xml': ('RDF', 'RDF'),
'application/rss+xml': ('RSS', 'RSS feed'),
'application/json': ('JSON', 'JavaScript Object Notation'),
'application/vnd.ms-excel': ('Excel', 'Excel Document'),
'application/x-tar': ('TAR', 'TAR Compressed File'),
'arcgis_rest': ('Esri REST', 'Esri Rest API Endpoint'),
'wms': ('WMS', 'Web Mapping Service'),
'application/rar': ('RAR', 'RAR Compressed File'),
'application/x-qgis': ('QGIS', 'QGIS File'),
'wfs': ('WFS', 'Web Feature Service'),
'text/plain': ('TXT', 'Text File'),
'application/x-msaccess': ('Access', 'Access Database'),
'iamge/jpeg': ('JPEG', 'JPG Image File'),
'image/x-mrsid': ('MrSID', 'MrSID'),
'application/vnd.google-earth.kml+xml': ('KML', 'KML File'),
'image/tiff': ('TIFF', 'TIFF Image File'),
'application/vnd.google-earth.kmz': ('KMZ', 'KMZ File'),
'wcs': ('WCS', 'Web Coverage Service'),
'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet': ('Office Open XML Spreadsheet', 'Office Open XML Spreadsheet'),
'application/application/vnd.openxmlformats-officedocument.wordprocessingml.document': ('Office Open XML Document', 'Office Open XML Document'),
'text/x-perl': ('Perl', 'Perl Script'),
'application/msword': ('DOC', 'Microsoft Word File'),
'text/csv': ('CSV', 'Comma Seperated Values File'),
'image/x-ms-bmp': ('BMP', 'Bitmap Image File'),
'image/gif': ('GIF', 'GIF Image File'),
'image/svg+xml': ('SVG', 'SVG vector image'),
'chemical/x-xyz': ('XYZ', 'XYZ Chemical File'),
'image/png': ('PNG', 'PNG Image File'),
'web map application': ('ArcGIS Online Map', 'ArcGIS Online Map'),
'arcgis map preview': ('ArcGIS Map Preview', 'ArcGIS Map Preview'),
'arcgis map service': ('ArcGIS Map Service', 'ArcGIS Map Service'),
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment