-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
netCDF: add support for writing CF-1.8 simple geometries
- Loading branch information
Showing
30 changed files
with
2,748 additions
and
341 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
autotest/gdrivers/data/netcdf-sg/write-tests/Yahara_alb.json
Large diffs are not rendered by default.
Oops, something went wrong.
9 changes: 9 additions & 0 deletions
9
autotest/gdrivers/data/netcdf-sg/write-tests/line3D_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "path", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "path1" }, "geometry": { "type": "LineString", "coordinates": [ [ 0.1, 0.2, 0.3 ], [99.0, -99.0, 0.0 ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "path2" }, "geometry": { "type": "LineString", "coordinates": [ [ 100.0, 101.0, 102.0 ], [ 25.0, 27.0, 29.0 ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "path3" }, "geometry": { "type": "LineString", "coordinates": [ [ 7.0, -11.0, -7.0 ], [ -11.0, 7, 11.0 ], [ -6.0, 1945.0, 1918.0] ] } } | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
autotest/gdrivers/data/netcdf-sg/write-tests/line_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "segv", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "seg1" }, "geometry": { "type": "LineString", "coordinates": [ [ 1.5, -1.5 ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "seg2" }, "geometry": { "type": "LineString", "coordinates": [ [ 30.5, 30.5 ], [ 5.0, 5.0 ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "seg3" }, "geometry": { "type": "LineString", "coordinates": [ [ 9.0, -9.0 ], [ 10.0, -10.0 ], [ -1.0, 1.0 ] ] } } | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
autotest/gdrivers/data/netcdf-sg/write-tests/multiline3D_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "streams", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "fresh_river" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 1.0, -5.0, 10.0] ], [ [ 2.0, -4.0, 9.0 ], [ 3.0, -3.0, 8.0 ], [ 4.0, -2.0, 7.0 ], [ 5.0 , -1.0, 8.0 ] ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "not_fresh_river" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 0.0, 1.0, 1.0], [ 1.0, 0.0, 2.0 ] ], [ [ 2.0, 0.0, 1.0 ], [ -2.0, 0.0, 1.0 ] ] ] } } | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
autotest/gdrivers/data/netcdf-sg/write-tests/multiline_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "streams", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "fresh_river" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 1.0, -5.0 ] ], [ [ 2.0, -4.0 ], [ 3.0, -3.0 ], [ 4.0, -2.0 ], [ 5.0 , -1.0 ] ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "not_so_fresh_river" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ -2.0, 5.0 ], [ -3.0, 4.0 ], [ -4.0, 3.0 ], [ -5.0, 2.0 ] ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "not_fresh_river" }, "geometry": { "type": "MultiLineString", "coordinates": [ [ [ 0.0, 1.0 ], [ 1.0, 0.0 ] ], [ [ 2.0, 0.0 ], [ -2.0, 0.0 ] ] ] } } | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
autotest/gdrivers/data/netcdf-sg/write-tests/multipoint3D_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "drilling_sites", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "site1" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ 0.0, -1.0, -5.0 ], [ 2.0, -2.0, 2.0 ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "site2" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ 7.0, -2.0, 1.0 ], [ 4.0, 3.0, 2.0 ], [ 8.0, -8.0, 3.0 ] ] } } | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
autotest/gdrivers/data/netcdf-sg/write-tests/multipoint_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "peak_list", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "Peaks1" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ 1.0, -1.0 ], [ 2.0, -2.0 ], [ 4.0, -4.0 ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "Peaks2" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ 5.0, -5.0 ], [ 6.0, -6.0 ], [ 8.0, -8.0 ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "Peaks3" }, "geometry": { "type": "MultiPoint", "coordinates": [ [ 9.0, -9.0 ], [ 10.0, -10.0 ], [ -2.0, 2.0 ] ] } } | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
autotest/gdrivers/data/netcdf-sg/write-tests/multipolygon3D_no_ir_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "mpoly_shape", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "Triangle" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 0.0, 0.0, 0.0 ], [ 1.0, 0.0, 1.0 ], [ 1.0, 1.0, 2.0 ], [ 0.0, 0.0, 3.0 ] ] ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "DoubleTriangle" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 3.0, 0.0, 0.0 ], [ 4.0, 0.0, 1.0 ], [ 4.0, 1.0, 2.0 ], [ 3.0, 0.0, 3.0 ] ] ], [ [ [ 3.0, 0.0, -1.0 ], [ 4.0, 1.0, -2.0 ], [ 3.0, 1.0, -3.0 ], [ 3.0, 0.0, -4.0 ] ] ] ] } } | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
autotest/gdrivers/data/netcdf-sg/write-tests/multipolygon3D_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "shapes", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "Trianglies" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 0.0, 0.0, 0.0 ], [ 1.0, 0.0, 1.0 ], [ 1.0, 1.0, 1.0 ], [ 0.0, 0.0, 0.0 ] ] ], [ [ [ 0.0, 0.0, 0.0 ], [ -1.0, 0.0, -1.0 ], [ -1.0, -1.0, -1.0 ], [ 0.0, 0.0, 0.0 ] ] ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "Prismy_and_Triangly" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 3.0, 0.0, 0.0], [ 4.0, 0.0, 0.0 ], [ 4.0, 1.0, 1.0 ], [ 3.0, 1.0, 1.0 ], [ 3.0, 0.0, 0.0 ] ], [ [3.5, 0.25, 0.0], [3.75, 0.25, 0.0], [3.75, 0.5, 0.1], [3.5, 0.5, 0.1], [3.5, 0.25, 0.0] ] ], [ [ [ 4.0, 4.0, 100.0 ], [ 4.0, 5.0, 101.0 ], [ 5.0, 4.0, 101.0 ], [ 4.0, 4.0, 100.0 ] ] ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "Single_Triangly" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ -2.0, 0.0, -5.0 ], [ -2.0, 1.0, -6.0 ], [ -1.0, 1.0, -6.0 ], [ -2.0, 0.0, -5.0 ] ] ] ] } } | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
autotest/gdrivers/data/netcdf-sg/write-tests/multipolygon_no_ir_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "mpoly_shape", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "Triangle" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 0.0, 0.0 ], [ 1.0, 0.0 ], [ 1.0, 1.0 ], [ 0.0, 0.0 ] ] ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "DoubleTriangle" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 3.0, 0.0 ], [ 4.0, 0.0 ], [ 4.0, 1.0 ], [ 3.0, 0.0 ] ] ], [ [ [ 3.0, 0.0 ], [ 4.0, 1.0 ], [ 3.0, 1.0 ], [ 3.0, 0.0 ] ] ] ] } } | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
autotest/gdrivers/data/netcdf-sg/write-tests/multipolygon_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "shapes", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "Triangles" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 0.0, 0.0 ], [ 1.0, 0.0 ], [ 1.0, 1.0 ], [ 0.0, 0.0 ] ] ], [ [ [ 0.0, 0.0 ], [ -1.0, 0.0 ], [ -1.0, -1.0 ], [ 0.0, 0.0 ] ] ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "Square_in_Square_and_Triangle" }, "geometry": { "type": "MultiPolygon", "coordinates": [ [ [ [ 3.0, 0.0 ], [ 4.0, 0.0 ], [ 4.0, 1.0 ], [ 3.0, 1.0 ], [ 3.0, 0.0 ] ], [ [3.5, 0.25], [3.75, 0.25], [3.75, 0.5], [3.5, 0.5], [3.5, 0.25] ] ], [ [ [ 4.0, 4.0 ], [ 4.0, 5.0 ], [ 5.0, 4.0 ], [ 4.0, 4.0 ] ] ] ] } } | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
autotest/gdrivers/data/netcdf-sg/write-tests/point3D_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "point_collection", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "FishingSpot1" }, "geometry": { "type": "Point", "coordinates": [ 0.5, -0.5, -1.5 ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "FishingSpot2" }, "geometry": { "type": "Point", "coordinates": [ 1.0, -1.0, -0.5 ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "FishingSpot3" }, "geometry": { "type": "Point", "coordinates": [ 1.5, -1.5, 0.5 ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "FishingSpot4" }, "geometry": { "type": "Point", "coordinates": [ 2.0, -2.0, 1.5 ] } } | ||
] | ||
} |
10 changes: 10 additions & 0 deletions
10
autotest/gdrivers/data/netcdf-sg/write-tests/point_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "point_collection", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "FishingSpot1" }, "geometry": { "type": "Point", "coordinates": [ 0.5, -0.5 ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "FishingSpot2" }, "geometry": { "type": "Point", "coordinates": [ 1.0, -1.0 ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "FishingSpot3" }, "geometry": { "type": "Point", "coordinates": [ 1.5, -1.5 ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "FishingSpot4" }, "geometry": { "type": "Point", "coordinates": [ 2.0, -2.0 ] } } | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
autotest/gdrivers/data/netcdf-sg/write-tests/polygon3D_no_ir_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "noir_write", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "ID": 0 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.0, 0.0, 0.0 ], [ 1.0, 0.0, 2.0 ], [ 1.0, 1.0, 0.0 ], [ 0.0, 0.0, 2.0 ] ] ] } }, | ||
{ "type": "Feature", "properties": { "ID": 1 }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.0, 0.0, -1.0 ], [ 4.0, 0.0, -2.0 ], [ 4.0, 1.0, 0.0 ], [ 3.0, 1.0, -2.0 ], [ 3.0, 0.0, -1.0 ] ] ] } } | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
autotest/gdrivers/data/netcdf-sg/write-tests/polygon3D_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "shapes", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "Trianglything" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.0, 0.0, 0.0 ], [ 1.0, 0.0, -1.0 ], [ 1.0, 1.0, -2.0 ], [ 0.0, 0.0, -3.0 ] ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "Prismthing" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.0, 0.0, 0.0 ], [ 4.0, 0.0, 0.0 ], [ 4.0, 1.0, 1.0 ], [ 3.0, 1.0, 1.0 ], [ 3.0, 0.0, 0.0] ], [ [3.5, 0.25, 1.0], [3.75, 0.25, 1.0], [3.75, 0.5, 1.0], [3.5, 0.5, 1.0], [3.5, 0.25, 1.0] ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "Trianglyflipped" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.0, 0.0, 0.0 ], [ -1.0, 0.0, 1.0 ], [ -1.0, -1.0, 2.0 ], [ 0.0, 0.0, 3.0 ] ] ] } } | ||
] | ||
} |
8 changes: 8 additions & 0 deletions
8
autotest/gdrivers/data/netcdf-sg/write-tests/polygon_no_ir_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "noir_write", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "Triangle" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.0, 0.0 ], [ 1.0, 0.0 ], [ 1.0, 1.0 ], [ 0.0, 0.0 ] ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "Square" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.0, 0.0 ], [ 4.0, 0.0 ], [ 4.0, 1.0 ], [ 3.0, 1.0 ], [ 3.0, 0.0 ] ] ] } } | ||
] | ||
} |
9 changes: 9 additions & 0 deletions
9
autotest/gdrivers/data/netcdf-sg/write-tests/polygon_write_test.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
{ | ||
"type": "FeatureCollection", | ||
"name": "shapes", | ||
"features": [ | ||
{ "type": "Feature", "properties": { "NAMES": "Triangle" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.0, 0.0 ], [ 1.0, 0.0 ], [ 1.0, 1.0 ], [ 0.0, 0.0 ] ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "Square_in_Square" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 3.0, 0.0 ], [ 4.0, 0.0 ], [ 4.0, 1.0 ], [ 3.0, 1.0 ], [ 3.0, 0.0 ] ], [ [3.5, 0.25], [3.75, 0.25], [3.75, 0.5], [3.5, 0.5], [3.5, 0.25] ] ] } }, | ||
{ "type": "Feature", "properties": { "NAMES": "Triangle_Flipped" }, "geometry": { "type": "Polygon", "coordinates": [ [ [ 0.0, 0.0 ], [ -1.0, 0.0 ], [ -1.0, -1.0 ], [ 0.0, 0.0 ] ] ] } } | ||
] | ||
} |
Oops, something went wrong.