[R-sig-Geo] newbie sp question

2007-06-15 Thread David Hugh-Jones
Hi R-spatialists, I'm working with a big list of polygons (imported into R with package sp as a SpatialPolygonDataFrame, and I am trying to calculate minimum distances between each pair of polygons. For this, I need to get the lines for each polygons. At the moment I can't seem to find a way to do

[R-sig-Geo] Eliminate duplicate vertices in a SpatialPolygonsDataFrame object

2007-06-15 Thread Don MacQueen
I have managed to create several SpatialPoygonsDataFrame objects in which the polygons have duplicate vertices. That is, there are duplicate rows in the matrix in "coords" slot of the object. In most cases, the object has just one polygon, but in at least one case it has an outer polygon and a

Re: [R-sig-Geo] Subscripting by coordinates

2007-06-15 Thread Roger Bivand
On Fri, 15 Jun 2007, Agustin Lobo wrote: > Hi r-sig-geos, > > I'm starting to use package sp > and can't figure how to subscript an sp grid > object by coordinates. This is what I do: > > First, I read the raster image of the example: > > x <- GDAL.open(system.file("pictures/erdas_spnad83.tif", pa

[R-sig-Geo] Subscripting by coordinates

2007-06-15 Thread Agustin Lobo
Hi r-sig-geos, I'm starting to use package sp and can't figure how to subscript an sp grid object by coordinates. This is what I do: First, I read the raster image of the example: x <- GDAL.open(system.file("pictures/erdas_spnad83.tif", package = "rgdal")[1]) erdas_spnad83 <- asSGDF_GROD(x, out

Re: [R-sig-Geo] Adding map to filled.contour

2007-06-15 Thread Greg Snow
When filled.countour returns, the coordinate system does not match the plot (part of drawing the scale). One of the easiest ways to add to the plot is using the plot.axes argument. For example: > library(maps) > data(ozone) > > fit <- loess(median ~ x+y, data=ozone) > > tmp.x <- seq( min(ozone

Re: [R-sig-Geo] Plots from netcdf file

2007-06-15 Thread David Forrest
On Thu, 14 Jun 2007, Thomas Szegvary wrote: > I am using the RNetCDF package to extract data from netcdf files. I've got a > nc file (from an atmospheric model) with coordinates as the following: >> dim(lon) > [1] 67 46 >> dim(lat) > [1] 67 46 > > I suppose the lon and lat values are given to grid

[R-sig-Geo] Adding map to filled.contour

2007-06-15 Thread Thomas Szegvary
Hi there I have a filled.contour and want to add a the contours of a shapefile (i.e. European boarders). I tried to do this with the map library, but didn't succed using par(new=TRUE) to add the boundaries, the filled.contour is not a plot says R. What else can I do? Thanks,Thomas __ Thomas Sz