Hot answers tagged


The package PostGIStools can help. See for example the vignette. Another way could be to transform your Spatial*DataFrame geometry to WKT, insert into PostGIS using the classic RPostgreSQL package and re-create the geom there.


A simple function can do that for you. Here's how: allKmlLayers <- function(kmlfile){ lyr <- ogrListLayers(kmlfile) mykml <- list() for (i in 1:length(lyr)) { mykml[i] <- readOGR(kmlfile,lyr[i]) } names(mykml) <- lyr return(mykml) } use it with: kmlfile <- "se\\file.KML" mykml <- allKmlLayers(kmlfile)


The syntax to use with different GDAL vector drivers varies as well as how and where the syntax is documented in the corresponding driver pages. The SQL Server driver manual page has section "Connecting to a database" with basic instruction To connect to a MSSQL datasource, use a connection string specifying the database name, with additional ...

Only top voted, non community-wiki answers of a minimum length are eligible