Re: [R-sig-Geo] How to do square buffers around spatial points

2016-08-25 Thread Alexandre Villers
You can try the rgeos::gBuffer() with capStyle='SQUARE' p<-SpatialPoints(matrix(c(1,1), ncol=2)) plot(p) plot(gBuffer(p, capStyle="SQUARE",width=0.1), add=T) Would that fit you ? regards Alex [[alternative HTML version deleted]] ___ R-sig-Geo

Re: [R-sig-Geo] Error: 'rawTransform' is not an exported object from 'namespace:rgdal' in the projectRaster

2015-03-22 Thread Alexandre Villers
Hi Tom, It also works for me with this R version 3.1.0 (2014-04-10) Platform: x86_64-w64-mingw32/x64 (64-bit) locale: [1] LC_COLLATE=French_France.1252 LC_CTYPE=French_France.1252 LC_MONETARY=French_France.1252 [4] LC_NUMERIC=C LC_TIME=French_France.1252 attached base packag

Re: [R-sig-Geo] Error In proj4string

2014-10-20 Thread Alexandre Villers
ot; "bio8" "bio9" > "bio10" "bio11" >> class(temp) > [1] "character" > ###end > > I am not sure why this issue is occurring. > I have checked all the projections - all files are in the same projection. > I have restarted

Re: [R-sig-Geo] problems for using spgrass6 package

2014-06-12 Thread Alexandre Villers
Hi, This message doesn't prevent you from using grass. You can still use the different grass modules within the R environment. Unless you have other warnings or error messages... HTH Alex Le 13 juin 2014 05:54, "Ramiro Augusto Espada" a écrit : > Hi! > > Im trying to use GRASS GIS inside R. B

[R-sig-Geo] rasterize SpatialLines

2013-11-28 Thread Alexandre Villers
Dear list, I'm trying to rasterize a SpatialLines object, which represents the path of an individual (created from the points locations). I would like to know the number of times he visited a given pixel. Following the example (slightly modified) in raster::rasterize cds1 <- rbind(c(-180,-20)

Re: [R-sig-Geo] spplot.points: one panel per level of a factor

2013-10-04 Thread Alexandre Villers
# anything else you want to do in every panel > panel.xyplot(x,y,...) > }, > scales = list(draw = FALSE), > xlab = NULL, ylab = NULL > ) > > Hth, > > On 10/03/2013 10:25 PM, Alexandre Villers wrote: > > Good eve

[R-sig-Geo] spplot.points: one panel per level of a factor

2013-10-03 Thread Alexandre Villers
Good evening, I'm sure I'm missing something really obvious but I couldn't figure it out (or find the solution on the Internet). Is there a way to produce the same type of graph as library(lattice) data(meuse) xyplot(y~x|ffreq, meuse, asp=1) with spplot.points and a SpatialPointsDataFrame ? I w

Re: [R-sig-Geo] Package for fitting spatial model on large dataset

2013-07-16 Thread Alexandre Villers
nd any other package you think can fit such > model. > > Thank you. > > Moshood > > [[alternative HTML version deleted]] > > ___ > R-sig-Geo mailing list > R-sig-Geo@r-project.org > https://stat.ethz.ch/mailman/

Re: [R-sig-Geo] alternative for spixdf2kasc from adehabitat package

2013-07-06 Thread Alexandre Villers
8.0/i386 (32-bit) > > My computer: > MacBook 2GHz Intel Core 2 Duo > MAC OS X Version 10.6.8 > > [[alternative HTML version deleted]] > > ___ > R-sig-Geo mailing list > R-sig-Geo@r-project.org > https://stat.ethz.ch/mailman/

Re: [R-sig-Geo] Export raster from R to Arcgis

2013-07-02 Thread Alexandre Villers
patial reference. > Thank you in advance > Komine > > > > -- > View this message in context: > http://r-sig-geo.2731867.n2.nabble.com/Export-raster-from-R-to-Arcgis-tp7583995.html > Sent from the R-sig-geo mailing list archive at Nabble.com. > > ___

Re: [R-sig-Geo] dismo:::gmap - how to obtain a 1:1 plot

2013-07-02 Thread Alexandre Villers
Hi, There is an asp options in par. It works with plot and image plot(x,y, asp=1) or image(x, asp=1) should produce what you're looking for HTH Alex On 02/07/2013 10:31, Ivailo wrote: Dear R-geo folks, I am trying to plot some points with gmap(), but the resulting plot is not the same qualit

Re: [R-sig-Geo] ENFA scatter plot problem & habitat suitability map question

2013-06-27 Thread Alexandre Villers
Hello, Regarding what you call "habitat prediction map", which I guess is habitat suitability (if this term is more suited), you can have a look at the spatial analyst page http://spatial-analyst.net/wiki/index.php?title=Species_Distribution_Modelling HTH Alex P.S.: by the way, you should

[R-sig-Geo] Simulating landscapes of categorical values

2013-06-06 Thread Alexandre Villers
Good afternoon, I've been searching the CRAN for quite a while now without being successful. In case I've missed it, could someone provide me with the name of a package that would allow simulating landscapes of categorical variables (and controlling the spatial correlation of the different landsca

Re: [R-sig-Geo] Automatic geographical projection parameters setting

2013-05-29 Thread Alexandre Villers
Hi, You could try using paste(). This should work (I think) spTransform(xy, CRS(paste("+proj=laea +lat_0=",LAT, " +lon_0=", LONG," +x_0=0 +y_0=0 +ellps=WGS84 +units=m +no_defs",sep=""))) HTH Alex On 29/05/2013 10:58, Francesco Carotenuto wrote: > Hi > to all, > I > need to automatically

Re: [R-sig-Geo] Help with ENFA in R

2013-04-15 Thread Alexandre Villers
Hi, Typing ?enfa (after loading adehabitatHS) and searching through the examples that are provided, you should find these lines ## We prepare the data for the ENFA tab <- slot(map, "data") pr <- slot(count.points(locs, map), "data")[,1] Maybe you could start with this, i.e. understanding how

Re: [R-sig-Geo] Help with ENFA in R

2013-04-15 Thread Alexandre Villers
Hi, Typing ?enfa (after loading adehabitatHS) and searching through the examples that are provided, you should find these lines ## We prepare the data for the ENFA tab <- slot(map, "data") pr <- slot(count.points(locs, map), "data")[,1] Maybe you could start with this, i.e. understanding how

Re: [R-sig-Geo] Spatial correlogram with missing data

2013-03-13 Thread Alexandre Villers
Hello, Don't know if this is of any help but in package ncf, there is the spline.correlog() function that apparently deals with NA. HTH Alex On 12/03/2013 16:55, Diogo B. Provete wrote: > Dear list, > I'm trying to get a spatial correlogram of some environmental variables > with function spdep:

Re: [R-sig-Geo] gdalwarp gives different cellsize when re-projected

2013-03-07 Thread Alexandre Villers
Hello, Well, given you went from a projected to a geographic coordinates system, you changed the unit of the grid from meters to degrees. So I wouldn't be surprised and I guess nothing went wrong as long you specified the correct EPSG for your original file. HTH Alex On 07/03/2013 15:29, Sw

Re: [R-sig-Geo] Error using SpatialPixelsDataFrame function

2013-02-06 Thread Alexandre Villers
gt; 5: In getGridIndex(coordinates(points), grid) : NAs introduced by coercion > > What's the problem? > > PD: I can not attach data for this because the size exceeds the maximum > allowable. > > Thanks in advance. > > ___

Re: [R-sig-Geo] Error in sample package SP

2013-02-04 Thread Alexandre Villers
Good afternoon, You should be more specific when reporting an error if you want people to help you. Check this link first http://www.r-project.org/posting-guide.html - Stating "Result error in below" is not really the best sentence to attract one's attention. What is the problem exactly? - You

Re: [R-sig-Geo] line density

2012-12-23 Thread Alexandre Villers
Hi, Have a look at density.psp() in spatstat package ( http://r-sig-geo.2731867.n2.nabble.com/Kernel-Density-With-Lines-td6407187.html ) HTH Alex On 23/12/2012 10:54, Allen Aven wrote: Hi geo-listers. I'm trying to figure out if there is a method in R for line density estimation, simila

Re: [R-sig-Geo] repeated commands... how to loop?

2012-12-01 Thread Alexandre Villers
Hello, It's not really clear from your message whether y1, y2, y3 are the y part of x/y coordinates, and what is the exact structure of your data frame. Without knowing this, the code below is to be adapted to your needs ##load the packages library(gstat) library(raster) #Load the data that

Re: [R-sig-Geo] setting up a spatial data frame

2012-02-22 Thread Alexandre Villers
Hi Erin, You should provide us with more information: with no lat / lon data, it is going to be pretty difficult to turn your data frame into a Spatial Object... were the data collected on a regular grid, is it somehow linked to a Spatial object that could be imported into R? From the last co

Re: [R-sig-Geo] neighbourhood analysis with R spatial objects

2012-02-17 Thread Alexandre Villers
Hi, I think I found the solution with the extract function of the raster package, which seems pretty fast from what I just experienced... But any other suggestions are welcome ! Best regards ___ R-sig-Geo mailing list R-sig-Geo@r-project.org https:/

[R-sig-Geo] neighbourhood analysis with R spatial objects

2012-02-17 Thread Alexandre Villers
Dear list, I am struggling a bit with this issue and was hoping that someone could indicate me a solution. I have a raster image describing the landscape (with several habitat classes) at 10 meters resolution. I would like to compute the different proportions of each habitat type, but on a c

Re: [R-sig-Geo] [R-sig-eco] Model for zero-inflated species abundance data, allowing for spatial autocorrelation?

2012-02-14 Thread Alexandre Villers
Hi, If you are not afraid to switch to Bayesian methods (but fast ones !), the INLA package could do that for you. ( www.r-inla.org ) Cheers Alex On 14/02/2012 15:36, Kay Cichini wrote: Hi all, I'd very much appreciate pointers at methodology/R-packages/functions suited for modelling zer

Re: [R-sig-Geo] unable to customize a plot produced from a shapefile

2012-02-09 Thread Alexandre Villers
Hi, You should have a look at the documentation (e.g. manuals) available on graphics in R (on the CRAN website, hhttp://cran.r-project.org/) to learn how to set the parameters of a R graphic, and more specifically at the spplot function (from package sp) for spatial objects (the ASDAR book of

[R-sig-Geo] simulating landscape

2012-01-28 Thread Alexandre Villers
Dear list, I would like to simulate a landscape composed of 5-10 different habitat classes, with 2 or 3 classes displaying spatial clustering. I couldn't find any implemented function (if there is any) and was wondering if someone could suggest an elegant way of doing it. I was thinking of us

[R-sig-Geo] Supervised landscape classification according to NDVI time series

2011-06-11 Thread Alexandre Villers
Hey, From what I understood, most landscape classification methods available from GRASS (through R) do not account for the temporaI aspect of spectrum. So for example, if you have a raster where each band represents NDVI values at a given date, from March to September for example, the classif

Re: [R-sig-Geo] Circles as polygons?

2011-03-30 Thread Alexandre Villers
Hi, Have a look at the disc() function in spatstat. I guess you can then either do what you aim at directly with spatstat, or after converting spatstat objects to sp class with maptools appropriate functions. HTH Alex On 30/03/2011 15:39, Pieter Botha wrote: Hi I have a SpatialPointsDataF

Re: [R-sig-Geo] rgdal to gif: HELP!!!

2011-03-15 Thread Alexandre Villers
Hi, What is exactly your goal? Displaying an image in a GIS or just saving an image to be used as an illustration ? If the second option is yours, then have a look at spplot() and then save the image with png(), jpeg(), tiff() or bmp() HTH Alex Dear all, I'm new to this forum. I'm despe

Re: [R-sig-Geo] Calculating area of polygons

2011-02-15 Thread Alexandre Villers
Good afternoon, I guess it will be the unit of your original SpatialPolygons object. If you use a projected coordinate system, the unit should be in meters, otherwise, I'm not sure of this, but it should be in squared degrees. HTH Alex Le 15/02/2011 10:31, Wincent a écrit : The previous em

[R-sig-Geo] Maptools as.SpatialPolygons.owin() behaves in a strange way ?

2011-02-10 Thread Alexandre Villers
  Matrix_0.999375-46 nlme_3.1-97    svMisc_0.9-61  tools_2.12.1 -- Alexandre Villers, PhD. Postdoc researcher Spatial Ecology & Population Dynamics Section of Ecology, Department of Biology University of Turku

Re: [R-sig-Geo] problem with disc ( ) in spatstat

2010-12-27 Thread Alexandre Villers
), npoly=126) -- Alexandre Villers, PhD. Postdoc researcher Spatial Ecology & Population Dynamics Section of Ecology, Department of Biology University of Turku FIN-20014 Turku Finland @mail: alexandre.

Re: [R-sig-Geo] INTAMAP--->GeoTIFF

2010-12-17 Thread Alexandre Villers
Hey, After checking the vignette of Intamap, you can find out from this example that data(meuse) coordinates(meuse) = ~x+y meuse$value = meuse$zinc data(meuse.grid) gridded(meuse.grid) = ~x+y x = interpolate(meuse, meuse.grid, list(mean=TRUE, variance=TRUE)) x$predictions is a SpatialPixelsDa

Re: [R-sig-Geo] Rgdal GeoTIFF

2010-12-16 Thread Alexandre Villers
lt;- TRUE g <- krige(formula=wert ~1, e, grd,model=vgm(1,"Exp",300)) proj4string(g) = CRS("+init=epsg:4326") writeGDAL(g, "ordinary_kriging_1.tif", drivername="GTiff", type="Byte") Thanks Tarek -- Al

Re: [R-sig-Geo] Polygon edge smoothing

2010-12-05 Thread Alexandre Villers
and the simplify.owin() function. Maptools package provides function to convert objects between sp and spatstat formats. HTH Alex -- Alexandre Villers, PhD. Postdoc researcher Spatial Ecology & Population Dynamics Section of Ecology, Department of Biology University of Turku FIN-20014 T

Re: [R-sig-Geo] gpclib problem with as.polygonal in spatstat ?

2010-12-03 Thread Alexandre Villers
(letterR) m<- as.mask(letterR, dimyx=32) p<- as.polygonal(m) Cheers, Marcelino Con fecha 3/12/2010, "Alexandre Villers" escribió: Good afternoon I'm trying to convert a mask to a polygonal windows with spatstat. However, despite, the gpclibPermit(

[R-sig-Geo] gpclib problem with as.polygonal in spatstat ?

2010-12-03 Thread Alexandre Villers
Good afternoon I'm trying to convert a mask to a polygonal windows with spatstat. However, despite, the gpclibPermit() command, I get this error message: Warning message: In as.polygonal(m) : Can't convert mask to polygon: gpclib is disabled/unavailable While trying this data(letterR)