UNPKG

compare-geojson

Version:

Compare a features new and old versions in GeoJSON

441 lines (440 loc) 13.7 kB
{ "compareFunction": "compare_geometries", "fixtures": [{ "description": "New road, no geometry change", "newVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 3, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.19052600860594, 9.28248349003421 ], [ 79.1830587387085, 9.282187016311402 ] ] } }, "oldVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 2, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.19052600860594, 9.28248349003421 ], [ 79.1830587387085, 9.282187016311402 ] ] } } }, { "description": "New road, one node dragged to double the length", "newVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 3, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.20112609863281, 9.28248349003421 ], [ 79.1830587387085, 9.282187016311402 ] ] } }, "oldVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 2, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.19052600860594, 9.28248349003421 ], [ 79.1830587387085, 9.282187016311402 ] ] } } }, { "description": "New road, one node dragged to 1000 times the length", "newVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 3, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 100.986328125, 9.405710041600022 ], [ 79.1830587387085, 9.282187016311402 ] ] } }, "oldVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 2, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.19052600860594, 9.28248349003421 ], [ 79.1830587387085, 9.282187016311402 ] ] } } }, { "description": "Mature road, one node dragged to double the length", "newVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 28, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.20112609863281, 9.28248349003421 ], [ 79.1830587387085, 9.282187016311402 ] ] } }, "oldVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 27, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.19052600860594, 9.28248349003421 ], [ 79.1830587387085, 9.282187016311402 ] ] } } }, { "description": "Mature road, split in half", "newVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 28, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.1860842704773, 9.282335253204153 ], [ 79.1830587387085, 9.282187016311402 ] ] } }, "oldVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 27, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.19052600860594, 9.28248349003421 ], [ 79.1830587387085, 9.282187016311402 ] ] } } }, { "description": "Mature road, displaced by 100m perpendicular to axis", "newVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 28, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.19052600860594, 9.28348349003421 ], [ 79.1830587387085, 9.283187016311402 ] ] } }, "oldVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 27, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.19052600860594, 9.28248349003421 ], [ 79.1830587387085, 9.282187016311402 ] ] } } }, { "description": "Mature road, displaced by 100m along axis", "newVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 28, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.19152600860594, 9.28248349003421 ], [ 79.1840587387085, 9.282187016311402 ] ] } }, "oldVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 27, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.19052600860594, 9.28248349003421 ], [ 79.1830587387085, 9.282187016311402 ] ] } } }, { "description": "Mature road, new node added and dragged by 1km", "newVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 28, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.19052600860594, 9.28248349003421 ], [ 79.18651342391968, 9.285723507945871 ], [ 79.1830587387085, 9.282187016311402 ] ] } }, "oldVersion": { "type": "Feature", "id": "way!157811322!27", "properties": { "osm:type": "way", "osm:id": 157811322, "osm:version": 27, "osm:changeset": 35485084, "osm:timestamp": 1448105804000, "osm:uid": 477038, "osm:user": "manuvarkey" }, "geometry": { "type": "LineString", "coordinates": [ [ 79.19052600860594, 9.28248349003421 ], [ 79.1830587387085, 9.282187016311402 ] ] } } }] }