R-ArcGIS / arcgisutils

http://r.esri.com/arcgisutils/
Apache License 2.0
15 stars 2 forks source link

Geometry Overhaul #48

Closed JosiahParry closed 7 months ago

JosiahParry commented 7 months ago

This PR is a ground up rewrite of the geometry serialization from sf objects to EsriJSON. The current implementation using Rcpp and jsonify is too prone to errors and has been causing a number of headaches. The intent behind this is to use Rust and serde definitions to create geometries in a way that we know will always adhere to the format required. And if not, we will get a (messy) error.

This PR is massive with a lot of duplicative code but its the best I can do for now. It could potentially be simplified using a number of macros.

Additionally the functions as_featureset(), as_esri_featureset() and as_features() and as_esri_features() have a lot of duplicative checking that can probably be simplified into a couple of helpers.

This closes https://github.com/R-ArcGIS/arcgislayers/issues/184

TODO:

CC @mmachir @elipousson

JosiahParry commented 7 months ago

There is an issue with windows CI on 4.1 where core rust library is not being installed.

I have tested publishing with this but still needs more testing for

to be very sure that it works. But I am comfortable with merging this in.

Once {arcgisgeocode} is done, we will adjust arcgisutils to use vendored dependencies and then publish the new packages.