Skip to content
Back to formatted view

Raw Message

Message-ID: <c7d64267-d194-a210-dc70-d2ee27431b92@gmail.com>
Date: 2021-04-13T06:57:49Z
From: Bede-Fazekas Ákos
Subject: reading geopackage gpkg with readOGR
In-Reply-To: <8a6dc330-967f-71ae-5138-db734386d3db@univ-fcomte.fr>

Dear Patrick,
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
> R-sig-Geo at r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo