GeometryBasics.jl
GeometryBasics.jl copied to clipboard
More GeoInterface methods
This PR adds the following features:
- [x] Add more methods for Rect construction, since that's basically used as our bbox type. Calling
Recton any geometry should now return aRectwhich is the bbox of that geometry. - [x] Implement
GeoInterface.extenton top of the previous Rect changes. - [x] Implement
GeometryBasics.geointerface_geomtype, which GeoInterface picks up to allow other packages' geometries to be easily converted to GeometryBasics geometries (TODO: should we use this behaviour in Makie somehow?) - [x] Implement a lot of polygon operations like centroid, distance, signed area, etc. Also define GeoInterface methods backing these.
- [x] Reformat and add small optimizations to src/geointerface.jl.
TODOs still remaining:
- [x] Add a method to find distance which works well everywhere (the current method only checks for distance to nearest vertex)
- [ ] Look through the whole package, find more methods which GeoInterface methods can call
- [ ] Add tests
- [x] Make sure that performance is good! (tested with Polylabel.jl, it was pretty fast).
Can we break this up into smaller PRs so it gets merged sooner?
Specifically can we add a PR for geointerface_geomtypes just so convert(GeometryBasices, geom) works?
A lot of this has been taken over by GeometryOps!
So we can close this?