search for: spatialpolygonsdatafram

Displaying 20 results from an estimated 46 matches for "spatialpolygonsdatafram".

2011 Jul 21
0
SpatialPolygonsDataFrame to map conversion?
Dear list, I'd like to use the function smooth.map{maps} to smooth out aggregated spatial data. The first argument to this function must be a map object. I have a shape file which I read with readShapeSpatial{maptools} and I got an object of class "SpatialPolygonsDataFrame". Is it possible to create a map object from a SpatialPolygonsDataFrame object? Alternatively, is there any other function similar to smooth.map that will work with a SpatialPolygonsDataFrame? Thanks for any help, Axel. [[alternative HTML version deleted]]
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
2011 Jul 09
1
SpatialPolygonsDataFrame holes problem
...= "Tamil Nadu",]) #Error arises for this State: gCentroid(india[india$NAME == "Gujarat",]) #Error says: #Error in createPolygonsComment(p) : #rgeos_PolyCreateComment: orphaned hole, cannot find containing polygon for hole at index 2 #Code ends I don't know my way around SpatialPolygonsDataFrame objects very well, and have no idea how to fix the errant hole. Any help greatly appreciated. Thanks Dan Bebber
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 co...
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(myobject, b...
2017 Jun 07
1
Errors running spdplyr example
...pl)[,1], lat = coordinates(wrld_simpl)[,2]) %>% filter(lat < -20, lon > 60) %>% dplyr::select(NAME) I got the following error messages: Error in (function (cl, name, valueClass) : c("assignment of an object of class ?tbl_df? is not valid for @?data? in an object of class ?SpatialPolygonsDataFrame?; is(value, \"data.frame\") is not TRUE", "assignment of an object of class ?tbl? is not valid for @?data? in an object of class ?SpatialPolygonsDataFrame?; is(value, \"data.frame\") is not TRUE", "assignment of an object of class ?data.frame? is not valid f...
2009 Aug 14
1
extract data from shapefiles
I'm hoping that someone could guide me in how to extract data from shapefiles. I want to extract data from a shapefile (classed as "SpatialPolygonsDataFrame") and more specifically, the data is contained within the slot called "coords" from the class "polygons" within this file and despite my best efforts (and much reading!), I'm at a lost. Many thanks, Kate
2012 Jul 20
1
Dissolve polygon
Hi, I am working with a SpatialPolygonsDataFrame of many islands. There are a lot of polygons (islands) composing my SpatialPolygonsDataFrame. I want to extract the elevation of each island. I need to separate the different polygons (like dissolve function in arcgis), to have the elevation of each island. Do you have any idea how can I do that ?...
2010 May 06
1
extracting coordinates from SpatialPolygonsDataFrame using slot functions
In converting some older code: ## builds an OWIN to generate a set of points on a grid within the OWIN object: bdry <- read.shape( "../../data/boundary.shp" ) outline.verts <- bdry$Shapes[[2]]$verts[1:bdry$Shapes[[2]]$Pstart[2],] outline.order <- nrow( outline.verts ) : 2 bdry.poly <- vector( 2, mode="list" ) bdry.poly[[1]] <- list(
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
2012 Apr 01
4
map and shapefile help
Hi, I want to use map("state") and have the ecoregion shape (please see link) file projected onto this. ftp://ftp.epa.gov/wed/ecoregions/cec_na/NA_CEC_Eco_Level3.zip ftp://ftp.epa.gov/wed/ecoregions/cec_na/NA_CEC_Eco_Level3.zip Could someone please show me how; I have never messed with this sort of thing. Thanks. -- View this message in context:
2006 Feb 23
0
adehabitat version 1.4
...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 frame. 'traj2spdf' converts an object of class 'traj' into an object of class 'SpatialPoints...
2006 Feb 23
0
adehabitat version 1.4
...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 frame. 'traj2spdf' converts an object of class 'traj' into an object of class 'SpatialPoints...
2011 Jul 23
1
Problem with read.shape in maptools
Hi, I'd like to read a shapefile into a Map object. This is exactly what read.shape{maptools} is suppoed to do, according to the documentation I found in the link below. However, this doesn't seem to work library(maptools)x <- read.shape(system.file("shapes/sids.shp", package="maptools")[1])Error: could not find function "read.shape" I haven't
2011 Sep 15
1
Creating a map with central Asian countries
Dear all, I am trying to create a map for central asian countries(Kazakhstan, Uzbekstan, Kyrgyzstan, Turkmenstan, and Tajikstan). I tried google for shapefiles and Rdata files of central asia, but I can't seem to find them. There is only a world map and individual maps for each countries. If I use individual maps to create this map, how do I put them on a same graphic with different colours?
2012 Aug 17
1
RGDAL OGRwrite question
...RI Shapefile', verbose=TRUE) Error in writeOGR(shape, ".", layer = "temp", driver = "ESRI Shapefile") : Creation of output file failed > writeOGR(shape, '/tmp', layer='temp', driver='ESRI Shapefile',verbose=TRUE) $object_type [1] "SpatialPolygonsDataFrame" $output_dsn [1] "/tmp" $output_layer [1] "temp" $output_diver [1] "ESRI Shapefile" $output_n [1] 169 $output_nfields [1] 23 $output_fields [1] "ID" "ANID" "F_AREA" "Avg_z" "Manning"...
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 bounding box with a small number of points',...
2009 Aug 30
1
Trying to rename spatial pts data frame slot that isn't a slot()
...IS for manipulations. At this point the ID names were lost. I brought the manipulated shapefiles back into qGIS, but can't figure out how to rename the individuals. #Calculate MCP and save as a shapefile my.mcp<-mcp(xy, id=id, percent=100) spol<-area2spol(my.mcp) spdf <- SpatialPolygonsDataFrame(spol, data=data.frame +(getSpPPolygonsLabptSlots(spol), +row.names=getSpPPolygonsIDSlots(spol)), match.ID = TRUE) writeOGR(spdf,dsn=mcp.dir,layer="All Mantas MCP", driver="ESRI +Shapefile") #Read shapefile manipulated in qGIS mymcp<-readOGR(d...
2011 Feb 09
0
adehabitatMA, LT, HR and HS version 0.1
...ions kernelUD, kernelbb, BRB and kernelkc all return objects of class "estUDm", which are lists of objects of class "estUD". The class estUD extends the class SpatialPixelsDataFrame. - the function clusthr and LoCoH return objects of class "MCHu", which are lists of SpatialPolygonsDataFrame - the function mcp returns a SpatialPolygonsDataFrame * home range estimation methods now take objects of class SpatialPoints as arguments * objects of class "ltraj" are now characterized by an additional attribute "infolocs", which is designed to store metadata on the tra...
2011 Feb 09
0
adehabitatMA, LT, HR and HS version 0.1
...ions kernelUD, kernelbb, BRB and kernelkc all return objects of class "estUDm", which are lists of objects of class "estUD". The class estUD extends the class SpatialPixelsDataFrame. - the function clusthr and LoCoH return objects of class "MCHu", which are lists of SpatialPolygonsDataFrame - the function mcp returns a SpatialPolygonsDataFrame * home range estimation methods now take objects of class SpatialPoints as arguments * objects of class "ltraj" are now characterized by an additional attribute "infolocs", which is designed to store metadata on the tra...