Displaying 20 results from an estimated 600 matches similar to: "Calculating volume under polygons"
2024 Aug 24
1
paired raster boxplots
Dear Ivan
Dear community
Quite nice book recommendation.
Yes indeed my raster "s" (the shape file for the boxplot classes) has several layers. That's way I tried to select a layer by " s<-sf$Unterregio".
> sf <- read_sf("C:/Users/....._BiogeoRegion.shp")
> names(sf)
> names(sf)
[1] "RegionNumm" "RegionName"
2024 Aug 23
1
paired raster boxplots
? Fri, 23 Aug 2024 10:15:55 +0200
<sibylle.stoeckli at gmx.ch> ?????:
> > s<-sf$Unterregio
> > r<-allrasters_pres[[1]]
> >
> >
> > rs <- stack(r, s)
> > names(rs) <- c('r', 's')
> Error in `names<-`(`*tmp*`, value = c("r", "s")) :
> incorrect number of layer names
It looks like at least one
2024 Aug 23
1
paired raster boxplots
Dear Ivan
Many thanks.
Using my own dataset, my "s" is a layer shape file.
Somewhere I need to define : snew<-s$Unterregio
I tried it to do it before stack(), but it seems to be the wrong way. Do you have any suggestion?
Code:
> #first import all files in a single folder as a list
> rastlist_pres <- list.files(path ="C:/Users/....._bee_presence",
2024 Aug 22
1
paired raster boxplots
? Thu, 22 Aug 2024 08:46:03 +0200
SIBYLLE ST?CKLI via R-help <r-help at r-project.org> ?????:
> rr2s <- stack(r, r2,s)
> > names(rs) <- c('r', 's', 'r2')
>
> Error in `names<-`(`*tmp*`, value = c("r", "s", "r2")) :
>
> incorrect number of layer names
The error must be happening because the variable
2011 Feb 17
0
Indentify polygons that are on the border of a shapefile
Dear R users,
I would like to know how to indentify the polygons that are located on the
border of a map (i.e.shapefile).
Do you have any suggestion on how to do it?
Thank you very much,
Leo Monasterio.
[[alternative HTML version deleted]]
2024 May 17
0
[External] Re: Removing polygons from shapefile of Scotland and Islands
Scotland is the second feature in the UK data, so get it and split this one
MULTIPOLYGON feature into individual POLYGONS
scot = st_cast(the_uk$geometry[2],"POLYGON")
# which is the largest polygon?
which.max(st_area(scot))
[1] 1
# the first one. ok...
plot(scot[[1]]) # mainland
# add the rest of the islands for context, in grey, maybe to show they're
outside our study area:
2004 Feb 25
2
writing polygons/segments to shapefiles (.shp) or other ArCGIS compatible file
I am not sure a previous e-mail reached the list (no mail aknowledgement from R-boundle etc.). The question was how to write polygon
or segment coordinates into a shapefile set or any other ArcGIS supported format. The library shapefiles seems to do something but
the documentation is a bit beyond of my mind.... and I cannot get the meaning of the functions write**** and its application to the
case
2011 Feb 18
1
How to calculate the perimeter and common border of polygons?
Dear R-users,
Is there any way of calculating the perimeter of a polygon in a shapefile
object? Furthermore, how to calculate the length of the common border of two
polygons?
I've searched the code of spded, but could not find a hint on how to do it.
Thank you very much,
Leo.
[[alternative HTML version deleted]]
2004 Feb 26
1
writing polygons/segments to shapefiles (.shp) or other A rcGIS compatible file
The main limitation of the shapefiles package that I put together is that it
does not create shapefiles from R objects - rather it only writes shapefiles
that have been read into R and manipulated within the constraints of the
existing file structure. By this I mean that for example you can change the
coordinates of points and write them back out. Or you can add a bunch of
blank columns in the
2008 Dec 15
1
convert opengis wkt to geometry?
After writing some code (stupidly without checking to see if there was
code to do this already) to generate PostGIS SQL insert statements for
simple geometry (wkt), I didn't check see if there is already something
available to convert WKT strings into some R package geometry (sp?).
Does anyone have any advice, hints, code (?) for converting the
following OpenGIS strings into something
2010 May 29
3
simpleError in storage.mode(y)
bonjour en travaillant avec un logiciel Multiple source methode, j'ai eu ce
message d'erreur : simpleError in storage.mode(y) - "double": invalid to
change the storage mode of a factor
en recherchant sur le net , c'est un message universel
svp, que signifiera ce message ?
merci pour votre int?r?t
anzid
--
View this message in context:
2013 Dec 01
0
How to create polygons representing sampled forest plots, and how to compute D1 matrix between these polygons ?
Hi everyone,
I am facing a problem I really do not know how to resolve about detecting
significant spatial structures in a region I am studying.
The study is about the Miombo forest (wooded savanna). I am working in a 10
ha permanent forest plot, where all trees are mapped and identified. I
sampled 24 more or less regulately scattered plots of 25 x 25 m over the 10
ha. In each plot of 25 x 25 m
2012 Feb 03
3
SPATIAL QUESTION: HOW TO MAKE POLYGONS AROUND CLUSTERS OF POINTS AND EXTRACT AREAS AND COORDINATES OF THESE POLYGONS?
Imagine that I have a large number of points (given by coordinates x and y) that vary in density per space. For the purpose of demonstration it could be generated like this: s <- data.frame(x=runif(10000,0,900),y=runif(10000,0,900)); plot(s)
I want to create polygons around the points where point density is greater than a selected threshold (for example, by using krieging or equivalent
2005 May 10
1
wish: print.condition and html (PR#7848)
Full_Name: Tom Short
Version: 2.1.0
OS: Win2000
Submission from: (NULL) (68.236.159.160)
print.condition prints out error messages enclosed in angle brackets as in:
> simpleError("Sigh, yet another error...")
<simpleError: Sigh, yet another error...>
If R is used to generate HTML output (R2HTML or Rpad), then the error messages
get hidden because browsers will skip right
2016 May 04
4
Is it possible to retrieve the last error? (not error *message*)
Hi,
at the R prompt, is it possible to retrieve the last error (as in
condition object of class "error")?
I'm not asking for geterrmessage(), which only returns the error
message (as a character string). I'm basically looking for a
.Last.error or .Last.condition, analogously to .Last.value for values,
which can be used when it is "too late" (not possible) to go back
2009 Feb 05
1
Does the "labpt" object in the Polygons-class represent the centroid of the polygon
Hello,
I need to calculate the centroids of some spatial polygons that I have
placed into a Polygons-class object. Is the labeling point in the
Polygons-class the centroid of the polygon?
Thank you for your help.
2017 Dec 01
3
tryCatch in on.exit()
The following example involves a function whose on.exit()
expression both generates an error and catches the error.
The body of the function also generates an error.
When calling the function wrapped in a tryCatch, should
that tryCatch's error function be given the error from the
body of the function, since the one from the on.exit has
already been dealt with? Currently the outer tryCatch
2008 Jul 27
1
Lattice wireframe: How to avoid drawing lines around polygons when using shade=TRUE
I am using wireframe from the lattice package, with the shade option set
to TRUE. When I output to PDF or Postscript, a line gets drawn around
each polygon of my surface which causes ugly Moir? effects and doesn't
make sense in my application (think the plot of Maunga Whau--gridlines
don't make sense). This does not happen when I display on the screen--
then I just get the surface as
2010 Jan 21
0
sp package - How to join two or more polygons from a SpatialPolygonsDataFrames
I have a SpatialPolygonsDataFrame object (sp package).
It contains 40 polygons.
Now I want to join some of the polygones.
I cannot figure out how to do that? Any ideas?
The code below produces a map of Germany and I need to join some
counties.
library(sp)
library(RColorBrewer)
# get spatial data for Germany on county level
con <- url("http://gadm.org/data/rda/DEU_adm3.RData")
2014 Jun 15
0
Problem with converting a list of grids to a list of polygons
Hi.
For a spatial analysis (its visualization) I need to produce a map of
conditions and traits.
When I used SpatialPixelsDataFrame (sp package) my grid cells were regular
and between each row was a small gap, which is not only messy but incorrect.
So I generated the coords of each grid from the centroids in order to
elongate the cells manually (or does anybody know another way to solve
this?).