1. Voronoi polygons with R

    Wed 16 September 2009
    cfarmer

    To create a nice bounded Voronoi polygons tessellation of a point layer in R, we need two libraries: sp and deldir. The following function takes a SpatialPointsDataFrame as input, and returns a SpatialPolygonsDataFrame that represents the Voronoi tessellation of the input point layer.

    read more

    comments

  2. Python, Matlab, and R

    Wed 12 August 2009
    cfarmer

    One project I’m working on at the moment involves exploring a dynamic extension of the Isomap algorithm for visualising constantly varying real-world road networks. Currently, we are testing out the method on a small scale simulated road network, and most of the original code (written by Laurens van der Maaten, with updates by Alexei Pozdnoukhov), was done in Matlab. Since this work is eventually going to have to run on relatively large datasets, and probably behind the scenes on a server somewhere, we decided that Python was the way to go. The goal therefore was to reproduce the Matlab code using only Python libraries, and the fewer additional libraries required, the better.

    read more

    comments

  3. R featured in New York Times

    Wed 28 January 2009
    cfarmer

    I’m sure everyone has seen this already, but I’m going to post it anyway, as I think the more exposure open-source tools get, the better off we’ll all be!

    Check out this New York Times article which features R, the open-source statistical programming language. R now has quite an extensive range of spatial analysis options, and is the software of choice for researchers using spatial statistics and geographic information analysis.

    read more

    comments

  4. View spatial data attribute tables in R

    Tue 14 October 2008
    cfarmer

    Many GIS offer the ability to view the attribute table of a vector layer. While this is perhaps less obvious in the R environment, it is not impossible. The following command allows you to visually inspect, and change any data.frame (or other vector, matrix, etc.), including Spatial*DataFrames.

    read more

    comments

  5. R spatial indentify tool

    Tue 23 September 2008
    cfarmer

    This is useful for visually exploring R spatial data such as SpatialPointDataFrames or SpatialGridDataFrames. By clicking on various features, the value at that point will be displayed.

    library(rgdal)
    y = readGDAL(system.file("pictures/Rlogo.jpg", package="rgdal")[1], band=1)
    y.grid = y@grid
    y.coords = coordinates(y.grid) 
    image(y)
    identify(x=y.coords, y=NULL, n=1)
    

    where x and y refer to coordinates (in this case because y.coords contains both x and y coordinates, y can be set to NULL), and n is the number of features to identify.

    read more

    comments

2 / 2

twitter

recent visitors