Anshul Singhvi
Anshul Singhvi
IMO `crs!(x)` only makes sense if `x` is mutable and can change its CRS, which is not the case for LibGEOS, Shapefile, GeoJSON, WKB, all other Julia reader geometries, and...
Here's a brief prototype that we can override for known types: ```julia import GeoInterface as GI setcrs(x, crs) = setcrs(GI.trait(x), x, crs) function setcrs(trait::Nothing, x, crs) error("Trait not found for...
We can then dispatch on the type of `x`, or use GeometryOpsCore to make `setcrs` work on tables etc.
That sounds like a good idea
Maybe with a kwarg `force` that allows you to force the CRS, for example if you've read a GeoJSON (default crs is latlong) that you want to treat as some...
Wouldn't the correct handling for this be a FeatureCollection with no attributes?
```julia function vec2fc(vec) @assert all(x -> !isnothing(GI.geomtrait(x)), vec) fc = GI.FeatureCollection(GI.Feature.(vec; properties = (;)) end ``` ought to work as the core conversion method, if someone wants to take this...
Hmm, getgeom on a table might be better than this. But my thought was for simple operations like plotting: ```julia # current state df[!, first(GI.geometrycolumns(df))] # alternatives df[!, GI.geometrycolumn(df)] #...
We should ask what other ecosystems do at SDSL
`euclidean_distance` seems to be the straight-line distance between two points on the Earth, going _through_ the surface of the Earth: https://github.com/JuliaGeo/Geodesy.jl/blob/b5a3f70471b2b288ff588e5049f435cda6a76eb4/src/distances.jl#L6-L10 https://github.com/JuliaGeo/Geodesy.jl/blob/b5a3f70471b2b288ff588e5049f435cda6a76eb4/src/distances.jl#L16 so this is probably not the right function...