[R-sig-Geo] rgdal and MSSQL Server geometries
Craig.Mundy at utas.edu.au
Thu Apr 4 22:02:34 CEST 2013
The other requirement to read tables from MS SQL Server is that details of
the table with geometry columns must be registered in a table called
geometry_columns in your database. If your database doesn't have this table,
do the following;
1) write a small point or polygon object back to SQL Server using writeOGR.
2) This process will create two additional tables, the geometry_columns
table and a spatial_ref_sys table.
3) open the geometry_columns table in SQL Server, and create a new record
with the details of the table you want to read into R, following the pattern
of the record created by the write process.
4) try reading the table again
I'm out of the office for a day or so, but happy to help work this out. I
use rgdal to exchange spatial data between R and SQL Server on a weekly
basis, so can at least confirm that it works very nicely.
View this message in context: http://r-sig-geo.2731867.n2.nabble.com/rgdal-and-MSSQL-Server-geometries-tp7583193p7583209.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
More information about the R-sig-Geo