brownag / gpkg

Utilities for the Open Geospatial Consortium (OGC) 'GeoPackage' Format in R
http://humus.rocks/gpkg/
Creative Commons Zero v1.0 Universal
18 stars 0 forks source link

consider use of R6 for geopackage #10

Closed brownag closed 1 year ago

brownag commented 1 year ago

Early on I decided I didn't want to use the R6 system for geopackage, but my attempt for in-place modification (#9) for connecting existing objects (that has been reverted) has renewed consideration.

I might need to make a draft PR to test this out to be sure it is not what I want.

R6 could allows for better maintenance of state within existing objects, allowing for proper in-place modification by e.g. definition of a <geopackage>$connect() method

brownag commented 1 year ago

An alternate approach (#11) using object-specific environments allows for the in-place usage of gpkg_connect(<geopackage>) with the S3 object, without use of assign() / parent.env() or relying on identifying objects by name