[R-sig-Geo] spatstat is now free open source

2013-10-30 Thread Adrian Baddeley
Just announcing that the package 'spatstat' is now fully covered by a Free Open Source licence. In previous versions of spatstat, polygon clipping was (optionally) performed using the package 'gpclib' which has a restricted licence. From spatstat version 1.34-0 onward, polygon clipping is perfo

Re: [R-sig-Geo] simplify map for web use

2013-10-30 Thread Roger Bivand
On Wed, 30 Oct 2013, Alex Mandel wrote: On 10/30/2013 01:59 PM, Adrian Dușa wrote: Dear All, A question from a very beginner with maps and geographic data. I have a map with many (too many) vertices which I would like to use interactively over a web page. What I need is to simplify that map, m

Re: [R-sig-Geo] simplify map for web use

2013-10-30 Thread Alex Mandel
On 10/30/2013 01:59 PM, Adrian Dușa wrote: > Dear All, > > A question from a very beginner with maps and geographic data. > I have a map with many (too many) vertices which I would like to use > interactively over a web page. What I need is to simplify that map, > make it to the original one but

[R-sig-Geo] simplify map for web use

2013-10-30 Thread Adrian Dușa
Dear All, A question from a very beginner with maps and geographic data. I have a map with many (too many) vertices which I would like to use interactively over a web page. What I need is to simplify that map, make it to the original one but discarding 90% of the current information. I read that

[R-sig-Geo] how to obtain coordinates of each clump using "zonal" from raster package

2013-10-30 Thread Agus Camacho
Dear list, Im trying to calculate the centroid of each clump existent within a raster layer. So far I reached to: require(raster) r <- raster(ncols=12, nrows=12) set.seed(0) r[] <- round(runif(ncell(r))*0.7 ) r=r>0.3 rc <- clump(r) # the function should be something like this, but im still sorti

Re: [R-sig-Geo] Problems with the Spatial Reference of a shapefile created with writePolyShape

2013-10-30 Thread David Villalobos
Thank you Roger 2013/10/30 Roger Bivand > On Wed, 30 Oct 2013, David Villalobos wrote: > > Hi Manuel >> >> Thank you, I tryed your solution and it works partially >> >> xysp <- SpatialPoints(xy) >> >> proj4string(xysp) <- CRS("+proj=tmerc +lon_0=-84 +lat_0=0 +x_0=50 >> +k=0. +datum=WGS

Re: [R-sig-Geo] Problems with the Spatial Reference of a shapefile created with writePolyShape

2013-10-30 Thread Roger Bivand
On Wed, 30 Oct 2013, David Villalobos wrote: Hi Manuel Thank you, I tryed your solution and it works partially xysp <- SpatialPoints(xy) proj4string(xysp) <- CRS("+proj=tmerc +lon_0=-84 +lat_0=0 +x_0=50 +k=0. +datum=WGS84") xysp SpatialPoints: X Y [1,] 815196.4

Re: [R-sig-Geo] Problems with the Spatial Reference of a shapefile created with writePolyShape

2013-10-30 Thread Maren Huck
Hi David, Could the problem be that the function locoh.a does not actually create a single convex hull, but a multitude. So you have to select the locoh with the percentage you want by looking at as.data.frame(locoh) This will give you a long list, and you select the row which comes closest to y

Re: [R-sig-Geo] spplot : Computing variances of prediction with log-transformed data in R

2013-10-30 Thread Edzer Pebesma
Dear Emmanuel, you may want to look into what gstat::krigeTg does, it might be close or identical to what you want. On 10/30/2013 03:47 PM, baremma2002 wrote: > Dear users, > > How can I compute the variances of prediction (ordinary kriging) using > log-transformed data in R: > > library(gstat)

Re: [R-sig-Geo] Problems with the Spatial Reference of a shapefile created with writePolyShape

2013-10-30 Thread Manuel Spínola
Did you look at your shapefile for the CRS? Manuel 2013/10/30 David Villalobos > Hi Manuel > > Thank you, I tryed your solution and it works partially > > xysp <- SpatialPoints(xy) > > proj4string(xysp) <- CRS("+proj=tmerc +lon_0=-84 +lat_0=0 +x_0=50 > +k=0. +datum=WGS84") > > > xysp

[R-sig-Geo] Aggregate raster

2013-10-30 Thread Acacia dealbata
Hi community! I have a raster of Global Land Cover with a resolution of 1 km (http://glcf.umd.edu/). I want to change its resolution to be similar to that of the rest of the rasters I am using for my project (0.17 degrees). Besides, I want to recalculate the value for each new cell. In the

Re: [R-sig-Geo] Problems with the Spatial Reference of a shapefile created with writePolyShape

2013-10-30 Thread David Villalobos
Hi Manuel Thank you, I tryed your solution and it works partially xysp <- SpatialPoints(xy) proj4string(xysp) <- CRS("+proj=tmerc +lon_0=-84 +lat_0=0 +x_0=50 +k=0. +datum=WGS84") > xysp SpatialPoints: X Y [1,] 815196.4 1152758 [2,] 815196.0 1152759 [3,] 815055.

Re: [R-sig-Geo] Problems with the Spatial Reference of a shapefile created with writePolyShape

2013-10-30 Thread Manuel Spínola
Hi David, You don´t have the CRS. Try this: proj4string(xysp) <- CRS("+proj=tmerc +lon_0=-84 +lat_0=0 +x_0=50 +k=0. +datum=WGS84") Best, Manuel Spínola 2013/10/30 David Villalobos > Dear list, > > Maybe a silly problem, but I need help to solve it. > > At this moment I am working w

[R-sig-Geo] Problems with the Spatial Reference of a shapefile created with writePolyShape

2013-10-30 Thread David Villalobos
Dear list, Maybe a silly problem, but I need help to solve it. At this moment I am working with the R package "adehabitatHR", specifically with the LoCoH.a (Adaptative LoCoh). I am calculating the home range of a neotropical bat (Ectophylla alba: Phyllostomidae). My commands are the followings:

[R-sig-Geo] spplot : Computing variances of prediction with log-transformed data in R

2013-10-30 Thread baremma2002
Dear users, How can I compute the variances of prediction (ordinary kriging) using log-transformed data in R: library(gstat) library(sp) data(meuse) coordinates(meuse)=~x+y data(meuse.grid) gridded(meuse.grid) = ~x+y modv <- vgm(psill=0.5, model="Sph", range=900, nug = 0) fitv <- fit.variogram(va