UNPKG

compare-geojson

Version:

Compare a features new and old versions in GeoJSON

422 lines (421 loc) 12.1 kB
{ "compareFunction": "path_road_changed", "fixtures": [ { "description": "", "newVersion": { "type": "Feature", "id": "way!404346203!2", "properties": { "highway": "footway", "osm:type": "way", "osm:id": 404346203, "osm:version": 2, "osm:changeset": 44612088, "osm:timestamp": 1482472064000, "osm:uid": 5009804, "osm:user": "Roberto Savi" }, "geometry": { "type": "LineString", "coordinates": [ [ 17.1652224, 45.4109882 ], [ 17.165397, 45.4110665 ], [ 17.1656491, 45.4111117 ], [ 17.1659495, 45.4111343 ], [ 17.1661641, 45.4111607 ], [ 17.1664377, 45.4112096 ], [ 17.1666254, 45.4112812 ], [ 17.1668346, 45.4113716 ], [ 17.1669741, 45.4114469 ], [ 17.1672101, 45.4114506 ], [ 17.1670116, 45.411172 ], [ 17.1669312, 45.4110326 ], [ 17.1669258, 45.4109498 ], [ 17.1669151, 45.4108519 ], [ 17.1669365, 45.4107728 ], [ 17.167017, 45.4106937 ], [ 17.1704449, 45.4086262 ], [ 17.172993, 45.4071122 ], [ 17.1731485, 45.4070632 ], [ 17.1734597, 45.406905 ], [ 17.1748169, 45.4060689 ], [ 17.1751012, 45.4059447 ], [ 17.1771289, 45.4053308 ], [ 17.1793766, 45.4046378 ], [ 17.1816029, 45.4039297 ], [ 17.1839417, 45.4032254 ], [ 17.1852024, 45.402845 ], [ 17.1857764, 45.4027018 ], [ 17.1862592, 45.4026001 ], [ 17.1866401, 45.4025662 ], [ 17.1871926, 45.4025549 ], [ 17.1877559, 45.4025964 ], [ 17.1881099, 45.4026529 ], [ 17.1883513, 45.4027546 ], [ 17.1885712, 45.4028337 ], [ 17.1889307, 45.4029241 ], [ 17.1892042, 45.403037 ], [ 17.1893652, 45.403135 ], [ 17.1895422, 45.4032442 ], [ 17.1896978, 45.4033459 ], [ 17.1903415, 45.4037301 ], [ 17.1912374, 45.4042235 ], [ 17.1918757, 45.4045474 ], [ 17.1921922, 45.404698 ], [ 17.1925946, 45.404811 ], [ 17.192895, 45.4048901 ] ] } }, "oldVersion": { "type": "Feature", "id": "way!404346203!1", "properties": { "highway": "path", "osm:type": "way", "osm:id": 404346203, "osm:version": 1, "osm:changeset": 37912720, "osm:timestamp": 1458285809000, "osm:uid": 158601, "osm:user": "Vedran V" }, "geometry": { "type": "LineString", "coordinates": [ [ 17.1652224, 45.4109882 ], [ 17.165397, 45.4110665 ], [ 17.1656491, 45.4111117 ], [ 17.1659495, 45.4111343 ], [ 17.1661641, 45.4111607 ], [ 17.1664377, 45.4112096 ], [ 17.1666254, 45.4112812 ], [ 17.1668346, 45.4113716 ], [ 17.1669741, 45.4114469 ], [ 17.1672101, 45.4114506 ], [ 17.1670116, 45.411172 ], [ 17.1669312, 45.4110326 ], [ 17.1669258, 45.4109498 ], [ 17.1669151, 45.4108519 ], [ 17.1669365, 45.4107728 ], [ 17.167017, 45.4106937 ], [ 17.1704449, 45.4086262 ], [ 17.172993, 45.4071122 ], [ 17.1731485, 45.4070632 ], [ 17.1734597, 45.406905 ], [ 17.1748169, 45.4060689 ], [ 17.1751012, 45.4059447 ], [ 17.1771289, 45.4053308 ], [ 17.1793766, 45.4046378 ], [ 17.1816029, 45.4039297 ], [ 17.1839417, 45.4032254 ], [ 17.1852024, 45.402845 ], [ 17.1857764, 45.4027018 ], [ 17.1862592, 45.4026001 ], [ 17.1866401, 45.4025662 ], [ 17.1871926, 45.4025549 ], [ 17.1877559, 45.4025964 ], [ 17.1881099, 45.4026529 ], [ 17.1883513, 45.4027546 ], [ 17.1885712, 45.4028337 ], [ 17.1889307, 45.4029241 ], [ 17.1892042, 45.403037 ], [ 17.1893652, 45.403135 ], [ 17.1895422, 45.4032442 ], [ 17.1896978, 45.4033459 ], [ 17.1903415, 45.4037301 ], [ 17.1912374, 45.4042235 ], [ 17.1918757, 45.4045474 ], [ 17.1921922, 45.404698 ], [ 17.1925946, 45.404811 ], [ 17.192895, 45.4048901 ] ] } }, "expectedResult" : { "result:path_road_changed": { "modified": true, "from": "path", "to": "footway" } } } ] }