Re: [R-sig-Geo] can spplot add features ?

2009-07-07 Thread Edzer Pebesma
Patrick Giraudoux wrote: Dear listers, I would like to add the border of a country (SpatialPolygons object called ChinaBorder) in a spplot built as following: mypal-colorRampPalette(c(white, cyan, blue,green,yellow,red)) statSpat-SpatialPointsDataFrame(chinagrid,data.frame(n=z))

[R-sig-Geo] Problems reading output file from HDF5 library

2009-07-07 Thread JUAN MANUEL MORENO RIVERA
Dear list, I am trying to convert a data matrix corresponding to a geostationary satellite data to raster format or a format supported by GDAL. I have tried using HDF5 library with the following code: n.col - 1701 n.row - 651 n.rec - n.col*n.row zz - bzfile(file_to_convert.bz2,rb) DSSF

Re: [R-sig-Geo] can spplot add features ?

2009-07-07 Thread Paul Hiemstra
Hi, You could also have a look at the R wiki, there is a part on spatial data visualization using sp-classes: http://wiki.r-project.org/rwiki/doku.php?id=tips:spatial-data:spatial_data_visualization cheers, Paul Patrick Giraudoux wrote: Dear listers, I would like to add the border of a

[R-sig-Geo] spsample Error

2009-07-07 Thread Agustin Lobo
I'm using spsample() with a second SpatialLinesDataFrame but now I'm geting an error. This is what I do: fl2300 - readOGR(dsn=/media/Transcend/MONTSENY2008/MONTSENY_UAV2/flMatagalls300,layer=flMatagalls300) wpMata300 - spsample(fl2300[1,],33,offset=0.0,type=regular) Error in proj4string(x) :

Re: [R-sig-Geo] can spplot add features ?

2009-07-07 Thread Patrick Giraudoux
Edzer Pebesma a écrit : Patrick Giraudoux wrote: Dear listers, I would like to add the border of a country (SpatialPolygons object called ChinaBorder) in a spplot built as following: mypal-colorRampPalette(c(white, cyan, blue,green,yellow,red))

[R-sig-Geo] filled.contour and legend height control

2009-07-07 Thread Patrick Giraudoux
Hello, Filled contour is a really nice function, except when one use the argument asp=1. In this case the legend height can be too large compared to the image plot height. Is there a way to control the legend height in filled.contour (eg fixing somewhere a ylim=c(min value, max value) to

Re: [R-sig-Geo] can spplot add features ?

2009-07-07 Thread Edzer Pebesma
Patrick Giraudoux wrote: Edzer Pebesma a écrit : Patrick Giraudoux wrote: Dear listers, I would like to add the border of a country (SpatialPolygons object called ChinaBorder) in a spplot built as following: mypal-colorRampPalette(c(white, cyan, blue,green,yellow,red))

[R-sig-Geo] Error with readOGR and shape file

2009-07-07 Thread Agustin Lobo
I've found the following error at importing a shp file edited (deleting one line and creating another one) and saved with QGIS. SHP files made (not edited) and saved with QGIS can be imported into R with no problems. I'm reporting to the QGIS list as well: fl2 -

Re: [R-sig-Geo] spsample Error

2009-07-07 Thread Agustin Lobo
Additional information: it seems the error occurs with any polyline imported from shp files, not with straight lines. Agus -- View this message in context: http://n2.nabble.com/spsample-Error-tp3217861p3218531.html Sent from the R-sig-geo mailing list archive at Nabble.com.

Re: [R-sig-Geo] spsample Error

2009-07-07 Thread Paul Hiemstra
Agustin Lobo wrote: I'm using spsample() with a second SpatialLinesDataFrame but now I'm geting an error. This is what I do: fl2300 - readOGR(dsn=/media/Transcend/MONTSENY2008/MONTSENY_UAV2/flMatagalls300,layer=flMatagalls300) wpMata300 - spsample(fl2300[1,],33,offset=0.0,type=regular)

Re: [R-sig-Geo] can spplot add features ?

2009-07-07 Thread Paul Hiemstra
Or you can define a panel function yourself along these lines: spplot(grid_object, layer_to_plot, panel = function(...) { panel.gridplot(...) # Standard panel function for grids sp.polygons(polygon_object) # Extra stuff on top sp.points(point_object) } cheers,

Re: [R-sig-Geo] can spplot add features ?

2009-07-07 Thread Roger Bivand
On Tue, 7 Jul 2009, Edzer Pebesma wrote: Patrick Giraudoux wrote: Edzer Pebesma a écrit : Patrick Giraudoux wrote: Dear listers, I would like to add the border of a country (SpatialPolygons object called ChinaBorder) in a spplot built as following: mypal-colorRampPalette(c(white, cyan,

Re: [R-sig-Geo] spsample Error

2009-07-07 Thread Agustin Lobo
Paul, this is it: wpMata300 - spsample(fl2300[1,],33,offset=0.0,type=regular) Error in proj4string(x) : proj4string only works for class(es extending) Spatial traceback() 16: stop(proj4string only works for class(es extending) Spatial) 15: proj4string(x) 14: identical(proj4string(x), p1)

Re: [R-sig-Geo] filled.contour and legend height control

2009-07-07 Thread Paul Hiemstra
Patrick Giraudoux wrote: Hello, Filled contour is a really nice function, except when one use the argument asp=1. In this case the legend height can be too large compared to the image plot height. Is there a way to control the legend height in filled.contour (eg fixing somewhere a

Re: [R-sig-Geo] spsample Error

2009-07-07 Thread Roger Bivand
On Tue, 7 Jul 2009, Agustin Lobo wrote: I'm using spsample() with a second SpatialLinesDataFrame but now I'm geting an error. This is what I do: fl2300 - readOGR(dsn=/media/Transcend/MONTSENY2008/MONTSENY_UAV2/flMatagalls300,layer=flMatagalls300) wpMata300 -

Re: [R-sig-Geo] Error with readOGR and shape file

2009-07-07 Thread Roger Bivand
On Tue, 7 Jul 2009, Agustin Lobo wrote: I've found the following error at importing a shp file edited (deleting one line and creating another one) and saved with QGIS. SHP files made (not edited) and saved with QGIS can be imported into R with no problems. I'm reporting to the QGIS list as

Re: [R-sig-Geo] filled.contour and legend height control

2009-07-07 Thread Patrick Giraudoux
Paul Hiemstra a écrit : Patrick Giraudoux wrote: Hello, Filled contour is a really nice function, except when one use the argument asp=1. In this case the legend height can be too large compared to the image plot height. Is there a way to control the legend height in filled.contour (eg

Re: [R-sig-Geo] filled.contour and legend height control

2009-07-07 Thread Paul Hiemstra
Hi Patrick, Thanks for the code! My suggestion would be to use spplot instead of filled.contour, this function is really made to display spatial data. It works for grids, points and polygons and makes it really easy to combine those in one plot. You need to put your data into the spatial R

Re: [R-sig-Geo] filled.contour and legend height control

2009-07-07 Thread Patrick Giraudoux
Paul Hiemstra a écrit : Hi Patrick, Thanks for the code! My suggestion would be to use spplot instead of filled.contour, this function is really made to display spatial data. It works for grids, points and polygons and makes it really easy to combine those in one plot. You need to put your