[R-sig-Geo] CSV with Geometry Column to SF object
@rgun@w @end|ng |rom gm@||@com
Tue Oct 15 19:58:30 CEST 2019
I'm not sure how it was exported from postgis- the person who gave me the
file wasn't the one who downloaded it unfortunately.
The file is a line file of roads. The files main columns are road ID
numbers (type integer) and the geometry column (type geometry, long strong
of letters and numbers). Only the IT admins where I am have the postgis
load/import tools in the pgadmin/sql interface. The rest of us can download
from sql and create new tables from other sql databases, but not create a
new table from a csv file.
On Tue, Oct 15, 2019 at 1:11 PM Alex Mandel <tech_dev using wildintellect.com>
> 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
> > 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
> > https://stat.ethz.ch/mailman/listinfo/r-sig-geo
> 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?
[[alternative HTML version deleted]]
More information about the R-sig-Geo