[R-sig-Geo] reading geopackage gpkg with readOGR

Patrick Giraudoux p@tr|ck@g|r@udoux @end|ng |rom un|v-|comte@|r
Tue Apr 13 08:35:02 CEST 2021


Dear listers,

I did not find the way to open a geopackage using rgdal::readOGR.

The package name is 'trspixNarati_alt_UTM44.gpkg' (with two companion 
files: 'trspixNarati_alt_UTM44.gpkg-shm' and 
'trspixNarati_alt_UTM44.gpkg-wal') stored in a folder 'Shapes'

The corresponding object should be a SpatialPointsDataFrame.

I have tried several combinations (a bit blind) with

readOGR("./Shapes/trspixNaratiUTM44_alt_UTM44.gpkg")

readOGR("./Shapes/","trspixNaratiUTM44_alt_UTM44.gpkg")

readOGR("./Shapes/","trspixNaratiUTM44_alt_UTM44")

with no success...

This link https://jsta.github.io/2016/07/14/geopackage-r.html gives 
indications on the how to to it, but supposes that one knows a layer 
name (which is not my case)

Any idea about the syntax of this driver ?

Best,

Patrick


	[[alternative HTML version deleted]]



More information about the R-sig-Geo mailing list