compare-geojson
Version:
Compare a features new and old versions in GeoJSON
97 lines (96 loc) • 2.43 kB
JSON
{
"compareFunction": "name-matches-to-wikidata",
"fixtures": [
{
"description": "Test OSM name different from Wikidata name",
"expectedResult": {
"result:name_matches_to_wikidata": false
},
"newVersion": {
"type": "Feature",
"properties": {
"osm:id": 427818536,
"osm:type": "way",
"name": "Central Park is now something else",
"wikidata": "Q160409",
"osm:version": 1
},
"geometry": null
},
"oldVersion": null
},
{
"description": "Test OSM name matches with aliases on Wikidata",
"expectedResult": {},
"newVersion": {
"type": "Feature",
"properties": {
"osm:id": 3401391999,
"osm:type": "node",
"name": "Bengaluru",
"wikidata": "Q1355"
},
"geometry": null
},
"oldVersion": null
},
{
"description": "Test feature with no Wikidata tag",
"expectedResult": {},
"newVersion": {
"type": "Feature",
"properties": {
"osm:id": 3401391999,
"osm:type": "node",
"name": "Bengaluru"
},
"geometry": null
},
"oldVersion": null
},
{
"description": "Test feature with Wikidata tag and not a name modification",
"expectedResult": {},
"newVersion": {
"type": "Feature",
"properties": {
"osm:id": 3401391999,
"osm:type": "node",
"name": "Bengaluru is somethong else",
"osm:version": 2,
"wikidata": "Q1355"
},
"geometry": null
},
"oldVersion": {
"type": "Feature",
"properties": {
"osm:id": 3401391999,
"osm:type": "node",
"name": "Bengaluru is somethong else",
"osm:version": 1,
"wikidata": "Q1355"
},
"geometry": null
}
},
{
"description": "Test new feature with Wikidata",
"expectedResult": {
"result:name_matches_to_wikidata": false
},
"newVersion": {
"type": "Feature",
"properties": {
"osm:id": 3401391999,
"osm:type": "node",
"name": "Bengaluru is something else",
"osm:version": 1,
"wikidata": "Q1355"
},
"geometry": null
},
"oldVersion": null
}
]
}