GeoInterface.jl icon indicating copy to clipboard operation
GeoInterface.jl copied to clipboard

Add a `coordtype` method

Open rafaqz opened this issue 1 year ago • 4 comments

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.

rafaqz avatar Apr 17 '24 14:04 rafaqz

Formats would not allow mixed coordinate types but it would be super useful to have e.g. Unitful support.

asinghvi17 avatar Jun 16 '24 00:06 asinghvi17

This could also be extremely useful for fixing empty collection problems

rafaqz avatar Sep 25 '24 21:09 rafaqz