TerriaJS / terriajs

A library for building rich, web-based geospatial data platforms.
https://terria.io
Apache License 2.0
1.18k stars 364 forks source link

CatalogItem for data.json sources #2361

Open tobybellwood opened 7 years ago

tobybellwood commented 7 years ago

How complex would it be to add a CatalogItem for data.json files (https://project-open-data.cio.gov/catalog/)

This will allow us to specify the canonical source of the data in NationalMap as opposed to relying on data.*.gov.au to pass the records correctly.

eg http://data.goldcoast.opendata.arcgis.com/data.json

{
"@type": "dcat:Distribution",
"title": "Esri Rest API",
"format": "Esri REST",
"mediaType": "application/json",
"accessURL": "https://services.arcgis.com/3vStCH7NDoBOZ5zn/arcgis/rest/services/Potable_Water_Pipe/FeatureServer/0"
},
{
"@type": "dcat:Distribution",
"title": "GeoJSON",
"format": "GeoJSON",
"mediaType": "application/vnd.geo+json",
"downloadURL": "http://data.goldcoast.opendata.arcgis.com/datasets/58b7b12741f24ac49eb1ddc968ceb1f2_0.geojson"
},
kring commented 7 years ago

It looks like it should be very straightforward to support that. I guess we'd want a CatalogGroup to show all the compatible datasets and distributions, and a CatalogItem that takes the URL of the data.json, the identifier of the one dataset, and optionally the type of the distribution to use.

tobybellwood commented 7 years ago

yup - my bad (terminology) - A Group to collect the data.json and create Items from the Datasets - I suppose we have to determine which feature types we bring in - certainly the accessURLs (Feature/Map/Image Servers), and whether we also add any downloadURLs (GeoJSON/KML) as a download option in the infobox.