Displaying 20 results from an estimated 34 matches for "spatialpolygon".
Did you mean:
spatialpolygons
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. Want I want is just a list of x and y coordinates of my
polygon vertices without doing the workflow in GRASS!!!
Than...
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...
2005 Dec 30
1
How extract the names of ID in SpatialPolygons object
Hi dear user,
Anybody can tell me how extract the names of ID in SpatialPolygons
object, I am try to link a data frame attributes with spatial polygons,
but the row names of data frame is not the same that ID poligons.
Thank for all
Fernando
[[alternative HTML version deleted]]
2006 Dec 30
1
plot methods in sp
Dear listers,
I am working since a while with the sp package and still wonder how the
plot methods are managed with sp spatial objects. For instance,
SpatialPolygonsDataFrame objects have obviously a plot method. However
it cannot be found in the list provided by methods(plot) . Furthermore
?plot.SpatialPolygonsDataFrame, nor ?plot.SpatialPolygons, etc.. provide
a help, though the lattice function spplot is adequately documented.
On the other hand, plot(my...
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
.. .. .. .. .. ..$ :Formal class 'Polygon' [package "sp"] with 5 slots
.. .. .. ....
2017 Jun 01
3
[spatstat] Convert shapefile to pixel image
...ly 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 polygon with a single constant value. This is like adding marks to the SpatialPolygons file. Then I want to convert these polygons into an image, such that the value of each pixel corresponds to the value associated to the polygon where t...
2013 Jan 04
1
SpatialPolygon with the max value gets no color assigned in spplot function when using "at" parameter
...Polygon(p1)), ID="ps1")
ps2=Polygons(list(Polygon(p2)), ID="ps2")
ps3=Polygons(list(Polygon(p3)), ID="ps3")
ps4=Polygons(list(Polygon(p4)), ID="ps4")
ps5=Polygons(list(Polygon(p5)), ID="ps5")
ps6=Polygons(list(Polygon(p6)), ID="ps6")
sps = SpatialPolygons(list(ps1,ps2,ps3, ps4, ps5, ps6))
spdf=
SpatialPolygonsDataFrame(sps,data.frame(weight=c(0.1,0.1,0.3,0.4,0.45,0.6),row.names=c("ps1","ps2","ps3","ps4",
"ps5","ps6")))
sp.theme(set = TRUE, regions = list(col = brewer.pal(4,"RdYlGn&qu...
2017 Jun 01
0
[spatstat] Convert shapefile to pixel image
...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 polygon with a single constant value. This is like adding marks to the SpatialPolygons file. Then I want to convert these polygons into an image, such that the value of each pixel corresponds to the value associated to the...
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
2017 Jun 01
0
[spatstat] Convert shapefile to pixel image
...ly 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 polygon with a single constant value. This is like adding marks to the SpatialPolygons file. Then I want to convert these polygons into an image, such that the value of each pixel corresponds to the value associated to the polygon where t...
2009 Jul 16
2
Problems generating image from tiff file
...t rather than
being able to see the geographic features, it is just a monocolor blob. My
suspicion is that since it is a list of coordinates and another column that
contains attributes, I need to turn it into a polygon. I've tried the
following codes but none work:
> rasterprojection2<-SpatialPolygons(rasterprojection)
Error in is.vector(X) :
trying to get slot "Polygons" from an object of a basic class ("integer")
with no slots
rasterprojection2<- Polygons(rasterprojection)
Error in as.vector(x, "list") :
cannot coerce type 'S4' to vector of type...
2006 Feb 23
0
adehabitat version 1.4
...ass "traj" is now deprecated.
Note that the data set "puechcirc" is now of the class ltraj.
- The functions making the interface with the package "sp" have been
updated: 'area2spol'
converts an object of class 'area' into an object of class
'SpatialPolygons'. 'spol2area' converts
an object of class 'SpatialPolygons' or 'SpatialPolygonsDataFrame'
into an object of class 'area'.
'attpol2area' gets the data attribute of an object of class
'SpatialPolygonsDataFrame'
and stores is into a data...
2006 Feb 23
0
adehabitat version 1.4
...ass "traj" is now deprecated.
Note that the data set "puechcirc" is now of the class ltraj.
- The functions making the interface with the package "sp" have been
updated: 'area2spol'
converts an object of class 'area' into an object of class
'SpatialPolygons'. 'spol2area' converts
an object of class 'SpatialPolygons' or 'SpatialPolygonsDataFrame'
into an object of class 'area'.
'attpol2area' gets the data attribute of an object of class
'SpatialPolygonsDataFrame'
and stores is into a data...
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
2014 Oct 17
1
Holding a large number of SEXPs in C++
...ck().push_back(Polygon(b, e));
}
private:
Regions regions;
};
where the reference_type of Iter is convertible to Point. In practice I use
pointers in a couple of places to avoid resizing in push_back becoming too
expensive.
To construct the corresponding sp::Polygon, sp::Polygons and
sp::SpatialPolygons at the end of the algorithm, I iterate over the result
turning each Polygon into a two column matrix and calling the C functions
corresponding to the 'constructors' for these objects.
This is all working fine, but I could cut my memory consumption in half if
I could construct the sp::Poly...
2012 Aug 15
1
shade overlapping portions of circles (or other shapes)
I'm making some illustrations and it would be convenient to
automatically shade the overlapping portions of circles. These
illustrations are for Social Choice theory, a field in political
science and economics. I've wrestled together some examples so you
can see what I mean, but have not mastered the "color overlapping
sections" problem (as you will see):
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
2014 Oct 08
4
Pregunta sobre manipulación de shapefile
...mtnezb en gmail.com
Date: Wed, 8 Oct 2014 22:22:59 +0200
Subject: Re: [R-es] Pregunta sobre manipulación de shapefile
To: fjroar en hotmail.com
CC: oscar.perpinan en upm.es; r-help-es en r-project.org
Hola:
No sé si he entendido bien, pero:
con la función fortify del paquete ggplot, conviertes un SpatialPolygonDataFrame en un data.frame corriente como el que tú has construido (con una columna adicional que agrupa los puntos que corresponden al mismo polígono).
A ese data.frame luego le puedes añadir las columnas que quieras y pintarlo encima de un tile de google maps (siempre que la proyección del Spatia...
2010 Jan 13
0
New sp release
The sp package provides class definitions for spatial data, and utilities
for spatial data handling and manipulation.
The release of sp version 0.9-56 introduces changes in the ways in which
Polygon, Polygons, and SpatialPolygons objects are created, moving from R
code to compiled C code. Because of these changes, it is possible that
users will see changed output. The package maintainers have tested as far
as possible, and a beta release has been checked by some users, without
any problems coming to light.
Further det...
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