UNPKG

compare-geojson

Version:

Compare a features new and old versions in GeoJSON

1,173 lines (1,172 loc) 24 kB
{ "compareFunction": "highway_deleted", "fixtures": [ { "description": "Test undefined newVersion and oldVersion", "expectedResult": {}, "newVersion": null, "oldVersion": null }, { "description": "Testing highway=residential deleted", "expectedResult": {}, "newVersion": { "id": 402620207, "type": "way", "typeId": 2, "tags": {}, "refs": [], "version": 2, "timestamp": 1457910275000, "uid": 1714220, "user": "luschi", "changeset": 37809878, "deleted": true }, "oldVersion": { "type": "Feature", "id": "way!402620207!1", "properties": { "highway": "footway", "http://www.google.ru/url?url": "http://www.rosneft.ru/attach/0/02/92/v04_2007.pdf&rct=j&q=&esrc=s&sa=U&ved=0ahUKEwihrt7Up7PLAhUGEpoKHQdpA-AQFggTMAA&usg=AFQjCNFCEsGaem8saUxMkEwYYqqiESTd6A", "source": "Bing", "osm:type": "way", "osm:id": 402620207, "osm:version": 1, "osm:changeset": 37704125, "osm:timestamp": 1457517352000, "osm:uid": 3417100, "osm:user": "desk77" }, "geometry": { "type": "LineString", "coordinates": [ [ 72.6202944, 61.0896237 ], [ 72.6197173, 61.0893733 ], [ 72.6178674, 61.0904843 ] ] } } }, { "description": "Test highway deleted", "expectedResult": { "result:highway_deleted": true }, "newVersion": { "id": 241070039, "type": "way", "typeId": 2, "tags": {}, "refs": [], "version": 27, "timestamp": 1458154346000, "uid": 3488478, "user": "SanjeevKumarT", "changeset": 37879988, "deleted": true }, "oldVersion": { "type": "Feature", "id": "way!241070039!26", "properties": { "access": "yes", "bicycle": "yes", "cycleway": "no", "foot": "yes", "highway": "trunk", "horse": "yes", "lanes": "2", "maxspeed": "80", "name": "Calicut-Malappuram-Perinthalmanna Highway", "oneway": "no", "ref": "NH966", "ref:old": "NH213", "sidewalk": "none", "surface": "asphalt", "osm:type": "way", "osm:id": 241070039, "osm:version": 26, "osm:changeset": 35825606, "osm:timestamp": 1449579856000, "osm:uid": 1893569, "osm:user": "sabeesh" }, "geometry": { "type": "LineString", "coordinates": [ [ 76.1101615, 11.0265578 ], [ 76.110787, 11.0263794 ], [ 76.1110267, 11.0263435 ], [ 76.1112664, 11.0263173 ], [ 76.1116579, 11.0263147 ], [ 76.1119695, 11.0263539 ], [ 76.1122411, 11.0264141 ], [ 76.1125713, 11.0265212 ], [ 76.1130614, 11.0267486 ], [ 76.1134076, 11.0269499 ], [ 76.1137405, 11.0271068 ], [ 76.1139908, 11.0271852 ], [ 76.1142704, 11.0272479 ], [ 76.1144675, 11.0272584 ], [ 76.1146859, 11.0272453 ], [ 76.114835, 11.0272322 ], [ 76.1151013, 11.0271564 ], [ 76.115373, 11.0270911 ], [ 76.1155701, 11.0270074 ], [ 76.1159109, 11.0269107 ], [ 76.1162092, 11.0268506 ], [ 76.1164169, 11.026848 ], [ 76.1167099, 11.0268401 ], [ 76.1169309, 11.0268297 ], [ 76.1172425, 11.0267748 ], [ 76.1176127, 11.0266127 ], [ 76.1178923, 11.0264533 ], [ 76.1180175, 11.0263748 ], [ 76.1181906, 11.0262154 ], [ 76.1182758, 11.0261108 ], [ 76.118393, 11.025886 ], [ 76.1185288, 11.025358 ], [ 76.1186087, 11.0249894 ], [ 76.1187445, 11.0245346 ], [ 76.1189203, 11.0241216 ], [ 76.1190641, 11.0235099 ], [ 76.1192346, 11.0227727 ], [ 76.119421, 11.0215703 ], [ 76.1196101, 11.0206266 ], [ 76.1197166, 11.0200803 ], [ 76.1198924, 11.0194372 ], [ 76.1202412, 11.0184674 ], [ 76.120401, 11.0178165 ], [ 76.1205858, 11.017251 ], [ 76.1207544, 11.0168291 ], [ 76.1209394, 11.0164258 ], [ 76.1211822, 11.016018 ], [ 76.1215675, 11.0154403 ], [ 76.1222165, 11.0143218 ], [ 76.1223081, 11.0140914 ], [ 76.1225519, 11.0135391 ], [ 76.1231586, 11.0125057 ], [ 76.1232373, 11.0123504 ], [ 76.1232687, 11.0121899 ], [ 76.1232825, 11.0117684 ], [ 76.1233067, 11.011575 ], [ 76.1233665, 11.0113654 ], [ 76.1235243, 11.0108805 ], [ 76.1236843, 11.0102049 ], [ 76.123831, 11.0096838 ], [ 76.1239385, 11.0092553 ], [ 76.1239896, 11.0089281 ], [ 76.1240188, 11.0085358 ], [ 76.1240362, 11.008285 ], [ 76.1240924, 11.0080383 ], [ 76.1241765, 11.007799 ], [ 76.1242886, 11.0075899 ], [ 76.1243684, 11.007502 ], [ 76.1245013, 11.0074422 ], [ 76.1246165, 11.0074218 ], [ 76.1247339, 11.0074535 ], [ 76.1248252, 11.0075191 ], [ 76.1249169, 11.0075762 ], [ 76.125012, 11.0076023 ], [ 76.1251317, 11.0076156 ], [ 76.1253288, 11.0075978 ], [ 76.1255316, 11.0075645 ], [ 76.126305, 11.0073595 ], [ 76.1266458, 11.007249 ], [ 76.1267941, 11.0071658 ], [ 76.1269682, 11.0069762 ], [ 76.1271113, 11.0067428 ], [ 76.1272191, 11.0065235 ], [ 76.127325, 11.0063477 ], [ 76.1274874, 11.0061742 ], [ 76.127749, 11.0059891 ], [ 76.1280665, 11.0057805 ], [ 76.1282862, 11.0055884 ], [ 76.1284634, 11.005375 ], [ 76.1287045, 11.0049803 ], [ 76.1294178, 11.0040021 ], [ 76.1294991, 11.0038919 ], [ 76.1295769, 11.0037863 ], [ 76.1297249, 11.0036468 ], [ 76.129892, 11.0035446 ], [ 76.1308441, 11.0031956 ], [ 76.1310517, 11.0031322 ], [ 76.131282, 11.0031001 ], [ 76.1319328, 11.0030639 ], [ 76.1321271, 11.0030361 ], [ 76.1322956, 11.0029686 ], [ 76.1325168, 11.0028386 ], [ 76.1330942, 11.0023735 ], [ 76.1338307, 11.0017177 ], [ 76.1343552, 11.0012131 ], [ 76.1346036, 11.0010154 ], [ 76.1348162, 11.0008884 ], [ 76.1351217, 11.0007511 ], [ 76.1354186, 11.0006594 ], [ 76.1357005, 11.0006051 ], [ 76.1365105, 11.0005187 ], [ 76.1371614, 11.0004498 ], [ 76.1374631, 11.000408 ], [ 76.1377382, 11.0003409 ], [ 76.1379649, 11.0002676 ], [ 76.138153, 11.0001806 ], [ 76.1383394, 11.0000388 ], [ 76.1385483, 10.9997605 ], [ 76.1386543, 10.9996299 ], [ 76.1388825, 10.9995038 ], [ 76.1390889, 10.9994586 ], [ 76.1393368, 10.9994529 ], [ 76.1399734, 10.9995467 ], [ 76.1402814, 10.9995677 ], [ 76.1405033, 10.999575 ], [ 76.1406726, 10.9995683 ], [ 76.1407974, 10.9995369 ], [ 76.140911, 10.9994807 ], [ 76.1419703, 10.9986625 ], [ 76.1429833, 10.9978548 ], [ 76.1433681, 10.9975542 ], [ 76.1435518, 10.9974143 ], [ 76.1436771, 10.9973419 ], [ 76.1438362, 10.9973004 ], [ 76.1441256, 10.9972751 ], [ 76.1449576, 10.9972584 ], [ 76.1458179, 10.9972193 ], [ 76.1461063, 10.9972126 ], [ 76.1463277, 10.9971956 ], [ 76.146549, 10.9971514 ], [ 76.1469663, 10.9970416 ], [ 76.1474909, 10.9968908 ], [ 76.1481405, 10.9966705 ], [ 76.1486215, 10.9964822 ], [ 76.1494846, 10.9961691 ], [ 76.1497534, 10.9960967 ], [ 76.1501553, 10.9959892 ], [ 76.1505353, 10.9959136 ], [ 76.1508838, 10.9958233 ], [ 76.1515408, 10.9956003 ], [ 76.1517113, 10.9955283 ], [ 76.1518807, 10.9954148 ], [ 76.1520411, 10.9953192 ], [ 76.1525825, 10.9951016 ], [ 76.1529938, 10.9949236 ], [ 76.1533093, 10.9947777 ], [ 76.1535019, 10.9946943 ], [ 76.1537611, 10.9946152 ], [ 76.1541084, 10.9945242 ], [ 76.1543182, 10.9944822 ], [ 76.154556, 10.9944718 ], [ 76.1549162, 10.9944451 ], [ 76.155133, 10.9943937 ], [ 76.1554366, 10.9942735 ], [ 76.1557562, 10.9941454 ], [ 76.1559618, 10.9940842 ], [ 76.1561247, 10.9940639 ], [ 76.1562888, 10.994067 ], [ 76.1564646, 10.9940905 ], [ 76.1568469, 10.9941602 ], [ 76.1570829, 10.9941783 ], [ 76.15784, 10.9941826 ], [ 76.1585793, 10.9941974 ], [ 76.1587636, 10.9941843 ], [ 76.1589442, 10.9941533 ], [ 76.1591384, 10.9940858 ], [ 76.1593164, 10.9940026 ], [ 76.1595998, 10.9938631 ], [ 76.1599322, 10.9936496 ], [ 76.1604962, 10.9932216 ], [ 76.1609208, 10.9928741 ], [ 76.1610837, 10.9927188 ], [ 76.1612683, 10.9925829 ], [ 76.1614688, 10.9924526 ], [ 76.1616712, 10.9923667 ], [ 76.1621552, 10.9921984 ], [ 76.1624462, 10.9920986 ], [ 76.1629693, 10.9919133 ], [ 76.1632578, 10.9917917 ], [ 76.163447, 10.9916799 ], [ 76.1635723, 10.9915668 ], [ 76.1637286, 10.9913934 ], [ 76.1640741, 10.9910048 ], [ 76.1642739, 10.9907978 ], [ 76.1644236, 10.9906929 ], [ 76.1645891, 10.9906309 ], [ 76.164808, 10.9906077 ], [ 76.1651141, 10.990645 ], [ 76.1654933, 10.9907225 ], [ 76.1657572, 10.9907982 ], [ 76.1658989, 10.9908597 ], [ 76.1659859, 10.9909354 ], [ 76.1661416, 10.9911628 ], [ 76.1662035, 10.9912481 ], [ 76.1663442, 10.991309 ], [ 76.166478, 10.9912997 ], [ 76.1667543, 10.9912418 ], [ 76.1671588, 10.99113 ], [ 76.1675268, 10.9910598 ], [ 76.1685441, 10.9909558 ], [ 76.1703715, 10.9907227 ], [ 76.1717242, 10.9905104 ], [ 76.1720155, 10.9904882 ], [ 76.17231, 10.9905198 ], [ 76.1728919, 10.9906771 ], [ 76.1736248, 10.9908389 ], [ 76.1747195, 10.9910962 ], [ 76.1751117, 10.9911303 ], [ 76.1753653, 10.9911074 ], [ 76.1755352, 10.9910457 ], [ 76.1758552, 10.9908154 ], [ 76.1759989, 10.990773 ], [ 76.1761192, 10.9908073 ], [ 76.1762012, 10.9908825 ], [ 76.1762859, 10.991048 ], [ 76.1764614, 10.9915152 ], [ 76.1765727, 10.9916759 ], [ 76.176774, 10.9918223 ], [ 76.1770348, 10.9919454 ], [ 76.1773647, 10.9920122 ], [ 76.1777687, 10.9920338 ], [ 76.1782229, 10.9920289 ], [ 76.1789215, 10.9919346 ], [ 76.17912, 10.9919221 ], [ 76.1796522, 10.9919835 ], [ 76.1801364, 10.9920078 ], [ 76.1806076, 10.9919795 ], [ 76.1823008, 10.9918424 ], [ 76.1826385, 10.9917688 ], [ 76.1829178, 10.9916551 ], [ 76.1831013, 10.9915005 ], [ 76.1832785, 10.991315 ], [ 76.1835394, 10.9909611 ], [ 76.183809, 10.9904991 ], [ 76.184218, 10.9897338 ], [ 76.1846504, 10.9889556 ], [ 76.1851736, 10.9882037 ], [ 76.1860706, 10.9868853 ], [ 76.1862391, 10.986597 ], [ 76.1863478, 10.986362 ], [ 76.186431, 10.9861039 ], [ 76.186584, 10.9853841 ], [ 76.1866723, 10.9851401 ], [ 76.1867809, 10.9849416 ], [ 76.1869747, 10.9847595 ], [ 76.1881011, 10.9839239 ], [ 76.1893173, 10.9830417 ], [ 76.1915358, 10.9820154 ], [ 76.1922458, 10.9809532 ], [ 76.1926658, 10.9801765 ], [ 76.1949436, 10.9790378 ], [ 76.1961513, 10.978447 ], [ 76.1970515, 10.9780218 ], [ 76.1976846, 10.9777763 ], [ 76.1987549, 10.9774304 ] ] } } } ] }