Try the alphahull package, it's not integrated with the sp family but
it's simple enough.
On Sat, Jun 2, 2012 at 8:28 AM, Christian Jansson wrote:
> Hi,
>
> I have a large set of points (lat lon) for which I must find the hull. The
> functions rgeos::gConvexHull followed by rgeos::gBuffer work
Hi,
I have a large set of points (lat lon) for which I must find the hull. The
functions rgeos::gConvexHull followed by rgeos::gBuffer work well when the
points are grouped together in a circular fashion, but not when the points
are for example in a banana shape (when it is better if the hull turn
Benny,
If your goal is to compute the area of non-connected areas (patches), I
think you can do:
library(raster)
im <- brick("P1020393.JPG")
plotRGB(im)
extract=(im[[1]]>50)&(im[[2]]>180)&(im[[3]]>220)
# see raster::: predict for an alternative approach
# create patches
clmp <- clump(extract)
p
Thanks Giuseppe,
I actually can see that the "Close Gaps with Spline" is mentioned in the
documentation, but no further info is proposed.
Asking the SAGA CMD I can only get the usage (which I already knew from
`rsaga.get.usage(lib="grid_tools", module=7)`:
$ saga_cmd libgrid_tools.so "Close Gaps"
Check out ?mask
Rafi
--
Rafael Wüest
Swiss Federal Research Institute WSL
Zuercherstrasse 111
8903 Birmensdorf
Am 01.06.2012 um 20:51 schrieb "Thiago Veloso" :
> Dear all,
>
> When cropping a raster using a shapefile, through 'crop' function from
"raster" package, only the extent is taken
Dear all,
When cropping a raster using a shapefile, through 'crop' function from
"raster" package, only the extent is taken into account:
> r<-raster("lai2011361.Lai_1km.tif")
> extent(r)
class : Extent
xmin : -104.4326
xmax : -29.99736
ymin : -40.00064
ymax
Hi Evert,
As the help file says, the image is produced by the 'image' function, so
have a look at the help of that function. I think you can use the breaks
argument, perhaps using many more breaks than I do in the example below:
library(raster)
r <- raster(nc=10, nr=10)
r[] = runif(100) * 3
r[20
Malcolm,
Thanks for reporting that. You are probably using a factor with non-numeric
characters. You need to transform these first to a number, or a number-like
factor/character. In the next version that will be fixed too.
Robert
On Fri, Jun 1, 2012 at 1:28 AM, Malcolm Fairbrother <
m.fairbrot...
Hi,
I am just starting to use the alphahull package on a mac (OS:10.6.8 ) with
R(2.14.1) but I have come across a small problem which I cannot seem to
replicate using the toy examples from the package.
I have approx 130,000 data locations in European waters and I want to use
alpha hull to provide
Dear all,
I have a raster file in which cells have either values of -999, or values
ranging from 0-3 (apart from NA values obviously). I want to make a KML file
from this raster in which I would like cells with values -999 to be displayed
in gray and cells with values from 1-3 be colored accor
That works perfectly.
Thanks so much Rafael, you are a true hero!
--
View this message in context:
http://r-sig-geo.2731867.n2.nabble.com/extract-by-attributes-from-raster-image-to-polygons-tp7576826p7580086.html
Sent from the R-sig-geo mailing list archive at Nabble.com.
On Fri, 1 Jun 2012, gilles2604 wrote:
Tank you, I know understand the problem even if I don't understand why the
static gdal 1.9 doesn't support Postgisraster and Postgres driver (GDAL
1.9.0 normally does).
What GDAL supports is dependent on its external links to other software.
GDAL can be b
Tank you, I know understand the problem even if I don't understand why the
static gdal 1.9 doesn't support Postgisraster and Postgres driver (GDAL
1.9.0 normally does).
I tried to install the package from source, but it doesn't work...:
/> install.packages(type="source",c("C:/rgdal_0.7-11.tar.gz"
On Fri, 1 Jun 2012, gilles2604 wrote:
Hello
I already used rgdal successfully on Mac and on Linux/Ubuntu...
Now I try to make it work on Windows 7 (64 bit).
I have installed GDAL 1.9.1 on my system, but when I do : library(rgdal), I
get this:
/Geospatial Data Abstraction Library extensions t
Hello!
Thanks for your response.
What I was trying to do (and probably explaining it wrong) was to simulate a
matrix/raster such that if I looked at a measure of spatial autocorrelation, it
would be around 0.9.
So I attacked it via my time series train of thought and considered time
periods w
Erin, I believe the following would do this:
xy = expand.grid(x = 1:16, y = 1:16)
d = as.matrix(dist(xy))
sim = chol(0.9 ^ d) %*% rnorm(256)
require(sp)
grd = SpatialPointsDataFrame(SpatialPoints(xy), data.frame(sim=sim))
gridded(grd) = TRUE
spplot(grd, col.regions=bpy.colors())
I used distance
Robert,
Thanks very much--that indeed solved the problem. However, even with the
workaround, it seemed to need the values of dsmw to be numeric, not a
factor--otherwise I got all all NAs. I wasn't sure if that's expected behaviour.
Cheers,
Malcolm
On 31 May 2012, at 17:21, Robert J. Hijmans w
Hello
I already used rgdal successfully on Mac and on Linux/Ubuntu...
Now I try to make it work on Windows 7 (64 bit).
I have installed GDAL 1.9.1 on my system, but when I do : library(rgdal), I
get this:
/Geospatial Data Abstraction Library extensions to R successfully loaded
Loaded GDAL runti
Dear R Sig Geo People:
I would like to create a 16x16 raster, say, with autocorrelation structure of
0.9 for nearest cell, 0.9^2 for 2nd closest, and so on.
How would I go about generating that, please?
I thought about putting together a correlation matrix, multiplying, and
throwing in rnorm.
Hi Benny
I once had the same problem and couldn't find a solution, so I coded a
workaround. Adjusted to your example, this will look like:
library(rgeos)
library(raster)
library(maptools)
im=brick("P1020393.JPG")
extract=(im[[1]]>50)&(im[[2]]>180)&(im[[3]]>220)
poly_dissolve=rasterToPolygons(ext
20 matches
Mail list logo