[R-sig-Geo] GIS Tasks in R
Roger Bivand
Roger.Bivand at nhh.no
Tue Feb 6 21:35:24 CET 2007
On Tue, 6 Feb 2007, CJ Jackson wrote:
> Hi everyone,
>
> I'm currently working on my PhD (geology) and would like to explore the
> possible GIS capabilities of R. I currently use ESRI's ArcView (3.x),
> ArcGIS (9.1), and ArcInfo (9) software for all of my GIS work. I have
> written an "extension" for the old ArcView that performs various
> analyses of points/polylines/polygons and have been wanting to update
> the extension for the latest version of ArcGIS to help me solve various
> research problems. With that being said, I discovered 'R' last year and
> fell in love with it and have been using it for data analysis of
> attribute tables from GIS Shapefiles. Ultimately, as part of my
> research, I would like to make a package for R that would handle various
> GIS tasks of shapefiles themselves, not just their data tables. It
> would be great to have a analysis package for my research that is not
> solely dependent on ESRI's software. Furthermore, I dread programming
> in Visual Basic for the new ArcGIS because I have limited programming
> skills.
There are a number of possibilities for computing on the geometries, using
the classes defined in the sp package as containers. There is no direct
interface to the Geom functionality in GDAL/OGR, so access to
computational geometry is patchy, and spread across several packages.
> Here are some of the tasks I would like to perform:
>
> - produce a new point shapefile that contains points where two or more
> shapefiles with polylines intersect
This involves finding the crossing point of the polylines, and may be
somewhere, probably an internal function in the spatstat package - see
?distppll for a list (the functions are described as not being for users
to call directly, but I've found those I've used very solid). There may be
suitable code in the PBSmapping package.
> - intersect two or more shapefiles with polygons and store the results
> in a new shapefile
Either the PBSmapping package or use gpclib with sp and maptools (there is
a function for merging SpatialPolygons in a single set of shapes in
maptools using gpclib).
> - calculate area of polygons
Code lots of places, sp, PBSmapping, spatstat, splancs - the main issues
are what to do with holes.
> - calculate the distance from a point shapefile to another point shapefile
>
spDistN1 in sp, stepping over the coordinates in one set for all in the
other probably using *apply(), or alternatives in spatstat or splancs.
I'm assuming that the geometries are all projected, if not, things get a
bit more interesting.
> Is this possible in R, or, am I barking up the wrong tree? Thanks!
>
library(fortunes)
fortune("Yoda")
Roger
> cj
>
> _______________________________________________
> 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