[R-sig-DB] [R-sig-Geo] R and MS SQL Spatial

Roger Bivand Roger@B|v@nd @end|ng |rom nhh@no
Fri Dec 6 10:37:49 CET 2013


On Fri, 6 Dec 2013, Domagoj Culinovic wrote:

> I have a lot of spatial and statistical data stored in MS SQL Spatial. Now
> i am using web-gis server to produce thematic maps, but for better analyses
> i need R.
> Can someone help me to find solution for MS SQL Spatial. Some examples code
> will be welcome too, because i am new in R.
>

If you are using Windows, and have installed the rgdal CRAN Windows binary 
package, then the correct driver should be available. The driver should 
work as desrcibed in OGR:

http://www.gdal.org/ogr/drv_mssqlspatial.html

On loading rgdal, look for MSSQLSpatial in:

library(rgdal)
ogrDrivers()

You may need to proceed by trial and error to find the incantation for 
dsn= and layer= in ogrInfo() and readOGR() to access your data. Maybe try 
ogrListLayers() with your supposed dsn= first to see which layers are 
reported. I don't use this driver, so advice from others who do would be 
very useful.

Hope this helps,

Roger

> 	[[alternative HTML version deleted]]

PS: only post plain text please! HTML mail is larger in size and can 
contain bad payloads that consume energy to remove. This is a low-carbon 
footprint list.

>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo using r-project.org
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>

-- 
Roger Bivand
Department of Economics, Norwegian School of Economics,
Helleveien 30, N-5045 Bergen, Norway.
voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand using nhh.no




More information about the R-sig-DB mailing list