[R-sig-Geo] plotting Polygon (sp)

2010-06-08 Thread Sebastian P. Luque
Hi, Using the example from the vignette "sp" (section 7.1): ------ R> sr1 An object of class "Polygon" Slot "labpt": [1] 2.697 3.545 Slot "area": [1] 5.5 Slot "hole": [1] TRUE Slot "ringDir": [1] -1 Slot "coords": [,1]

Re: [R-sig-Geo] flip SpatialGridDataFrame across axis

2009-11-02 Thread Sebastian P. Luque
On Tue, 3 Nov 2009 07:40:59 +1100, Michael Sumner wrote: > Hi Sebastian, I think the "north-south" note is referring to > possibly-rotated grids (using the transform values supported by many > formats) - not to "north vs. south" in orientation. > You can easily flip a grid by reverting it (one b

[R-sig-Geo] flip SpatialGridDataFrame across axis

2009-11-02 Thread Sebastian P. Luque
Hi, After importing a grid with readGDAL(), a `SpatialGridDataFrame' object is produced that looks correct, except the y-axis is flipped upside down, despite the note in the "Value" section in ?readGDAL. So I need to flip the grid across the horizontal axis, and searching the archives points to a

Re: [R-sig-Geo] readGDAL() and HDF5 files

2009-01-26 Thread Sebastian P. Luque
On Mon, 26 Jan 2009 10:33:54 +0100 (CET), Roger Bivand wrote: > On Sun, 25 Jan 2009, Sebastian P. Luque wrote: >> On Sun, 25 Jan 2009 21:35:12 +0100 (CET), >> Roger Bivand wrote: >> On Sun, 25 Jan 2009, Roger Bivand wrote: >>> On Sat, 24 Jan 2009, Sebastia

Re: [R-sig-Geo] readGDAL() and HDF5 files

2009-01-24 Thread Sebastian P. Luque
On Sat, 24 Jan 2009 12:56:13 +0100 (CET), Roger Bivand wrote: > On Fri, 23 Jan 2009, Sebastian P. Luque wrote: >> On Sat, 24 Jan 2009 08:11:15 +1100, >> Michael Sumner wrote: >> Hi Sebastian, When you say the geographic coordinates are not a >>> regular grid -

Re: [R-sig-Geo] readGDAL() and HDF5 files

2009-01-23 Thread Sebastian P. Luque
On Sat, 24 Jan 2009 08:11:15 +1100, Michael Sumner wrote: > Hi Sebastian, When you say the geographic coordinates are not a > regular grid - is it that the actual grid is Mercator but the NetCDF > file stores an X and Y vector separately for each unique longitude and > latitude? I've seen this ma

Re: [R-sig-Geo] readGDAL() and HDF5 files

2009-01-23 Thread Sebastian P. Luque
On Fri, 23 Jan 2009 11:01:21 +0100 (CET), Roger Bivand wrote: > On Fri, 16 Jan 2009, Sebastian P. Luque wrote: >> Hi, >> I'm trying to use HDF5 files with this structure: > Sorry for the delay. Having now set up a reprodicable route (OSGeo4W > GDAL and drivers, rgda

[R-sig-Geo] readGDAL() and HDF5 files

2009-01-16 Thread Sebastian P. Luque
Hi, I'm trying to use HDF5 files with this structure: ------ $ gdalinfo conc_200901011200.hdf Driver: HDF5/Hierarchical Data Format Release 5 Files: conc_200901011200.hdf Size is 512, 512 Coordinate System is `' Subdatasets:

[R-sig-Geo] staying up to date with r-spatial packages

2008-10-18 Thread Sebastian P. Luque
Hi, Is it a good idea to have the r-spatial repository added to the 'repos' option? e.g.: ---<---cut here---start-->--- options(repos=c(CRAN="http://probability.ca/cran/";, Spatial="http://r-spatial.sourceforge.net/R";)) } ---<---

Re: [R-sig-Geo] map2SpatialPolygons' 'proj4string' in spmaps

2008-10-15 Thread Sebastian P. Luque
On Wed, 15 Oct 2008 20:20:16 +0200 (CEST), Roger Bivand <[EMAIL PROTECTED]> wrote: > On Wed, 15 Oct 2008, Sebastian P. Luque wrote: >> On Wed, 15 Oct 2008 19:24:18 +0200 (CEST), >> Roger Bivand <[EMAIL PROTECTED]> wrote: [...] > If the fill=TRUE argument to map()

Re: [R-sig-Geo] map2SpatialPolygons' 'proj4string' in spmaps

2008-10-15 Thread Sebastian P. Luque
On Wed, 15 Oct 2008 19:24:18 +0200 (CEST), Roger Bivand <[EMAIL PROTECTED]> wrote: [...] > No, not at all. The coordinates returned by map() if projection= is used > are only for plotting, are in arbitrary units, and are only documented in > code. map2SpatialPolygons() assumes that the data are i

[R-sig-Geo] map2SpatialPolygons' 'proj4string' in spmaps

2008-10-15 Thread Sebastian P. Luque
Hi, I don't understand what the 'proj4string' argument in map2SpatialPolygons() does. map() in the maps package has a 'projection' argument: ,-[ *help[R](map)* ] | projection: character string that names a map projection to use. See | 'mapproject' (in the 'mapproj' library). The de

[R-sig-Geo] as.SpatialPolygons.GridTopology does not return

2008-07-14 Thread Sebastian P. Luque
Hi, With the following topology and projection defined: ---<---cut here---start-->--- R> gt.aea X1 X2 cellcentre.offset -1609 -698 cellsize 22 cells.dim 1383 892 R> print([EMAIL PROTECTED], digits=12) [1] -1609.

Re: [R-sig-Geo] join csv tables

2008-04-10 Thread Sebastian P. Luque
On Thu, 10 Apr 2008 15:16:29 +0300, "Alexandru Dumitrescu" <[EMAIL PROTECTED]> wrote: > Hi everybody, Is there a way to join two csv tables in R using a > common column having the same values? Yes, ?merge -- Seb ___ R-sig-Geo mailing list R-sig-Geo@

Re: [R-sig-Geo] SpatialGridDataFrame to netcdf grid

2007-11-13 Thread Sebastian P. Luque
On Mon, 12 Nov 2007 23:29:59 +0100 (CET), Roger Bivand <[EMAIL PROTECTED]> wrote: [...] > Then the fallback is to write a GTiff, and use gdal_translate to convert > it (one of the gdal utilities that build with the GDAL shared > object). If the same problem occurs, you may need to install netCDF

Re: [R-sig-Geo] SpatialGridDataFrame to netcdf grid

2007-11-12 Thread Sebastian P. Luque
On Mon, 12 Nov 2007 22:21:08 +0100 (CET), Roger Bivand <[EMAIL PROTECTED]> wrote: [...] > No, see the example in the help file. Use this function to create a > dataset that can be created: > xx <- create2GDAL(locs.sub.ts, drivername="GTiff") > then copy xx: > xxx <- copyDataset(xx, drivername=

Re: [R-sig-Geo] SpatialGridDataFrame to netcdf grid

2007-11-12 Thread Sebastian P. Luque
On Mon, 12 Nov 2007 08:56:30 +0100, "Edzer J. Pebesma" <[EMAIL PROTECTED]> wrote: > On linux, you should have the netCDF driver istalled; from gdalDrivers() > I see (on debian etch): > name long_name create copy 42 netCDF Network Common Data Format > FALSE TRUE > Then, reading the docume

Re: [R-sig-Geo] SpatialGridDataFrame to netcdf grid

2007-11-11 Thread Sebastian P. Luque
On Mon, 12 Nov 2007 13:38:57 +1100, Michael Sumner <[EMAIL PROTECTED]> wrote: > Windows or Linux? My experience is in Windows. I would writeGDAL() the > SGDF to GTiff, then use gdal_translate at the command line to convert to > netCDF: > gdal_translate -of NetCDF in.tif out.nc Thanks for the i

[R-sig-Geo] SpatialGridDataFrame to netcdf grid

2007-11-11 Thread Sebastian P. Luque
Hi, Does anybody know of a painless way to write a SpatialGridDataFrame to a netcdf grid format file? I know there are 4 packages in CRAN that can read/write netcdf data, but I think this would require a conversion of the sp objects into an intermediary form. Any suggestions welcome. Cheers,

Re: [R-sig-Geo] map to shapefile with projection info

2006-12-06 Thread Sebastian P. Luque
On Wed, 06 Dec 2006 14:00:38 -0600, "Sebastian P. Luque" <[EMAIL PROTECTED]> wrote: > On Wed, 6 Dec 2006 20:28:42 +0100 (CET), > Roger Bivand <[EMAIL PROTECTED]> wrote: [...] >> names <- sapply(slot(canada_sp, "polygons"), function(i) slot(i, &q

Re: [R-sig-Geo] map to shapefile with projection info

2006-12-06 Thread Sebastian P. Luque
On Wed, 6 Dec 2006 20:28:42 +0100 (CET), Roger Bivand <[EMAIL PROTECTED]> wrote: [...] > canada <- map("world2Hires", "Canada", fill=TRUE, plot=FALSE) > fill=TRUE retrives polygons, otherwise you get line segments. For this > example it now works. You can also make several retrieved island belon

[R-sig-Geo] map to shapefile with projection info

2006-12-06 Thread Sebastian P. Luque
Hi, Trying to extract a map (package maps) to a shapefile, IIUC the procedure is to get it into a SpatialPolygonsDataFrame and then use writePolyShape(). This seems to require an intermediate step through SpatialPolygons. However, I'm running into some problems: R> canada <- map("world2Hires",