reading geopackage gpkg with readOGR

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

reading geopackage gpkg with readOGR

Patrick Giraudoux
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: reading geopackage gpkg with readOGR

Bede-Fazekas Ákos
CONTENTS DELETED
The author has deleted this message.
Reply | Threaded
Open this post in threaded view
|

Re: reading geopackage gpkg with readOGR

Roger Bivand
Administrator
On Tue, 13 Apr 2021, Bede-Fazekas Ákos wrote:

> Dear Patrick,

In rgdal, the available drivers are found with ogrDrivers(), which  you
may check. Which platform is  this and if a source install, how was GDAL
installed? Layers in vector data sources (dsn) are found with

ogrListLayers(dsn)

where dsn is the (path to and) GPKG name.
ogrListLayers("./Shapes/trspixNaratiUTM44_alt_UTM44.gpkg") may show
several layers (but should choose the first by default when reading). are
there any other messages?

Roger

> please take a look at sf::st_layers(dsn), this gives you the name of, and
> basic information on, the layers found in the specific file/folder (dsn).
> HTH,
> Ákos Bede-Fazekas
>
> 2021.04.13. 8:35 keltezéssel, Patrick Giraudoux írta:
>>  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]]
>>
>>  _______________________________________________
>>  R-sig-Geo mailing list
>>  [hidden email]
>>  https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
> _______________________________________________
> R-sig-Geo mailing list
> [hidden email]
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
>
--
Roger Bivand
Emeritus Professor
Department of Economics, Norwegian School of Economics,
Postboks 3490 Ytre Sandviken, 5045 Bergen, Norway.
e-mail: [hidden email]
https://orcid.org/0000-0003-2392-6140
https://scholar.google.no/citations?user=AWeghB0AAAAJ&hl=en
_______________________________________________
R-sig-Geo mailing list
[hidden email]
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
Roger Bivand
Department of Economics
Norwegian School of Economics
Helleveien 30
N-5045 Bergen, Norway
Reply | Threaded
Open this post in threaded view
|

Re: reading geopackage gpkg with readOGR

Patrick Giraudoux
In reply to this post by Patrick Giraudoux
CONTENTS DELETED
The author has deleted this message.