Skip to content

Instantly share code, notes, and snippets.

@eliotjordan
Last active January 25, 2019 22:58
Show Gist options
  • Save eliotjordan/5ea8dcef6c8720d88cd8cdfd373820dd to your computer and use it in GitHub Desktop.
Save eliotjordan/5ea8dcef6c8720d88cd8cdfd373820dd to your computer and use it in GitHub Desktop.

Notes on DCAT Distribution

New Solr fields

  1. dcat_distribution_sm
    • Array of escaped dcat:distribution strings
  2. dcat_landing_page_s
    • Replaces http://schema.org/url reference

Thumbnail

{
  "conformsTo": "http://schema.org/thumbnailUrl",
  "downloadURL": "http://libimages.princeton.edu/loris2/pudl0076%2Fmap_pownall%2F00000001.jp2/full/50,/0/default.jpg",
  "format": "JPEG",
}

Metadata

FGDC Metadata

{
  "conformsTo": "http://www.opengis.net/cat/csw/csdgm",
  "downloadURL": "https://raw.githubusercontent.com/OpenGeoMetadata/edu.tufts/master/165/242/110/132/fgdc.xml",
  "format": "FGDC",
  "title": "FGDC Metadata"
}

HTML Metadata

{
  "conformsTo": "http://www.w3.org/1999/xhtml",
  "downloadURL": "https://s3.amazonaws.com/cugir-data/00/77/41/fgdc.html",
  "format": "HTML",
  "title": "HTML Metadata"
}

MODS Metadata

{
  "conformsTo": "http://www.loc.gov/mods/v3",
  "downloadURL": "http://purl.stanford.edu/dp018hs9766.mods",
  "format": "MODS",
  "title": "MODS Metadata"
}

ISO 19139 Metadata

{
  "conformsTo": "http://www.isotc211.org/schemas/2005/gmd/",
  "downloadURL": "https://raw.githubusercontent.com/OpenGeoMetadata/edu.stanford.purl/master/cz/128/vq/0535/iso19139.xml",
  "format": "ISO19139",
  "title": "ISO 19139 Metadata"
}

Web Services

WFS

Add explicit downloads for Shapefile and GeoJSON
{
  "accessURL": "http://geoserver01.uit.tufts.edu/wfs",
  "conformsTo": "http://www.opengis.net/def/serviceType/ogc/wfs",
  "layerId": "sde:GISPORTAL.GISOWNER01.CAMBRIDGEGRID100_04",
  "format": "API"
}

WMS

Add explicit download for KMZ
{
  "accessURL": "http://geoserver01.uit.tufts.edu/wms",
  "conformsTo": "http://www.opengis.net/def/serviceType/ogc/wms",
  "layerId": "sde:GISPORTAL.GISOWNER01.CAMBRIDGEGRID100_04",
  "format": "API"
}

WCS

{
  "accessURL": "http://kurma-podd1.stanford.edu/geoserver/wcs",
  "conformsTo": "http://www.opengis.net/def/serviceType/ogc/wcs",
  "layerId": "druid:dp018hs9766",
  "format": "API"
}

ArcGIS Dynamic Map Layer

{
  "accessURL": "http://data.isgs.illinois.edu/arcgis/rest/services/Geology/Glacial_Boundaries/MapServer",
  "conformsTo": "urn:x-esri:serviceType:ArcGIS#DynamicMapLayer",
  "format": "API"
}

ArcGIS Feature Layer

{
  "accessURL": "https://geodata.md.gov/imap/rest/services/Transportation/MD_Transit/FeatureServer/18",
  "conformsTo": "urn:x-esri:serviceType:ArcGIS#FeatureLayer",
  "format": "API"
}

ArcGIS Image Map Layer

{
  "accessURL": "https://mapsweb.lib.purdue.edu/arcgis/rest/services/Purdue/wabashtopo/ImageServer",
  "conformsTo": "urn:x-esri:serviceType:ArcGIS#ImageMapLayer",
  "format": "API"
}

ArcGIS Tiled Map Layer

{
  "accessURL": "http://services.arcgisonline.com/arcgis/rest/services/Specialty/Soil_Survey_Map/MapServer",
  "conformsTo": "urn:x-esri:serviceType:ArcGIS#ImageMapLayer",
  "format": "API"
}

IIIF Image API

{
  "accessURL": "http://libimages.princeton.edu/loris2/pudl0076%2Fmap_pownall%2F00000001.jp2/info.json",
  "conformsTo": "http://iiif.io/api/image",
  "format": "API"
}

Downloads

Download Shapefile

{
  "downloadURL": "https://clearinghouse.isgs.illinois.edu/sites/clearinghouse.isgs/files/Clearinghouse/data/ISGS/Geology/zips/IL_Glacial_Bndys_Py.zip",
  "format": "Shapefile",
  "title": "Shapefile"
}

Download GeoTIFF

{
  "downloadURL": "http://stacks.stanford.edu/file/druid:dp018hs9766/data.zip",
  "format": "GeoTIFF",
  "title": "GeoTIFF"
}

Download Harvard Layer

{
  "accessURL": "http://hgl.harvard.edu:8080/HGL/HGLOpenDelivery",
  "conformsTo": "http://schema.org/DownloadAction",
  "layerId": "cite:SDE2.G7064_S2_1834_K3"
}

Generated Shapefile

{
  "downloadURL": "https://cugir.library.cornell.edu/geoserver/cugir/wfs/?service=wfs&version=2.0.0&request=GetFeature&srsName=EPSG%3A4326&outputformat=SHAPE-ZIP&typeName=cugir007741",
  "conformsTo": "http://www.opengis.net/def/serviceType/ogc/wfs",
  "format": "Shapefile"
}

Generated GeoJSON

{
  "downloadURL": "https://cugir.library.cornell.edu/geoserver/cugir/wfs/?service=wfs&version=2.0.0&request=GetFeature&srsName=EPSG%3A4326&outputformat=application%2Fjson&typeName=cugir007741"
  "conformsTo": "http://www.opengis.net/def/serviceType/ogc/wfs",
  "format": "GeoJSON"
}
@karenmajewicz
Copy link

Here's another Metadata one to add, but I'm not sure how to format it. Perhaps:

{
  "describedBy": "http://64.90.181.107/geonetwork/srv/api/records/1df126d9-a111-4cb3-9f87-d68735b2188e/formatters/xsl-view?root=div&output=html",
  "title": "Data Dictionary" or "Attribute Table" or "Feature Catalog"
}

By the way, this is assumed to be HTML or PDF. If it's a structured file like CSV or XML, the DCAT schema suggests using {"describedByType": "application/pdf"}, but I am not sure yet how to format that.

@kgjenkins
Copy link

I've written up another possible approach here: https://gist.github.com/kgjenkins/fedf71397c7d7556e78d4f51e36de2f2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment