Re: [R-sig-Geo] writeRaster and coord ref problem

2012-03-08 Thread Robert J. Hijmans
Johannes, Yes, that smells like something is wrong with your GDAL/PROJ4. Can you try this: library(rgdal) crs <- "+proj=tmerc +lat_0=0 +lon_0=9 +k=1 +x_0=350 +y_0=0 +datum=potsdam +units=m +no_defs +ellps=bessel +towgs84=606.0,23.0,413.0" CRS(crs) For me, it returns: CRS arguments: +proj=

Re: [R-sig-Geo] Error in function gbif package dismo

2012-03-08 Thread Robert J. Hijmans
Manuel, If you use an extent, you need to use longitude/latitude coordinates. This is not a reasonable extent for this function: e = extent(c(-9598065, -9199982, 901214, 1267766)) Robert On Thu, Mar 8, 2012 at 3:06 PM, Manuel Spínola wrote: > Dear list members, > > I am trying to get the reco

[R-sig-Geo] Sum value of points that intersect a subset of a network

2012-03-08 Thread Sharon Baruch-Mordo
Hello list, I would like to calculate the Getis-Ord Gi* clustering statistic for points (mileposts) on a network (roads) and I don’t think there is a function in one of the spatial packages to do so. Hence I decided to code it myself, but I’m having some difficulties. Here is the general framew

[R-sig-Geo] Error in function gbif package dismo

2012-03-08 Thread Manuel Spínola
Dear list members, I am trying to get the records for 1 species in Costa Rica using the gbif function and I created an extent for the region (see extent object), however, there is an error message when I run the gbif function: e = extent(c(-9598065, -9199982, 901214, 1267766)) a=gbif("Centurio",

Re: [R-sig-Geo] GWR: set initial bandwidth value for gwr.sel()

2012-03-08 Thread Roger Bivand
On Thu, 8 Mar 2012, Burton Shank wrote: Is there a way to set the initial bandwidth for gwr.sel() when doing geographically weighted regression? It looks like gwr.sel() calls optimize() which accepts a min/max range for parameters but not an initial value. I'd rather not constrain the bandwidth

[R-sig-Geo] GWR: set initial bandwidth value for gwr.sel()

2012-03-08 Thread Burton Shank
Is there a way to set the initial bandwidth for gwr.sel() when doing geographically weighted regression? It looks like gwr.sel() calls optimize() which accepts a min/max range for parameters but not an initial value. I'd rather not constrain the bandwidth. However, I often send different subsets o

Re: [R-sig-Geo] spplot with legend only, and legend inside the plotting area

2012-03-08 Thread Mauricio Zambrano-Bigiarini
On 08/03/12 18:22, Oscar Perpiñán Lamigueiro wrote: Mauricio Zambrano-Bigiarini writes: Thanks Oscar !. I didn't realise about 'latticeExtra' instead of lattice... One last question. By using c(), is it possible to put different axis labels for each plot ? -- START ---

Re: [R-sig-Geo] spplot with legend only, and legend inside the plotting area

2012-03-08 Thread Oscar Perpiñán Lamigueiro
Mauricio Zambrano-Bigiarini writes: > Thanks Oscar !. I didn't realise about 'latticeExtra' instead of lattice... > > One last question. By using c(), is it possible to put different axis > labels for each plot ? > -- START > library(sp) > xyz = data.frame(expand.grid

Re: [R-sig-Geo] spplot with legend only, and legend inside the plotting area

2012-03-08 Thread Mauricio Zambrano-Bigiarini
On 07/03/12 17:38, Mauricio Zambrano-Bigiarini wrote: I'm almost there... The real problem appears when I try to produce several spplots within the same figure (each one of them for a different spatial area), with a unique legend for all the figures (that is the reason why I can not use 'legend

Re: [R-sig-Geo] redundancy of coordinates of pixels

2012-03-08 Thread Komine
Thank Tom for your observation.You are right, my question was not clear. When I run my code. I have this error message that I translated from french to english: >Error in nrow (query): object'query' not found -- View this message in context: http://r-sig-geo.2731867.n2.nabble.com/redundancy-of-c

Re: [R-sig-Geo] redundancy of coordinates of pixels

2012-03-08 Thread Tom Gottfried
Am 08.03.2012 15:48, schrieb Komine: Hi everybody, I try to use the advice from Roger Bivand to get the redundant coordinates of my pixels. In the r help I found this example code: nn2(data, query, k=min(10,nrow(data)),treetype=c("kd","bd"), searchtype=c("standard","priority","radius"),radius=0

Re: [R-sig-Geo] redundancy of coordinates of pixels

2012-03-08 Thread Komine
Hi everybody, I try to use the advice from Roger Bivand to get the redundant coordinates of my pixels. In the r help I found this example code: >nn2(data, query, k=min(10,nrow(data)),treetype=c("kd","bd"), >searchtype=c("standard","priority","radius"),radius=0.0,eps=0.0) I tried to adapt it acc

Re: [R-sig-Geo] problems in shortestPath()?

2012-03-08 Thread Bastien.Ferland-Raymond
Hello Melanie, It's really hard to tell what your problem is with no error message or reproducible example. However here some info that may help and some trick to help you figure out the problem First, gdistance build a transition matrix from a CONDUCTANCE matrix which is not a COST matrix li

Re: [R-sig-Geo] counting the depressions(group of negative numbers) over time from a raster brick

2012-03-08 Thread Vlad
Hi Sajid, you don't need to transform anything to a data.frame. Instead you may use the function 'calc' with a function that calculate the two values you are looking for. (see the help page on 'calc'). I think the following function will do what you expect to : theFun <- function(x) { st

[R-sig-Geo] Dismo Maxent - Error with evaluate(), missing layers (or wrong names)

2012-03-08 Thread Johannes Radinger
Hi, I am running multiple Maxent models for a list of 40 species in a loop. Within the loop I am splitting the presence points into a train dataset and a test dataset. All the model fitting and the prediction works fine, there is just a problem with some species and evaluate(). What I am doing and

Re: [R-sig-Geo] spplot with legend only, and legend inside the plotting area

2012-03-08 Thread Mauricio Zambrano-Bigiarini
On 08/03/12 09:21, Oscar Perpiñan wrote: Sorry: I forgot to say that you need latticeExtrato use c.trellis.Then: library(latticeExtra) c(dummy, dummy, dummy, dummy). Thanks Oscar !. I didn't realise about 'latticeExtra' instead of lattice... One last question. By using c(), is it possible to p

[R-sig-Geo] counting the depressions(group of negative numbers) over time from a raster brick

2012-03-08 Thread sajid pareeth
Dear all I am trying to count the number of group of depressions (negative values) from a climate data set and have least idea on how to go about it. Let me explain the scenario. I have a raster brick with 468 layers and and each layer has 7458 cells. > cntnegclass : RasterBrick dimensions

Re: [R-sig-Geo] spplot with legend only, and legend inside the plotting area

2012-03-08 Thread Oscar Perpiñan
Sorry: I forgot to say that you need latticeExtrato use c.trellis.Then: library(latticeExtra) c(dummy, dummy, dummy, dummy). Oscar El miércoles 7 de marzo de 2012, Mauricio Zambrano-Bigiarini < hzambran.newsgro...@gmail.com> escribió: > 2012/3/7 Oscar Perpiñán Lamigueiro : >> Mauricio Zambrano-Bi