Skip to content

Commit

Permalink
Merge pull request #24 from magda-io/issue/23
Browse files Browse the repository at this point in the history
Issue/23 GeoJson format string could sometimes be recognised as GEO+JSON
  • Loading branch information
t83714 committed Aug 14, 2023
2 parents 7622022 + 32d4bab commit 042985b
Show file tree
Hide file tree
Showing 6 changed files with 39 additions and 3 deletions.
4 changes: 4 additions & 0 deletions CHANGES.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
> The repo was part of [magda main repo](https://github.com/magda-io/magda). For history before v1.0.0, please check [CHANGES.md of main repo](https://github.com/magda-io/magda/blob/master/CHANGES.md).
# 2.0.1

- #23 Add "GEO+JSON" to GEOJSON synonyms list

# 2.0.0

- Upgrade to node14
Expand Down
2 changes: 1 addition & 1 deletion deploy/magda-minion-format/Chart.yaml
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
apiVersion: v2
name: magda-minion-format
description: A Helm chart for Magda Format Minion
version: "2.0.0"
version: "2.0.1"
kubeVersion: ">= 1.14.0-0"
home: "https://github.com/magda-io/magda-minion-format"
sources: [ "https://github.com/magda-io/magda-minion-format" ]
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@magda/minion-format",
"description": "MAGDA Layering Minion",
"version": "2.0.0",
"version": "2.0.1",
"scripts": {
"prebuild": "rimraf dist tsconfig.tsbuildinfo",
"build": "yarn run compile",
Expand Down
5 changes: 5 additions & 0 deletions src/test/onRecordFound.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -179,6 +179,11 @@ describe("onRecordFound", async function(this) {
"HTML"
);

testDistFileReturnsFormat(
"./sampleDataFiles/issue-23-geojson.json",
"GEOJSON"
);

/**
* This test simply takes a bunch of formats that were previously causing the minion to use all its CPU and be
* killed by a liveness check and ensures that they all are able to execute in less than 5 seconds.
Expand Down
26 changes: 26 additions & 0 deletions src/test/sampleDataFiles/issue-23-geojson.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
{
"aspects": {
"dcat-distribution-strings": {
"accessURL": "https://fed.dcceew.gov.au/datasets/erin::biologically-important-areas-of-regionally-significant-marine-species.geojson?outSR=%7B%22latestWkid%22%3A3857%2C%22wkid%22%3A102100%7D",
"format": "GeoJSON",
"license": "http://creativecommons.org/licenses/by/3.0",
"mediaType": "application/vnd.geo+json",
"title": "GeoJSON"
},
"project-open-data-distribution": {
"@type": "dcat:Distribution",
"accessURL": "https://fed.dcceew.gov.au/datasets/erin::biologically-important-areas-of-regionally-significant-marine-species.geojson?outSR=%7B%22latestWkid%22%3A3857%2C%22wkid%22%3A102100%7D",
"format": "GeoJSON",
"mediaType": "application/vnd.geo+json",
"title": "GeoJSON"
},
"source": {
"id": "dcceew",
"name": "Department of Climate Change, Energy, the Environment and Water",
"type": "project-open-data-distribution",
"url": "https://fed.dcceew.gov.au/api/feed/dcat-us/1.1.json"
}
},
"id": "dist-dcceew-https://www.arcgis.com/home/item.html?id=e8e7a7c233a44cf099817b2f4dff29c7&sublayer=0-3",
"name": "GeoJSON"
}
3 changes: 2 additions & 1 deletion synonyms.json
Original file line number Diff line number Diff line change
Expand Up @@ -60,5 +60,6 @@
"type": "as-keyword"
}
],
"spss": ["sav"]
"spss": ["sav"],
"GEOJSON": ["GEO+JSON", "GEOJSON+ZIP", "GEOJSON+ZIP+CSV"]
}

0 comments on commit 042985b

Please sign in to comment.