-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #84 from planetlabs/overture
Ensure that Parquet with complex types transforms to valid GeoParquet
- Loading branch information
Showing
6 changed files
with
362 additions
and
12 deletions.
There are no files selected for viewing
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
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
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
105 changes: 105 additions & 0 deletions
105
internal/validator/testdata/complex-types/expected.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,105 @@ | ||
{ | ||
"checks": [ | ||
{ | ||
"title": "file must include a \"geo\" metadata key", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "metadata must be a JSON object", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "metadata must include a \"version\" string", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "metadata must include a \"primary_column\" string", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "metadata must include a \"columns\" object", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "column metadata must include the \"primary_column\" name", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "column metadata must include a valid \"encoding\" string", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "column metadata must include a \"geometry_types\" list", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "optional \"crs\" must be null or a PROJJSON object", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "optional \"orientation\" must be a valid string", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "optional \"edges\" must be a valid string", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "optional \"bbox\" must be an array of 4 or 6 numbers", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "optional \"epoch\" must be a number", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "geometry columns must not be grouped", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "geometry columns must be stored using the BYTE_ARRAY parquet type", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "geometry columns must be required or optional, not repeated", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "all geometry values match the \"encoding\" metadata", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "all geometry types must be included in the \"geometry_types\" metadata (if not empty)", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "all polygon geometries must follow the \"orientation\" metadata (if present)", | ||
"run": true, | ||
"passed": true | ||
}, | ||
{ | ||
"title": "all geometries must fall within the \"bbox\" metadata (if present)", | ||
"run": true, | ||
"passed": true | ||
} | ||
], | ||
"metadataOnly": false | ||
} |
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,85 @@ | ||
{ | ||
"metadata": { | ||
"version": "1.0.0", | ||
"primary_column": "geometry", | ||
"columns": { | ||
"geometry": { | ||
"encoding": "WKB", | ||
"geometry_types": [ | ||
"Point" | ||
], | ||
"orientation": "counterclockwise", | ||
"edges": "planar", | ||
"bbox": [ | ||
0, | ||
0, | ||
0, | ||
0 | ||
], | ||
"epoch": 2021.47, | ||
"crs": { | ||
"$schema": "https://proj.org/schemas/v0.5/projjson.schema.json", | ||
"type": "GeographicCRS", | ||
"name": "WGS 84 longitude-latitude", | ||
"datum": { | ||
"type": "GeodeticReferenceFrame", | ||
"name": "World Geodetic System 1984", | ||
"ellipsoid": { | ||
"name": "WGS 84", | ||
"semi_major_axis": 6378137, | ||
"inverse_flattening": 298.257223563 | ||
} | ||
}, | ||
"coordinate_system": { | ||
"subtype": "ellipsoidal", | ||
"axis": [ | ||
{ | ||
"name": "Geodetic longitude", | ||
"abbreviation": "Lon", | ||
"direction": "east", | ||
"unit": "degree" | ||
}, | ||
{ | ||
"name": "Geodetic latitude", | ||
"abbreviation": "Lat", | ||
"direction": "north", | ||
"unit": "degree" | ||
} | ||
] | ||
}, | ||
"id": { | ||
"authority": "OGC", | ||
"code": "CRS84" | ||
} | ||
} | ||
} | ||
} | ||
}, | ||
"data": { | ||
"type": "FeatureCollection", | ||
"features": [ | ||
{ | ||
"type": "Feature", | ||
"properties": { | ||
"numbers": [2, 4, 6, 8], | ||
"strings": ["chicken", "soup"], | ||
"object": { | ||
"name": "Bob" | ||
}, | ||
"names": { | ||
"common": [ | ||
{"value": "Hello", "language": "en"} | ||
] | ||
} | ||
}, | ||
"geometry": { | ||
"type": "Point", | ||
"coordinates": [ | ||
0, | ||
0 | ||
] | ||
} | ||
} | ||
] | ||
} | ||
} |
Oops, something went wrong.