[R-sig-Geo] CSV with Geometry Column to SF object

argunaw . @rgun@w @end|ng |rom gm@||@com
Tue Oct 15 17:43:23 CEST 2019


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]]



More information about the R-sig-Geo mailing list