Skip to content

GIS Tasks in R

3 messages · CJ Jackson, Tim Keitt, Roger Bivand

#
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.  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
- intersect two or more shapefiles with polygons and store the results 
in a new shapefile
- calculate area of polygons
- calculate the distance from a point shapefile to another point shapefile

Is this possible in R, or, am I barking up the wrong tree?  Thanks!

cj
#
In addition to Rogers advise, you might take a peek at the functions
available in postgis. Once you have polys in the postgis database, you
can do quite a lot of geometry ops by eg "select intersection(poly1,
poly2) from tabname" and so on. There's some grunt work involved. Its
certainly not pointy-clicky (although QGIS and GRASS have some ability
to work with postgis). I have found some useful functions there.
Documentation is pretty good too.

THK
On 2/6/07, CJ Jackson <cwjacksonjr at hotmail.com> wrote:

  
    
#
On Tue, 6 Feb 2007, Tim Keitt wrote:

            
And as Edzer tried out recently, you can get data to PostGIS from rgdal 
if your GDAL/OGR is built with PostGIS (PostgreSQL anyway) support - 
writeOGR(). We didn't try readOGR(), but it ought to work if the driver is 
present. Reports welcome.

Roger