search for: spatialpolygondatafram

Displaying 7 results from an estimated 7 matches for "spatialpolygondatafram".

2011 Aug 22
1
looping with paste
Dear list, I have a spacialPolygonDataFrame where variables were unnecessarily imported as factors. So I am trying to unfactor variables from spatialPolygonDataFrame at data with a loop for (i in (1:length(names( spatialPolygonDataFrame)))){ command<-paste("spatialPolygonDataFrame$names(spatialPolygonDataFrame at data[",i,"])<-as.character( spatialPolygonDataFrame$names( spatialPolygonDataFrame at data[",i,"])") comma...
2007 Sep 20
2
Superimposing vector polygons over raster grid in a plot
Hello: I would like to superimpose vector polygons (state outlines) from a Shape file on top of a satellite image, imported into a SpatialGridDataFrame from GEOTIFF via gdal_translate and readGDAL. When I plot polygon and point shape files in R, into SpatialPointDataFrame and SpatialPolygonDataFrame, the two feature sets line up geographically, so it seems logical that a SpatialGridDataFrame should behave in the same way. From my initial research, the spplot function is the correct function for plotting grids/images with axes and annotation. The big question is, how do I incorporate a Sp...
2017 Oct 11
1
Iterate in a Spatial Polygon Dataframe in R?
Hi all, ?I'm trying to iterate in a SpatialPolygonDataFrame thatcontains 110 features. I tried to use the following code? iterate.spdf =function(x){ for (i in 1:nrow(x)){ p = x[i, ]} return(p)} but with no success as it returns with aSpatialPolygonDataFrame that contains onlyone feature. The code seems to overwrite the polygons to end up with only onefeatu...
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 SpatialPolygon...
2014 Oct 08
2
Pregunta sobre manipulación de shapefile
Oscar, al final no he podido esperar hasta mañana Con: library(maptools)library(sp) poligonos <- readShapeLines("C:\\...\\DATOS\\MUNICIPIO.shp") sink("C:\\ ... \\DATOS\\MUNICIPIO.csv") coordinates(poligonos) Consigo un fichero con la suficiente estructura para tratarlo fácilmente y de una tacada montar la tabla .csv tal y como he indicado en un correo anterior Necesito el
2008 Oct 07
2
masking a regular lat/lon grid to extract map boundaries
Dear R-helpers, I have lat/lon coordinates of regularly spaced grid points, about 4Km apart, covering the entire US continental region. I would like to mask this rectangular grid in order to extract all and only the grid points within a specific region. Today I want to extract Montana, say, from this grid, and I am hoping to somehow use the returned value of the function
2012 Jan 18
4
R-Help
I am trying to create a frequency distribution and I am a bit confused. Here are the commands I have entered: > data <- read.csv(file="40609_sortedfinal.csv",head=TRUE,sep=",") > NumberOfActionsByStatus = data$STATUS > NumberOfActionsByUser = data$ETS_LOGIN > NumberOfBidOffer = data$BID_OFFER > NumberOfActionsByUser.freq = table(NumberOfActionsByUser) >