Skip to content

Commit

Permalink
Small updates to orientation specification (#80)
Browse files Browse the repository at this point in the history
  • Loading branch information
jorisvandenbossche authored Apr 25, 2022
1 parent df0f67f commit 3cb44a0
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 7 deletions.
Binary file modified examples/example.parquet
Binary file not shown.
1 change: 0 additions & 1 deletion examples/example.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
"geometry_type": ["Polygon", "MultiPolygon"],
"crs": df.crs.to_wkt(pyproj.enums.WktVersion.WKT2_2019_SIMPLIFIED),
"edges": "planar",
"orientation": "counterclockwise",
"bbox": [round(x, 4) for x in df.geometry.unary_union.bounds],
},
},
Expand Down
3 changes: 1 addition & 2 deletions examples/example_metadata.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@
"geometry_type": [
"Polygon",
"MultiPolygon"
],
"orientation": "counterclockwise"
]
}
},
"primary_column": "geometry",
Expand Down
6 changes: 2 additions & 4 deletions format-specs/geoparquet.md
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ Each geometry column in the dataset must be included in the columns field above
| encoding | string | **REQUIRED** Name of the geometry encoding format. Currently only 'WKB' is supported. |
| geometry_type | string or \[string] | **REQUIRED** The geometry type(s) of all geometries, or 'Unknown' if they are not known. |
| crs | string | **OPTIONAL** [WKT2](https://docs.opengeospatial.org/is/18-010r7/18-010r7.html) string representing the Coordinate Reference System (CRS) of the geometry. If the crs field is not included then the data in this column must be stored in longitude, latitude. In the case where a crs is not provided, CRS-aware implementations should assume a default value of [OGC:CRS84](https://www.opengis.net/def/crs/OGC/1.3/CRS84) (longitude-latitude coordinates). |
| orientation | string | **OPTIONAL** Winding order of exterior ring of polygons; interior rings are wound in opposite order. If present must be "counterclockwise". If absent, no assertions are made regarding the winding order.
| orientation | string | **OPTIONAL** Winding order of exterior ring of polygons. If present must be 'counterclockwise'; interior rings are wound in opposite order. If absent, no assertions are made regarding the winding order.
| edges | string | **OPTIONAL** Name of the coordinate system for the edges. Must be one of 'planar' or 'spherical'. The default value is 'planar'. |
| bbox | \[number] | **OPTIONAL** Bounding Box of the geometries in the file, formatted according to [RFC 7946, section 5](https://tools.ietf.org/html/rfc7946#section-5). |
| epoch | double | **OPTIONAL** Coordinate epoch in case of a dynamic CRS, expressed as a decimal year. |
Expand Down Expand Up @@ -168,9 +168,7 @@ This attribute indicates how to interpret the edges of the geometries: whether t

If no value is set, the default value to assume is 'planar'.

Note if `edges` is 'spherical' then it is recommended that `orientation` is always set to 'counterclockwise'. If it is not set, it is not clear how polygons should be interpreted within spherical coordinate systems, which can lead to major analytical errors if interpreted incorrectly.
then implementations should choose the smaller polygon for interpretation (but note this can only work with polygons
smaller than hemisphere, which is why it is recommended to always set it).
Note if `edges` is 'spherical' then it is recommended that `orientation` is always ensured to be 'counterclockwise'. If it is not set, it is not clear how polygons should be interpreted within spherical coordinate systems, which can lead to major analytical errors if interpreted incorrectly.

#### bbox

Expand Down

0 comments on commit 3cb44a0

Please sign in to comment.