Skip to content
Prev 2077 / 29559 Next

read prj file to CRS

On Thu, 17 May 2007, Patrick Giraudoux wrote:

            
Or simpler:

mymap <- readOGR(dsn=".", layer="Mth030607")

where dsn= is a directory (data source name) containing one or more 
shapefiles. Because OGR supports many formats, it has to handle many 
different ways of defining the data sources, and that is why dsn= and 
layer= are split in this way.

writeOGR() uses similar mechanisms to readOGR(), and for most users should 
be prefered to the maptools shapefile functions. The exception is if you 
have difficulty in installing rgdal on your platform, because both 
Linux/Unix and Mac OSX need to link to external libraries.

Roger