Skip to content

Commit

Permalink
feat: generate "fixed" ogr2ogr geometries
Browse files Browse the repository at this point in the history
Closes #147
  • Loading branch information
gadomski committed Oct 15, 2024
1 parent 66b5faf commit e67e96d
Show file tree
Hide file tree
Showing 27 changed files with 222 additions and 0 deletions.
14 changes: 14 additions & 0 deletions scripts/compare.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/usr/bin/env sh
#
# Compare ogr2ogr -wrapdateline with our package.

set -e

root="$(cd "$(dirname -- "$1")" >/dev/null; pwd -P)/$(basename -- "$1")"
destination="$root/tests/data/ogr2ogr"
mkdir -p $destination

for path in $root/tests/data/input/*.json; do
file_name="${path##*/}"
ogr2ogr -of GeoJSON -wrapdateline "$destination/$file_name" $path
done
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/almost-180.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "almost-180",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 180.0, -15.7250416 ], [ 180.0, -15.725041599999974 ], [ 180.0, -15.725041600000026 ], [ 180.0, -15.7250416 ] ] ], [ [ [ -176.882485120000013, -12.82925277 ], [ -173.710267320000014, -14.73835555 ], [ -176.78115373, -18.58572933 ], [ -180.0, -15.725041600000026 ], [ -180.0, -15.725041599999974 ], [ -176.882485120000013, -12.82925277 ] ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/both-poles.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "both-poles",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 100.0, 60.0 ], [ 175.0, 65.0 ], [ -175.0, 65.0 ], [ -120.0, 0.0 ], [ -170.0, -85.0 ], [ 175.0, -85.0 ], [ 0.0, -68.0 ], [ -90.0, 0.0 ], [ -90.0, 80.0 ], [ 0.0, 85.0 ], [ 100.0, 60.0 ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/complex-split.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "complex-split",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 120.0, -40.0 ], [ -120.0, -40.0 ], [ -120.0, -20.0 ], [ 150.0, -20.0 ], [ 150.0, 0.0 ], [ -120.0, 0.0 ], [ -120.0, 60.0 ], [ 120.0, 60.0 ], [ 120.0, 40.0 ], [ -150.0, 40.0 ], [ -150.0, 20.0 ], [ 120.0, 20.0 ], [ 120.0, -40.0 ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/crossing-latitude.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "crossing-latitude",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 170.0, 40.0 ], [ -170.0, 50.0 ], [ -170.0, 60.0 ], [ 170.0, 50.0 ], [ 170.0, 40.0 ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/cw-only.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "cw-only",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 100.0, 40.0 ], [ 90.0, 40.0 ], [ 90.0, 50.0 ], [ 100.0, 50.0 ], [ 100.0, 40.0 ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/cw-split.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "cw-split",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 170.0, 40.0 ], [ 170.0, 50.0 ], [ -170.0, 50.0 ], [ -170.0, 40.0 ], [ 170.0, 40.0 ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/extra-crossing.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "extra-crossing",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 40.0, 45.0 ], [ 175.0, 0.0 ], [ -175.0, -5.0 ], [ -170.0, -50.0 ], [ -175.0, -75.0 ], [ 175.0, -76.0 ], [ -175.0, -77.0 ], [ -150.0, -30.0 ], [ -30.0, 20.0 ], [ 40.0, 45.0 ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/force-north-pole.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "force-north-pole",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 10.3685, 89.6098 ], [ 109.862, 89.8078 ], [ 151.934, 89.4194 ], [ 158.515, 88.9727 ], [ 160.866, 88.5124 ], [ 162.377, 88.0578 ], [ 163.225, 87.6061 ], [ 163.85, 87.1534 ], [ 164.331, 86.695 ], [ 164.679, 86.2412 ], [ 164.861, 85.781 ], [ 165.121, 85.3232 ], [ 165.328, 84.869 ], [ 165.476, 84.4169 ], [ 165.594, 83.9604 ], [ 165.693, 83.497 ], [ 165.779, 83.0419 ], [ 165.844, 82.584 ], [ 165.91, 82.1325 ], [ 165.966, 81.6751 ], [ 166.012, 81.2187 ], [ 166.048, 80.7615 ], [ 166.141, 80.3077 ], [ 166.163, 79.8453 ], [ 166.178, 79.3915 ], [ 166.253, 78.9376 ], [ 166.246, 78.4734 ], [ 166.284, 78.0155 ], [ 166.338, 77.5632 ], [ 166.346, 77.1046 ], [ 166.376, 76.9314 ], [ 174.18, 76.8361 ], [ -175.321, 76.3227 ], [ -111.726, 37.2888 ], [ -110.816, 34.9036 ], [ -109.957, 32.5118 ], [ -109.143, 30.1141 ], [ -108.369, 27.7113 ], [ -107.63, 25.3039 ], [ -106.921, 22.8925 ], [ -106.24, 20.4776 ], [ -105.583, 18.0596 ], [ -104.948, 15.6389 ], [ -104.332, 13.216 ], [ -103.734, 10.791 ], [ -103.15, 8.36442 ], [ -102.58, 5.93647 ], [ -102.021, 3.50744 ], [ -101.472, 1.07126 ], [ -100.932, -1.35914 ], [ -100.4, -3.78986 ], [ -99.875, -6.22067 ], [ -99.3547, -8.65138 ], [ -98.8384, -11.0818 ], [ -98.3248, -13.5116 ], [ -97.8129, -15.9408 ], [ -97.3014, -18.3692 ], [ -96.7891, -20.7965 ], [ -96.2748, -23.2226 ], [ -95.757, -25.6473 ], [ -95.2344, -28.0707 ], [ -94.7051, -30.4923 ], [ -94.1676, -32.9123 ], [ -93.6196, -35.3304 ], [ -93.059, -37.7465 ], [ -92.483, -40.1604 ], [ -91.8884, -42.5721 ], [ -91.2715, -44.9814 ], [ -90.6278, -47.3882 ], [ -89.9517, -49.7922 ], [ -89.2363, -52.1932 ], [ -88.473, -54.591 ], [ -87.6509, -56.9852 ], [ -86.7554, -59.3753 ], [ -85.7675, -61.7607 ], [ -84.6613, -64.1405 ], [ -83.4004, -66.5136 ], [ -81.9328, -68.878 ], [ -80.1809, -71.231 ], [ -78.0245, -73.5683 ], [ -75.2669, -75.8826 ], [ -71.567, -78.1609 ], [ -66.2885, -80.3783 ], [ -58.1511, -82.4813 ], [ -44.4644, -84.3415 ], [ -20.6712, -85.6372 ], [ 12.1746, -85.808 ], [ 38.9875, -84.7422 ], [ 54.7661, -82.9827 ], [ 63.9727, -80.9242 ], [ 69.815, -78.7288 ], [ 73.8374, -76.4628 ], [ 76.7931, -74.1559 ], [ 79.0789, -71.8235 ], [ 80.9194, -69.4738 ], [ 82.4503, -67.1118 ], [ 83.7578, -64.7406 ], [ 84.8993, -62.3621 ], [ 85.9143, -59.9778 ], [ 86.8311, -57.5886 ], [ 87.6703, -55.1951 ], [ 88.4473, -52.798 ], [ 89.1739, -50.3975 ], [ 89.8593, -47.9939 ], [ 90.5106, -45.5876 ], [ 91.1339, -43.1786 ], [ 91.7338, -40.7672 ], [ 92.3142, -38.3534 ], [ 92.8785, -35.9375 ], [ 93.4294, -33.5196 ], [ 93.9694, -31.0998 ], [ 94.5006, -28.6781 ], [ 95.0248, -26.2548 ], [ 95.5437, -23.83 ], [ 96.0588, -21.4039 ], [ 96.5716, -18.9765 ], [ 97.0832, -16.548 ], [ 97.595, -14.1186 ], [ 98.1081, -11.6885 ], [ 98.6237, -9.25779 ], [ 99.1429, -6.82674 ], [ 99.667, -4.39552 ], [ 100.197, -1.96435 ], [ 100.735, 0.466557 ], [ 101.281, 2.89696 ], [ 101.836, 5.32662 ], [ 102.404, 7.75526 ], [ 102.984, 10.1826 ], [ 103.579, 12.6084 ], [ 104.19, 15.0323 ], [ 104.821, 17.4539 ], [ 105.472, 19.873 ], [ 106.147, 22.2891 ], [ 106.848, 24.7018 ], [ 107.58, 27.1106 ], [ 108.345, 29.5149 ], [ 109.149, 31.9143 ], [ 109.996, 34.308 ], [ 110.892, 36.6952 ], [ 111.845, 39.0751 ], [ 112.863, 41.4466 ], [ 113.956, 43.8085 ], [ 115.136, 46.1592 ], [ 116.417, 48.4971 ], [ 117.817, 50.8199 ], [ 119.358, 53.1248 ], [ 121.066, 55.4085 ], [ 122.976, 57.6667 ], [ 125.129, 59.8937 ], [ 127.58, 62.0823 ], [ 130.396, 64.2229 ], [ 133.667, 66.3028 ], [ 137.502, 68.3046 ], [ 142.041, 70.205 ], [ 147.451, 71.972 ], [ 153.915, 73.5629 ], [ 161.597, 74.9218 ], [ 170.568, 75.9813 ], [ -179.309, 76.6701 ], [ -168.463, 76.9296 ], [ -168.474, 77.1088 ], [ -168.502, 77.5655 ], [ -168.574, 78.0221 ], [ -168.593, 78.4706 ], [ -168.612, 78.936 ], [ -168.667, 79.3898 ], [ -168.686, 79.8442 ], [ -168.768, 80.3003 ], [ -168.809, 80.7608 ], [ -168.858, 81.2183 ], [ -168.909, 81.6745 ], [ -168.962, 82.1323 ], [ -169.039, 82.5888 ], [ -169.188, 83.0411 ], [ -169.29, 83.496 ], [ -169.339, 83.9583 ], [ -169.472, 84.4147 ], [ -169.641, 84.8651 ], [ -169.815, 85.3274 ], [ -170.118, 85.7809 ], [ -170.406, 86.2337 ], [ -170.682, 86.6958 ], [ -171.155, 87.1517 ], [ -171.811, 87.6072 ], [ -172.815, 88.0602 ], [ -174.412, 88.516 ], [ -177.431, 88.9674 ], [ 174.732, 89.4068 ], [ 135.146, 89.7923 ], [ 37.9912, 89.6023 ], [ 94.0619, 87.418 ], [ 97.492, 85.0435 ], [ 98.4672, 82.6609 ], [ 98.7894, 80.2758 ], [ 98.8438, 77.8894 ], [ 98.7621, 75.5019 ], [ 98.6015, 73.1136 ], [ 98.3906, 70.7243 ], [ 98.1455, 68.334 ], [ 97.8757, 65.9427 ], [ 97.5873, 63.5503 ], [ 97.2843, 61.1567 ], [ 96.9694, 58.762 ], [ 96.6443, 56.366 ], [ 96.3105, 53.9687 ], [ 95.9687, 51.5701 ], [ 95.6196, 49.1702 ], [ 95.2637, 46.769 ], [ 94.9012, 44.3664 ], [ 94.5322, 41.9626 ], [ 94.1568, 39.5574 ], [ 93.7749, 37.1511 ], [ 93.3864, 34.7436 ], [ 92.9911, 32.335 ], [ 92.5888, 29.9254 ], [ 92.1792, 27.5149 ], [ 91.7619, 25.1036 ], [ 91.3366, 22.6916 ], [ 90.9028, 20.2791 ], [ 90.46, 17.8662 ], [ 90.0076, 15.4532 ], [ 89.545, 13.0402 ], [ 89.0715, 10.6273 ], [ 88.5863, 8.21494 ], [ 88.0886, 5.80321 ], [ 87.5773, 3.39241 ], [ 87.0516, 0.98282 ], [ 86.5101, -1.42527 ], [ 85.9516, -3.83154 ], [ 85.3747, -6.23564 ], [ 84.7776, -8.63721 ], [ 84.1587, -11.0358 ], [ 83.5159, -13.4311 ], [ 82.847, -15.8225 ], [ 82.1492, -18.2096 ], [ 81.4198, -20.5917 ], [ 80.6555, -22.9683 ], [ 79.8524, -25.3387 ], [ 79.0062, -27.702 ], [ 78.1122, -30.0573 ], [ 77.1644, -32.4038 ], [ 76.1564, -34.7402 ], [ 75.0804, -37.0651 ], [ 73.9275, -39.377 ], [ 72.6873, -41.6742 ], [ 71.3472, -43.9544 ], [ 69.8927, -46.215 ], [ 68.3062, -48.453 ], [ 66.567, -50.6645 ], [ 64.6501, -52.8451 ], [ 62.5255, -54.989 ], [ 60.1574, -57.0891 ], [ 57.5025, -59.1369 ], [ 54.5097, -61.1212 ], [ 51.1188, -63.0282 ], [ 47.2611, -64.8405 ], [ 42.861, -66.5365 ], [ 37.8422, -68.0891 ], [ 32.139, -69.466 ], [ 25.7161, -70.6298 ], [ 18.5948, -71.5405 ], [ 10.8801, -72.1592 ], [ 2.77311, -72.4552 ], [ -5.44774, -72.412 ], [ -13.4793, -72.0322 ], [ -21.0591, -71.3363 ], [ -28.0099, -70.3578 ], [ -34.25, -69.1364 ], [ -39.7748, -67.7117 ], [ -44.63, -66.1201 ], [ -48.8856, -64.3925 ], [ -52.6182, -62.5545 ], [ -55.9022, -60.6266 ], [ -58.8041, -58.6253 ], [ -61.3819, -56.5635 ], [ -63.6846, -54.4517 ], [ -65.7534, -52.2982 ], [ -67.6228, -50.1095 ], [ -69.3212, -47.8911 ], [ -70.8724, -45.6474 ], [ -72.2964, -43.3818 ], [ -73.6099, -41.0974 ], [ -74.827, -38.7966 ], [ -75.9595, -36.4815 ], [ -77.0174, -34.1539 ], [ -78.0095, -31.8152 ], [ -78.9431, -29.4667 ], [ -79.8246, -27.1096 ], [ -80.6594, -24.7448 ], [ -81.4523, -22.3732 ], [ -82.2075, -19.9955 ], [ -82.9285, -17.6125 ], [ -83.6187, -15.2246 ], [ -84.2809, -12.8326 ], [ -84.9174, -10.4369 ], [ -85.5306, -8.03787 ], [ -86.1224, -5.63604 ], [ -86.6945, -3.23178 ], [ -87.2485, -0.825447 ], [ -87.7859, 1.58262 ], [ -88.3078, 3.99212 ], [ -88.8168, 6.40905 ], [ -89.3112, 8.82055 ], [ -89.7933, 11.2327 ], [ -90.264, 13.6451 ], [ -90.7239, 16.0578 ], [ -91.1737, 18.4704 ], [ -91.6141, 20.8828 ], [ -92.0457, 23.2948 ], [ -92.4688, 25.7062 ], [ -92.884, 28.1169 ], [ -93.2917, 30.5269 ], [ -93.6921, 32.9359 ], [ -94.0856, 35.3439 ], [ -94.4723, 37.7507 ], [ -94.8525, 40.1565 ], [ -97.1809, 86.0477 ], [ -89.7948, 88.4093 ], [ 10.3685, 89.6098 ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/issues-124.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "issues-124",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 123.901846, -29.596765 ], [ 125.905655, -29.482468 ], [ 127.90284, -29.33837 ], [ 129.892531, -29.164777 ], [ 131.873905, -28.962029 ], [ 133.846196, -28.730497 ], [ 135.808693, -28.470586 ], [ 137.760745, -28.182725 ], [ 139.701766, -27.867371 ], [ 141.631233, -27.525003 ], [ 143.548689, -27.156122 ], [ 145.453744, -26.761247 ], [ 147.346071, -26.340915 ], [ 149.225413, -25.895676 ], [ 151.091573, -25.426095 ], [ 152.94442, -24.932748 ], [ 154.783882, -24.416219 ], [ 156.609948, -23.877103 ], [ 158.42266, -23.316001 ], [ 160.222119, -22.733521 ], [ 162.008472, -22.130275 ], [ 163.781918, -21.506881 ], [ 165.5427, -20.863961 ], [ 167.291103, -20.202141 ], [ 169.027453, -19.52205 ], [ 170.752112, -18.824321 ], [ 172.465476, -18.10959 ], [ 174.167973, -17.378496 ], [ 175.860059, -16.631684 ], [ 177.542215, -15.869801 ], [ 179.214949, -15.093498 ], [ -179.121213, -14.303433 ], [ -177.465723, -13.500268 ], [ -175.818017, -12.68467 ], [ -174.177514, -11.857314 ], [ -172.543622, -11.01888 ], [ -170.915733, -10.170058 ], [ -169.293233, -9.311543 ], [ -167.675494, -8.44404 ], [ -166.061883, -7.568263 ], [ -164.451761, -6.684935 ], [ -162.844481, -5.794788 ], [ -161.239394, -4.898567 ], [ -159.635847, -3.997022 ], [ -158.033185, -3.09092 ], [ -156.430751, -2.181032 ], [ -154.827888, -1.268146 ], [ -153.223941, -0.353057 ], [ -151.618256, 0.563429 ], [ -150.010182, 1.480493 ], [ -148.39907, 2.39731 ], [ -146.784279, 3.313042 ], [ -145.165171, 4.226841 ], [ -143.541118, 5.137852 ], [ -141.911499, 6.045211 ], [ -140.275702, 6.948045 ], [ -138.633128, 7.845477 ], [ -136.98319, 8.736619 ], [ -135.325315, 9.620583 ], [ -133.658947, 10.496472 ], [ -131.983548, 11.363389 ], [ -130.298601, 12.220432 ], [ -128.603608, 13.066701 ], [ -126.898101, 13.901294 ], [ -125.181634, 14.723309 ], [ -123.453794, 15.531851 ], [ -121.714197, 16.326024 ], [ -119.962496, 17.104942 ], [ -118.198382, 17.867724 ], [ -116.421584, 18.613496 ], [ -114.631877, 19.341398 ], [ -112.82908, 20.050579 ], [ -111.013063, 20.740203 ], [ -109.183745, 21.409449 ], [ -107.341102, 22.057513 ], [ -105.485167, 22.683612 ], [ -103.61603, 23.286982 ], [ -101.733844, 23.866882 ], [ -99.838825, 24.422599 ], [ -97.931251, 24.953444 ], [ -96.011468, 25.458758 ], [ -94.079886, 25.937915 ], [ -92.136981, 26.390319 ], [ -90.183293, 26.815412 ], [ -88.219426, 27.212671 ], [ -86.246047, 27.581612 ], [ -84.263878, 27.921791 ], [ -82.273701, 28.232809 ], [ -80.276348, 28.514305 ], [ -78.272698, 28.765967 ], [ -76.263673, 28.987525 ], [ -74.25023, 29.178759 ], [ -72.233359, 29.339491 ], [ -70.214071, 29.469595 ], [ -68.193396, 29.568988 ], [ -66.172372, 29.637637 ], [ -64.152041, 29.675554 ], [ -62.13344, 29.682796 ], [ -60.117593, 29.659465 ], [ -58.105504, 29.605708 ], [ -56.098154, 29.521712 ], [ -54.096489, 29.407707 ], [ -52.101418, 29.263957 ], [ -50.113805, 29.090767 ], [ -48.134465, 28.888475 ], [ -46.164162, 28.657449 ], [ -44.203601, 28.398091 ], [ -42.253427, 28.110828 ], [ -40.314224, 27.796113 ], [ -38.386512, 27.454422 ], [ -36.470745, 27.086251 ], [ -34.567312, 26.692118 ], [ -32.676536, 26.272555 ], [ -30.798677, 25.828108 ], [ -28.933928, 25.359339 ], [ -27.082423, 24.866819 ], [ -25.244232, 24.35113 ], [ -23.419371, 23.812863 ], [ -21.607794, 23.252614 ], [ -19.809407, 22.670989 ], [ -18.024062, 22.068596 ], [ -16.251564, 21.44605 ], [ -14.491672, 20.803969 ], [ -12.744103, 20.142976 ], [ -11.008535, 19.463698 ], [ -9.284608, 18.766764 ], [ -7.571931, 18.052808 ], [ -5.870077, 17.322467 ], [ -4.178596, 16.576382 ], [ -2.497007, 15.815198 ], [ -0.824807, 15.039565 ], [ 0.838527, 14.250138 ], [ 2.49354, 13.447577 ], [ 4.140794, 12.632548 ], [ 5.780866, 11.805723 ], [ 7.414347, 10.967783 ], [ 9.041841, 10.119414 ], [ 10.663961, 9.261312 ], [ 12.281332, 8.394181 ], [ 13.894585, 7.518732 ], [ 15.50436, 6.635689 ], [ 17.1113, 5.745783 ], [ 18.716053, 4.849757 ], [ 20.319274, 3.948364 ], [ 21.921615, 3.042366 ], [ 23.523733, 2.132539 ], [ 25.126286, 1.219666 ], [ 26.729929, 0.304545 ], [ 28.335316, -0.612019 ], [ 29.943101, -1.529207 ], [ 31.553931, -2.446193 ], [ 33.16845, -3.362138 ], [ 34.787298, -4.276195 ], [ 36.411104, -5.187508 ], [ 38.040493, -6.095211 ], [ 39.676077, -6.998433 ], [ 41.318459, -7.896293 ], [ 42.968228, -8.787904 ], [ 44.62596, -9.672376 ], [ 46.292214, -10.548811 ], [ 47.967532, -11.41631 ], [ 49.652434, -12.273971 ], [ 51.34742, -13.12089 ], [ 53.052964, -13.956165 ], [ 54.769514, -14.778892 ], [ 56.497488, -15.588172 ], [ 58.237273, -16.383109 ], [ 59.989218, -17.162813 ], [ 61.753638, -17.9264 ], [ 63.530807, -18.672995 ], [ 65.320953, -19.401734 ], [ 67.12426, -20.111762 ], [ 68.940862, -20.802242 ], [ 70.770841, -21.472348 ], [ 72.614226, -22.121273 ], [ 74.470984, -22.748229 ], [ 76.341029, -23.352451 ], [ 78.224208, -23.933193 ], [ 80.120307, -24.489736 ], [ 82.029047, -25.021391 ], [ 83.950084, -25.527493 ], [ 85.883006, -26.007412 ], [ 87.827336, -26.460549 ], [ 89.782534, -26.886341 ], [ 91.747992, -27.284263 ], [ 93.723041, -27.653826 ], [ 95.706955, -27.994585 ], [ 97.698948, -28.306134 ], [ 99.698183, -28.588113 ], [ 101.703777, -28.840204 ], [ 103.714801, -29.062138 ], [ 105.730292, -29.253689 ], [ 107.749255, -29.414681 ], [ 109.770669, -29.544984 ], [ 111.793499, -29.644516 ], [ 113.816699, -29.713241 ], [ 115.839219, -29.751171 ], [ 117.860015, -29.758364 ], [ 119.878056, -29.734922 ], [ 121.892328, -29.680993 ], [ 123.901846, -29.596765 ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/issues-81.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "issues-81",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 166.0, 77.0 ], [ 180.0, 78.0 ], [ -180.0, 81.0 ], [ 162.0, 81.0 ], [ 166.0, 77.0 ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/latitude-band.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "latitude-band",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ -180.0, 40.0 ], [ 180.0, 40.0 ], [ 180.0, 50.0 ], [ -180.0, 50.0 ], [ -180.0, 40.0 ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/line.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "line",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "LineString", "coordinates": [ [ 170.0, -10.0 ], [ -170.0, 10.0 ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/multi-line.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "multi-line",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 170.0, -10.0 ], [ -170.0, 10.0 ] ], [ [ 0.0, 0.0 ], [ 1.0, 1.0 ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/multi-no-antimeridian.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "multi-no-antimeridian",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 100.0, 40.0 ], [ 100.0, 50.0 ], [ 90.0, 50.0 ], [ 90.0, 40.0 ], [ 100.0, 40.0 ] ] ], [ [ [ 100.0, 10.0 ], [ 100.0, 20.0 ], [ 90.0, 20.0 ], [ 90.0, 10.0 ], [ 100.0, 10.0 ] ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/multi-split.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "multi-split",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 170.0, 40.0 ], [ -170.0, 40.0 ], [ -170.0, 50.0 ], [ 170.0, 50.0 ], [ 170.0, 40.0 ] ] ], [ [ [ 170.0, -40.0 ], [ 170.0, -50.0 ], [ -170.0, -50.0 ], [ -170.0, -40.0 ], [ 170.0, -40.0 ] ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/north-pole.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "north-pole",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 45.0, 40.0 ], [ 135.0, 40.0 ], [ -135.0, 40.0 ], [ -45.0, 40.0 ], [ 45.0, 40.0 ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/one-ccw-hole.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "one-ccw-hole",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 170.0, 40.0 ], [ -170.0, 40.0 ], [ -170.0, 60.0 ], [ 170.0, 60.0 ], [ 170.0, 40.0 ] ], [ [ 175.0, 45.0 ], [ -175.0, 45.0 ], [ -175.0, 55.0 ], [ 175.0, 55.0 ], [ 175.0, 45.0 ] ] ] } }
]
}
8 changes: 8 additions & 0 deletions tests/data/ogr2ogr/one-hole.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"type": "FeatureCollection",
"name": "one-hole",
"crs": { "type": "name", "properties": { "name": "urn:ogc:def:crs:OGC:1.3:CRS84" } },
"features": [
{ "type": "Feature", "properties": { }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 170.0, 40.0 ], [ -170.0, 40.0 ], [ -170.0, 60.0 ], [ 170.0, 60.0 ], [ 170.0, 40.0 ] ], [ [ 175.0, 45.0 ], [ 175.0, 55.0 ], [ -175.0, 55.0 ], [ -175.0, 45.0 ], [ 175.0, 45.0 ] ] ] } }
]
}
Loading

0 comments on commit e67e96d

Please sign in to comment.