Closed Kirill888 closed 5 months ago
Thoughts @mraspaud ?
Related #460
I wasn't aware of the gcps allowing a missing z coordinate. So indeed, the code isn't made for that, but definitely should make z optional, both in reading and in generating the geojson.
Ground Control Points are allowed to omit elevation component, however logic in here assumes GCPs are always in
x,y,z
form:https://github.com/corteva/rioxarray/blob/166c0c76d9e174387ca6b2368f7eb6a3d07ec13a/rioxarray/rioxarray.py#L1255
When geometry is specified with only
x,y
coordinatesIndexError
is raised when calling.rio.get_gcps()
.Code here
https://github.com/corteva/rioxarray/blob/166c0c76d9e174387ca6b2368f7eb6a3d07ec13a/rioxarray/rioxarray.py#L1289
should probably generate
[float, float]
instead of[float, float, None]
when GCP is missing height information.