Re: [R-sig-Geo] Risks as hazardous (false positive) and safe (false negative)

2009-11-23 Thread Edzer Pebesma
Zia Ahmed wrote: > /Dear Edzer, > / > I am trying to do misclassification following way: could you please > tell me know whether I am statistically correct or wrong! Zia, to do this, I would need your data, a lot of information about your data, and a lot of time. And then, the answer would be

Re: [R-sig-Geo] Risks as hazardous (false positive) and safe (false negative)

2009-11-23 Thread Zia Ahmed
/Dear Edzer, / I am trying to do misclassification following way: could you please tell me know whether I am statistically correct or wrong! Thanks again Zia/ # Load data #- tala<-read.csv("Tala_data.csv",header=TRUE) tala.grid<-read.csv("Tala_grid_2.csv",header=TRUE) # load pac

[R-sig-Geo] How do change projection from geographic coordinate to projected coordinate system in R?

2009-11-23 Thread Zia Ahmed
Hi all, I want project several several raster(.tif) and vector (.shp) files in R using rgdal driver. One set of files are in geographic coordinate system (WGS84) other are in LCC-Bangladesh coordinate system. .I want to re-project them to EPSG:3104 (Gulshan 303/ BTM). If some help me t

Re: [R-sig-Geo] strange srtm3 query in geonames package

2009-11-23 Thread Ashton Shortridge
Hi Michael, there are several SRTM 'holes' over the United States, evidently due to some data processing issues on a couple of orbits. Unfortunately for you one of the largest is over part of North Carolina. The following URL has some maps of the major gaps: http://www.mission-planning.com/DTED

Re: [R-sig-Geo] A new ASTER Global DEM data set

2009-11-23 Thread Pierre Roudier
Sorry for my previous HTML-formatted message, here it is again: Another package I find useful for shaded views of spatial data is the rgl package. It is most useful because of its ability to zoom and turn the map interactively. >From surface3d() help page : data(volcano) z <- 2 * volcano x <- 1

Re: [R-sig-Geo] A new ASTER Global DEM data set

2009-11-23 Thread Pierre Roudier
Another package I find useful for shaded views of spatial data is the rgl package. It is most useful because of its ability to zoom and turn the map interactively. >From surface3d() help page : data(volcano) z <- 2 * volcano x <- 10 * (1:nrow(z)) y <- 10 * (1:ncol(z)) zlim <- range(y) zlen <- zl

Re: [R-sig-Geo] Overlay of SpatialGrid/Raster and polygons

2009-11-23 Thread Robert J. Hijmans
ZIa, You can download the source code and install yourself here: http://r-forge.r-project.org/R/?group_id=294 Or use this: install.packages("raster", repos="http://R-Forge.R-project.org";) But I think you need to have the latest version of R (currently 2.10) installed for that to work Robert O

Re: [R-sig-Geo] Overlay of SpatialGrid/Raster and polygons

2009-11-23 Thread Zia Ahmed
I am trying to install "raster" package, but it is not available in this site. http://R-Forge.R-project.org . Zia Robert J. Hijmans wrote: Hi Ned, Here is an approach to get values from a RasterStack to all cells in each polygon: library(raster) # a polygon data(meuse.riv) pol <- Spatial

Re: [R-sig-Geo] Overlay of SpatialGrid/Raster and polygons

2009-11-23 Thread Alan Swanson
Ned, here is how I have done that using the overlay function. Not sure if it would work with a rasterstack. Alan xy.locs <- readOGR(poly.shapefile.name,drop_unsupported_fields=T) img<-readGDAL(image.name) y<-slot(img,"data") n.bands <- ncol(y) bnames <- paste(varname,"_b",1:n.bands,sep="") } ou

Re: [R-sig-Geo] Overlay of SpatialGrid/Raster and polygons

2009-11-23 Thread Robert J. Hijmans
Hi Ned, Here is an approach to get values from a RasterStack to all cells in each polygon: library(raster) # a polygon data(meuse.riv) pol <- SpatialPolygons(list(Polygons(list(Polygon(meuse.riv)), "x"))) # a raster r1 <- raster(system.file("external/test.ag", package="sp")) r2 <- sqrt(r1) # a st

Re: [R-sig-Geo] Map labels

2009-11-23 Thread Roger Bivand
On Mon, 23 Nov 2009, tom sgouros wrote: Is this another way to say that I've stumbled onto one of the borders between the set of tasks that R does well and the set of tasks I should use a GIS for? Or should I persevere with R on this? Not really, this is a generic problem for shapefiles, whi

Re: [R-sig-Geo] Map labels

2009-11-23 Thread tom sgouros
Is this another way to say that I've stumbled onto one of the borders between the set of tasks that R does well and the set of tasks I should use a GIS for? Or should I persevere with R on this? Second question: if I want to just do this assembly myself, so to keep some control over placement, i

Re: [R-sig-Geo] bbox 4-dimensional objects - suitable method?

2009-11-23 Thread Michael Sumner
I would encourage the idea that higher dimensions (or even the first two) are not treated as representing any particular real world dimensions. There's no reason any axis should be aligned to a particular type or name (such as or POSIXct, or "X"). This would mean that bbox() simply returns a 2 row

[R-sig-Geo] Overlay of SpatialGrid/Raster and polygons

2009-11-23 Thread Ned Horning
Greetings, I am looking for a way to use R to extract pixel values (currently in a large RasterStack object) that fall under polygons (currently a SpatialPolygonsDataFrame object). I seem to recall a discussion about using overlay to do this but I can't find a method that would work. Any ins

Re: [R-sig-Geo] Map labels

2009-11-23 Thread Roger Bivand
On Mon, 23 Nov 2009, tom sgouros wrote: Roger Bivand wrote: Being near the water, there are lots of islands, so each town is represented by a bunch of polygons. How do I select only one to be labeled, and is there a convention for which one would be the best to use? I see the labpt slot, i

[R-sig-Geo] Exporting kernel UD homerange to an ESRI shapefile

2009-11-23 Thread Corrie Curtice
Hello, Sorry, I must be missing something obvious. I have location data for several turtles in three different areas. I'm interested in the home range of the population at each area, so I've broken the data out already by beach name (not by turtle). I'm using the adehabitat package and running: x

Re: [R-sig-Geo] bbox 4-dimensional objects - suitable method?

2009-11-23 Thread Edzer Pebesma
Torleif, after creating the SpatialPointsDataFrame (90 seconds) with your commands I get indeed a new object dummy, which is 400+ Mb of size, the same as the data.frame had. Then, converting it in a grid with gridded(dummy) = TRUE fullgrid(dummy) = TRUE takes again very long, but gives you the o

Re: [R-sig-Geo] Risks as hazardous (false positive) and safe (false negative)

2009-11-23 Thread Zia Ahmed
Thanks! I may correct the values those are out side [0,1] using pmin and pmax function (?). But I am sill not clear how I will do this. Thanks again Zia Edzer Pebesma wrote: (replying to the list) Well, if you're willing to accept the indicator kriging values as estimates of these probab

Re: [R-sig-Geo] A new ASTER Global DEM data set

2009-11-23 Thread Karl Ove Hufthammer
On Mon, 23 Nov 2009 14:16:35 +0100 Paul Hiemstra wrote: > > The maps with shading look quite nice. Is there an R package/function > > which can create similar images? > > > A good place to look for these kinds of graphs and how to make them is > the R graph gallery [1]. Check out this one for

Re: [R-sig-Geo] Risks as hazardous (false positive) and safe (false negative)

2009-11-23 Thread Edzer Pebesma
(replying to the list) Well, if you're willing to accept the indicator kriging values as estimates of these probabilities, you're essentially done. Of course, the kriged values can be outside [0, 1], so you need to deal with that. Best regards, -- Edzer Zia Ahmed wrote: > Dear Edzer, > > Thanks

Re: [R-sig-Geo] bbox 4-dimensional objects - suitable method?

2009-11-23 Thread Torleif Markussen Lunde
Of course, if you decide to use the columns as time, you reduce the space, but than, with more than one variable, the structure would be "messy". Best wishes Torleif On Monday 23 November 2009 15:57:32 Torleif Markussen Lunde wrote: > Hi Edzer > > Thanks for a good answer. I did read the asdar-

Re: [R-sig-Geo] bbox 4-dimensional objects - suitable method?

2009-11-23 Thread Torleif Markussen Lunde
Hi Edzer Thanks for a good answer. I did read the asdar-book, and especially the section on time grids. I guess the book (together with the sp source) is a must when dealing with the sp-classes. As far as I understand this means that in SpatialTimeGridDataFrame coordinates and time has to be s

Re: [R-sig-Geo] Map labels

2009-11-23 Thread tom sgouros
Roger Bivand wrote: > > Being near the water, there are lots of islands, so each town is > > represented by a bunch of polygons. How do I select only one to be > > labeled, and is there a convention for which one would be the best to > > use? I see the labpt slot, in my SpatialPolygonsDataFram

Re: [R-sig-Geo] Risks as hazardous (false positive) and safe (false negative)

2009-11-23 Thread Edzer Pebesma
Dear Zia, If you mean by Goovaerts (1997) his 483 page book "Geostatistics for Natural Resource Evaluation", then please give us a bit more precise detail on what you want (which page? which equation?) -- Edzer Zia Ahmed wrote: > > Hi all, > > Is it possible in gstat to get misclassification of

[R-sig-Geo] Risks as hazardous (false positive) and safe (false negative)

2009-11-23 Thread Zia Ahmed
Hi all, Is it possible in gstat to get misclassification of risks as hazardous (false positive) and safe (false negative) as describe by Goovaerts (1997) from parametric or non-parametric probability mapping?. help will appreciated. Thanks Zia <>

Re: [R-sig-Geo] Map labels

2009-11-23 Thread Roger Bivand
On Mon, 23 Nov 2009, tom sgouros wrote: Hello all: Thanks to all your earlier help, I'm now using spplot to generate a map of about 400 polygons representing about 40 different towns. In addition to being able to color the polygons, I would like to label the plots with a number or the town na

Re: [R-sig-Geo] bbox 4-dimensional objects - suitable method?

2009-11-23 Thread Zia Ahmed
Hi all, Is it possible in gstat to get misclassification of risks as hazardous (false positive) and safe (false negative) as describe by Goovaerts (1997) from parametric or non-parametric probability mapping?. help will appreciated. Thanks Zia <>_

Re: [R-sig-Geo] bbox 4-dimensional objects - suitable method?

2009-11-23 Thread Edzer Pebesma
Torleif, sp classes SpatialPoints* SpatialPixels* and SpatialGrid* already allow 3- and higher dimensional data; providing an example with nonsense data: > library(sp) > data(meuse) > meuse$z = rnorm(155) > coordinates(meuse)=~x+y+z > summary(as(meuse, "SpatialPoints")) Object of class SpatialPoi

[R-sig-Geo] Map labels

2009-11-23 Thread tom sgouros
Hello all: Thanks to all your earlier help, I'm now using spplot to generate a map of about 400 polygons representing about 40 different towns. In addition to being able to color the polygons, I would like to label the plots with a number or the town name. Being near the water, there are lots

[R-sig-Geo] bbox 4-dimensional objects - suitable method?

2009-11-23 Thread Torleif Markussen Lunde
Hi As previously mentioned I am working on 3D and 4D spatial classes. To get things compatible with the other sp-classes I would like to ask for your opinion what would be the most suitable bbox methods for Spatial3dArrays and Spatial4dArrays. My first thought was that bbox should return the 2

Re: [R-sig-Geo] A new ASTER Global DEM data set

2009-11-23 Thread Paul Hiemstra
Karl Ove Hufthammer wrote: On Fri, 20 Nov 2009 16:53:15 +0100 Tomislav Hengl wrote: The 4 case studies can be downloaded from here: http://geomorphometry.org/system/files/GDEM_assessment.zip GDEM is a frankestein - once you zoom in and add some shading, The maps with shading look