Closed brownag closed 1 year ago
This has all been folded into the geopackage()
constructor in v0.0.5.
dsn
then a temporary geopackage file will be created at time of construction.dsn
is specified (but does not exist), it will be created when x
is a (optionally named) list of objects to add to the database. dsn
exists it is not updated. Attempts to update an existing dsn via the geopackage() constructor will give an informative error. gpkg_read()
, or the non-list constructors, can be used to load an existing database as a geopackage object from file and gpkg_write()
is used to append one (or more) layers. gpkg_write()
is necessary to gain full control over all possible layer creation options.
Creation of a
geopackage
object should collect or create all the required information to take any associated R data objects and user input and create a GeoPackage file. There is no mechanism to do the whole process currently, the user has to build a new file incrementally withgpkg_write(<object>, ...)
, possibly appending to an existing file.Currently you can also create
geopackage
S3 objects that are not "backed up by" (or derived from) any file. This is not currently a useful thing to do, the object is really only "read only" by the time the R user sees it. No changes they make to the R object can be done to the geopackage without going through the SQLiteConnection.I would like to have a
gpkg_write(<geopackage>)
method that will essentially figure out the sequence of layer writes, table updates etc. that are necessary to create a (possibly complex) GeoPackage directly from an R object (i.e. a list of layers)