-------- Original Message --------
Subject: Re: [R-sig-Geo] rgdal: problem with grid data
Date: Tue, 23 Mar 2010 07:53:38 +0100
From: Agustin Lobo <aloboa...@gmail.com>
Reply-To: agustin.l...@ija.csic.es
To: Michael Sumner <mdsum...@gmail.com>
CC: sig-geo <r-sig-geo@stat.math.ethz.ch>
References: <4ba86074.8010...@gmail.com>
<522664f81003222349g39cc0c4ya756547d80c1d...@mail.gmail.com>
ok, I see, I have to convert to Spatial Polygons data frame first, right?
Ideally, I should be able of clumping those cells with the same value,
so this is a bit more complicated than I expected. But should be possible.
I'll try and let the list know.
Thanks
Agus
Michael Sumner wrote:
What are you expecting to get - a point for every raster cell? If so,
use gridded(isrlc) <- FALSE to convert to a SPDF first - then the
write will work.
More complicated conversions are possible, such as with
as.SpatialPolygons.GridTopology.
Cheers, Mike.
On Tue, Mar 23, 2010 at 5:32 PM, Agustin Lobo <alobolis...@gmail.com> wrote:
Hi!
I read a grid file into R with
isrlc <-
readGDAL("/media/Transcend/MASTER_ICTA2007_2008/GEODATA_miniprojs/Kefah/ISR_cov/isr_cov.gri")
While isrlc seems correct, I'm getting an empty shapefile when I attempt to
write:
writeOGR(isrlc,dsn="/media/Transcend/MASTER_ICTA2007_2008/GEODATA_miniprojs/Kefah",
layer="ISR_cov2",driver="ESRI Shapefile")
Data from
http://www.diva-gis.org/data/cov/ISR_cov.zip
Thanks
Agus
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo
--
Dr. Agustin Lobo
Institut de Ciencies de la Terra "Jaume Almera" (CSIC)
LLuis Sole Sabaris s/n
08028 Barcelona
Spain
Tel. 34 934095410
Fax. 34 934110012
email: agustin.l...@ija.csic.es
http://www.ija.csic.es/gt/obster
_______________________________________________
R-sig-Geo mailing list
R-sig-Geo@stat.math.ethz.ch
https://stat.ethz.ch/mailman/listinfo/r-sig-geo