[R-sig-Geo] R spatial newbie seeks advice r.e. esri data-compatible packages
Roger Bivand
Roger.Bivand at nhh.no
Wed Apr 12 16:14:54 CEST 2006
On Tue, 11 Apr 2006, icosa atropa wrote:
> I'm new to R's spatial facilities. I've been reading the r-sig-geo
> mailing list for a week or two now, and I could use some advice.
>
> I've decided to use R for a ArcGIS class project. I spent today
> reading R spatial package docs, and I'm a little confused as to what
> work has been merged or duplicated, and what the most active tools are
> for certain tasks.
>
> To start with, I would like to read and write from ESRI formats such
> as shapefiles and coverages. For shapefiles i find the
> "shapefiles" and "maptools" packages; for coverages, I find "RArcInfo".
>
> For datum and projection conversions, I found that both "rgdal" and
> "sp" provide some functionality.
If you choose to treat the classes defined in the sp package as containers
for your data, then things are a bit simpler.
You can then read shapefiles into a SpatialPolygonsDataFrame object (or
...Points... or ...Lines... if appropriate) with readOGR() in rgdal, and
(some) raster data written by ArcGIS with readGDAL() in rgdal [some
because handling "." or "," in Arc ASCII grids seems to have changed
between ArcGIS 8 and 9].
You write shapefiles using writePolyShape() (or ...Points... or
...Lines...) in the maptools package, and write the *.prj using showWKT()
in rgdal. You can write Arc ASCII grids using writeAsciiGrid() in
maptools, but watch the dec= argument - different mixes of platforms and
locals can require patience. ArcView 3.2 is not so picky about the decimal
mark. writeGDAL() in rgdal writes very nice GeoTiffs (multiple floating
point bands, etc), but the ArcGIS 9.1 I have access to does not read them
correctly (however ENVI does).
You are correct that this is all work in progress. The targets also change
- things that worked with ArcGIS 8 now do not work, or work differently. I
think you will find the sp classes useful, because it is so easy to add
new data to the geometries.
What are you looking to do within R, and which discipline are you in?
Roger
>
> Any advice on where to start?
> Thanks,
> christian
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>
--
Roger Bivand
Economic Geography Section, Department of Economics, Norwegian School of
Economics and Business Administration, Helleveien 30, N-5045 Bergen,
Norway. voice: +47 55 95 93 55; fax +47 55 95 95 43
e-mail: Roger.Bivand at nhh.no
More information about the R-sig-Geo
mailing list