GeoInterface.jl
GeoInterface.jl copied to clipboard
Add a `coordtype` method
I'm not sure if this is possible (do any formats allow mixed coordinate types like Float32 and Float64 in the same dataset on even the same polygon??)
But it would be good to be able to get the coord type at any level, e.g. on a feature or polygon as well as a point. Then we can pass it into loops to fix type stability, and use it to e.g. preallocate vectors.
@asinghvi17 @skygering were discussing this on slack recently. Currently in GeometryOps,jl we just default to Float64 and allow user override. But it could be nice to detect the coord type and use that.
Formats would not allow mixed coordinate types but it would be super useful to have e.g. Unitful support.
This could also be extremely useful for fixing empty collection problems