[R-sig-Geo] CSV with Geometry Column to SF object
tech_dev @end|ng |rom w||d|nte||ect@com
Tue Oct 15 19:11:24 CEST 2019
On 10/15/19 8:43 AM, argunaw . wrote:
> Hello Everyone,
> I have a csv file with a postgis "geometry" column. I've been trying to
> import it in to R as a SF file, with the goal of exporting it to a postgis
> database, but to no avail. I've used the following methods:
> 1. file <- st_read("name.csv", stringsAsFactors=F, geometry_column=geom)
> 2. file <- fread("name.csv", headers=True)
> file <- st_as_sf(file)
> How can I import a csv with a postgis "geometry" column in to R as a
> spatial/SF object?
> [[alternative HTML version deleted]]
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
Can you paste an example somewhere, is it binary data or some kind of
plain text column? Do you know how it was exported from Postgis?
If it's a dump from a postgis database did you try loading the table
directly to postgis with it's own load/import, or sql tools?
More information about the R-sig-Geo