magda-io / magda-minion-format

Magda Format Minion
Other
0 stars 0 forks source link

Should recognise ESRI MapServer URL for distribution comes with ESRI REST format string #15

Closed t83714 closed 3 years ago

t83714 commented 3 years ago

Should recognise ESRI MapServer URL for distribution comes with ESRI REST format string

Currently, if a distribution comes with "ESRI REST" format string, the format minion won't look into the URL pattern to further identify the API type.

e.g. this one:

https://dev.magda.io/dataset/ds-dga-5fdef41b-bbd1-42ed-bbea-7f6db1a4ab26/distribution/dist-dga-0ca78178-7482-486f-ae85-9cd97c7c97c9/details?q=*

{
  "aspects": {
    "source": {
      "id": "dga",
      "name": "data.gov.au",
      "type": "ckan-resource",
      "url": "https://data.gov.au/data/api/3/action/resource_show?id=0ca78178-7482-486f-ae85-9cd97c7c97c9"
    },
    "ckan-resource": {
      "cache_last_updated": null,
      "cache_url": null,
      "created": "2017-01-24T18:21:45.382919",
      "datastore_active": false,
      "description": "Map prepared by the Department of Environment and Energy\r\n\r\nSource: Environmental Resources Information Network, Australian Government Department of the Environment and Energy.\r\n",
      "format": "Esri REST",
      "hash": "",
      "id": "0ca78178-7482-486f-ae85-9cd97c7c97c9",
      "last_modified": "2017-01-24T18:20:26.410000",
      "mimetype": null,
      "mimetype_inner": null,
      "name": "BIO26 Numbers of fish species listed under the EPBC Act 1999 in each IBRA region",
      "package_id": "5fdef41b-bbd1-42ed-bbea-7f6db1a4ab26",
      "position": 0,
      "resource_type": null,
      "revision_id": "0b4b7936-5d93-42f3-9ae2-aec1cff27b06",
      "size": null,
      "state": "active",
      "url": "http://www.environment.gov.au/mapping/rest/services/digital_soe/soe2016_bio1/MapServer/0",
      "url_type": null,
      "wms_layer": "0"
    },
    "dcat-distribution-strings": {
      "description": "Map prepared by the Department of Environment and Energy\r\n\r\nSource: Environmental Resources Information Network, Australian Government Department of the Environment and Energy.\r\n",
      "downloadURL": "http://www.environment.gov.au/mapping/rest/services/digital_soe/soe2016_bio1/MapServer/0",
      "format": "Esri REST",
      "issued": "2017-01-24T18:21:45Z",
      "license": "Creative Commons Attribution 4.0 International",
      "modified": "2017-01-24T18:20:26Z",
      "title": "BIO26 Numbers of fish species listed under the EPBC Act 1999 in each IBRA region"
    },
    "source-link-status": {
      "httpStatusCode": 200,
      "status": "active"
    },
    "dataset-format": {
      "confidenceLevel": 70,
      "format": "ESRI REST"
    }
  },
  "id": "dist-dga-0ca78178-7482-486f-ae85-9cd97c7c97c9",
  "name": "BIO26 Numbers of fish species listed under the EPBC Act 1999 in each IBRA region",
  "sourceTag": "2184d3f1-3cc4-4aee-8629-d4810172b51e",
  "tenantId": 0
}

should be recognised as ESRI MapServer. 
t83714 commented 3 years ago

After a few tests, I can confirm It was actually a test error.