geo icon indicating copy to clipboard operation
geo copied to clipboard

Clarify and decide what the unknown dimension does in `geo-traits`

Open frewsxcv opened this issue 1 year ago • 5 comments

There was some discussion in Discord, but I also want to track this issue in GitHub. Should this block a geo-traits 0.2.0 release?

frewsxcv avatar Nov 01 '24 05:11 frewsxcv

Perhaps we should make a little progress here before 0.2.0

kylebarron avatar Nov 06 '24 19:11 kylebarron

Relevant discussion: https://github.com/georust/geojson/pull/245#issuecomment-2466771255

frewsxcv avatar Nov 11 '24 01:11 frewsxcv

Consolidating discussion here from https://github.com/georust/geojson/pull/245

I would prefer not having dim return Option, because I think it's unreasonable to ask every consumer to check for a null dimension.

In the GeoJSON case, it would only apply to empty geometries. How wrong would it be to pass on Unknown(2), or something like that. The GeoJSON geometry is empty, so it could have two dimensions. Maybe lying in a way that could be true in very rare circumstances is better than making every reader consider None

kylebarron avatar Nov 18 '24 14:11 kylebarron

For the time being, that seems alright to me. In which case, that wouldn't require any changes to the current dimensions implementation, right?

frewsxcv avatar Nov 21 '24 21:11 frewsxcv

Correct I believe, and then we can continue the discussion after 0.2 is released

kylebarron avatar Nov 21 '24 22:11 kylebarron