Displaying 20 results from an estimated 6000 matches similar to: "How extract the names of ID in SpatialPolygons object"
2009 Mar 21
3
Retrieving Vertices Coordinates from SpatialPolygons
Dear List,
I'm trying to use different R packages for my Teaching Assistantship
classes. And I cam out to an (apparently) very simple problem. I would
like to retrieve the vertices coordinate of a SpatialPolygon data. I
know this is stored in the "coords" slot, but I can't get access to
it! I tried to coerce the SpatialPolygon into a data.frame but it
doesn't work.
2011 Feb 11
1
Extract a slot value from a 'SpatialPolygons' class object
Dear R-users,
I’m currently trying to extract the value of a slot (area) but can’t find out how to do that.
>str(overlperc)
List of 1
$ :Formal class 'SpatialPolygons' [package "sp"] with 4 slots
.. ..@ polygons :List of 1
.. .. ..$ :Formal class 'Polygons' [package "sp"] with 5 slots
.. .. .. .. ..@ Polygons :List of 1
.. .. .. .. .. ..$
2006 Jan 07
1
maptools, write.polylistShape
Dear Roger,
I am trying to use the write.polylistShape() function of maptools for
the first time and realize that it handles list of polygons of class
'polylist'. However, it seems that no as.polylist() function exist in
the package. The question behind that is: in your opinion, which would
be the best way to convert a list of matrix of polygon nodes
coordinates into an object of
2006 Oct 07
3
merge and polylist
Greetings:
I would like to kindly ask for a little help. The rough code is:
#________________________________________________________
dat=data.frame(read.delim(file="all.txt", header = TRUE, sep = "\t",
quote="\"", dec=".",na.strings = "NA"))
nc=read.shape("astae.shp", dbf.data=TRUE, verbose=TRUE)
mappolys=Map2poly(nc)
submap
2018 Jun 01
1
rasterize SpatialPolygon object using a RasterBrick object
I am trying to rasterize a SpatialPolygon object by a RasterBrick object.
The documentation of the raster::rasterize function explicitly says this is
allowed. Here's what I am doing
# load the raster package
library("raster")
# create a raster brick object using the example from the brick
function documentation
b <- brick(system.file("external/rlogo.grd",
2017 Jun 01
3
[spatstat] Convert shapefile to pixel image
Dear all,
I am currently working with the spatstat package, using windows and pixel images.
First:
My aim is to transform a shapefile (see attached) into a pixel image.
My idea is to start transforming the shapefile into a Spatial Polygon file:
x <- readShapeSpatial("200001441.shp")
y <- as(x, "SpatialPolygons")
z <- as.owin(y)
Given z, I want to identify each
2017 Jun 01
0
[spatstat] Convert shapefile to pixel image
On 02/06/17 01:17, Lluis.Hurtado at uv.es wrote:
> Dear all,
>
> I am currently working with the spatstat package, using windows and pixel images.
>
> First:
>
> My aim is to transform a shapefile (see attached) into a pixel image.
>
> My idea is to start transforming the shapefile into a Spatial Polygon file:
>
> x <-
2007 May 04
1
Help with map
I have just learned how to play with map, but something weird
(or not) is happening.
Suppose I want to draw a map of two countries (that have disconnected
components), like Argentina and Brazil.
If I command:
library(maps)
library(mapdata)
map("worldHires", c("Argentina", "Brazil"))
It works fine. However, if I want to _colour_ the interior:
2005 Sep 26
1
merge maps from shapefile to lattice
Hi everybody:
Could anybody help how I solve the next problem?.
I'm doing interpolation maps of tropospheric ozone of my region, and after
create it using IDW, and kriging methods, I want from shapefiles (*.shx,
*.shp, *.dbf, *.sbx & *.sbn ) create contour over the interpolation maps.
Could anybody tell me how do it?.
Thanks in advance.
######################################
Antonio
2006 Mar 21
1
Getting polygons from contiguous grid cells having same value in sp
I have been using the sp package to deal with gridded data. I would
like to know how to extract the vertices (x,y) of polygons that outline
areas of like-valued cells in a grid. Here is a simple 3x3 grid:
2 2 1
1 2 1
1 1 3
x <- c(1,1,1,2,2,2,3,3,3) # define a 3 x 3 array of points
y <- c(1,2,3,1,2,3,1,2,3)
h <- SpatialPoints(cbind(x,y)) # make these an sp object of the points
2007 Dec 09
1
spatstat questions
Um texto embutido e sem conjunto de caracteres especificado associado...
Nome: n?o dispon?vel
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20071209/130cf9d6/attachment.pl
2005 Dec 29
3
importing shapefiles into spatstat
Dear R users,
I am using spatstat to analyze point patterns (tree locations). I would
like to import the shapefile with the study area polygons (six total) into R
and use it to create the window for the spatstat analysis. I do not simply
want to use a rectangle because the study areas spread out over 40000 ha.
Any suggestions would be greatly appreciated.
Thanks,
Charlotte Reemts
Charlotte
2009 Jul 16
2
Problems generating image from tiff file
I imported the attached tiff file and converted the coordinate system to
long lat and graphed it:
californiatiff<- readGDAL("california1.tif")
proj4string(californiatiff)
> rasterprojection <- spTransform(californiatiff, CRS("+proj=longlat")
however, when using the plot command for rasterprojection, I get a blob. I
can see the outline of the state of california and
2008 Mar 29
3
Generating maps in R
Greetings!
I am trying plot some data on a map in R. Here's the scenario.
I have a variable called probworkinghealthy which contains a predicted
probability of employment for every individual in my sample (about
100,000 observations).
I have another variable, called a001ter, which contains the subject of
residency in the Russian Federation (akin to a US state) for every
individual in the
2014 Oct 17
1
Holding a large number of SEXPs in C++
Background:
I have an algorithm which produces a large number of small polygons (of the
spatial kind) which I would like to use within R using objects from sp. I
can't predict the exact number of polygons a-priori, the polygons will be
grouped into regions, and each region will be filled sequentially, so an
appropriate C++ 'framework' (for the point of illustration) might be:
typedef
2008 Feb 04
1
how to get points from SpatialPolygonsDataFrame
Um texto embutido e sem conjunto de caracteres especificado associado...
Nome: n?o dispon?vel
Url: https://stat.ethz.ch/pipermail/r-help/attachments/20080203/5ea1e3ad/attachment.pl
2006 Nov 07
2
wrong fill colors in polygon-map
Dear all,
I would like to produce a map with information about the patenting
activity in German districts, by coloring districts with different
degrees of patenting activity in different colors. I work with the
packages maptools, maps and spdep. The map data is read from an external
.shp file (+ the corresponding .shx and .dbf files). Plotting a map with
the IDs or the patenting indicator itself
2007 Apr 04
6
transition matrices
I am working with transition matrices of sequences of animal
behaviours. What I would like to do is parse the original matrices,
adjusting row/column order so that the matrix has its main values in blocks
surrounding the diagonal. This would cause behaviours involved in
functional groupings (e.g. grooming, resting, foraging etc) to appear as
blocks.
This can be done manually by applying
2004 Sep 22
2
dot density maps
Dear All,
In the moment i'm using the map and maptools package to read shapefiles
and display the maps.
I'm looking for the possibility to draw points (randomly positioned or
positioned according to a grid) into the polygons instead of filling the
polygons with colors.
For example:
a map (shapefile) with 10 countries, 15 points in the polygon of country
A, 20 points in the
2008 Feb 17
1
random location in polygons sp spsample splancs csr
Dear all,
I had to place points at random, one in each of larger number of
polygons (actually in objects of class 'SpatialPolygonsDataFrame' , see
sp library), and tried first to do it using spsample (from sp).
Surprisingly, every 5-15 trials, the output was a NULL value. The doc
says that ' this may occur when trying to hit a small and awkwardly
shaped polygon in a large