Questions tagged [spatial-data-frame]
50 questions
0
votes
1 answer
vertically integrate a datasheet with a over 1500 columns
I have a data sheet with about 1700 columns and 100 rows of data w/ a unique identifier. It is survey data and every employee of an organization answer the same 9 questions but its compiled into one row of data for every organization. Is there a…
![](../../users/profiles/11065474.webp)
KadoJ
- 31
- 7
0
votes
1 answer
Unknown CRS in QGIS when projecting to EPSG:25833 in R
I want to project a spatial data frame to EPSG 25833 in R but QGIS does not seem to know it (for reproducibility, I use the code jazzurro created in his/her answer to this question with minor changes)
library(rgdal)
mydf <- structure(list(longitude…
![](../../users/profiles/9370570.webp)
Lutz
- 223
- 4
- 11
0
votes
1 answer
Remove rows contains certain value from spatial dataframe - solved
I want to remove the rows that have certain values from the spatial data.frame since the standard R grep() seems not propagate through all slots of an sp class object.
bd@data[- grep("xcluded", bd@data$Notes),]
It gives me an error:
Error: trying…
![](../../users/profiles/12335080.webp)
polaris
- 13
- 3
0
votes
1 answer
polygons' ID different from @data ID in a spatialpolygonsdataframe
I loaded a shapefile in R using readOGR and I named as data.map
I can see the shape pretty well by using
plot(data.map)
The issue is that polygons' ID (the ID of the plot) is not the same with the @data ID.
What I mean is that, when I…
![](../../users/profiles/1869232.webp)
Stathis G.
- 93
- 1
- 9
0
votes
0 answers
Converting formal class rasterlayer to spatialgriddataframe
hopefully someone can help me.
I've got some slope data in the form of a formal class RasterLayerand by using the command as(slope, 'spatialGridDataFrame'), I've managed to convert it to a large spatialgriddataframe. However when I look at the data…
![](../../users/profiles/9445598.webp)
Hazzy-g
- 1
- 2
0
votes
2 answers
Calculating area from Large spatialPixelsDataFrame
I have an object called cr1 which is a large SpatialPixelsDataFrame of a lake.
Here is a link to the file:
https://www.dropbox.com/s/uuvlmxmri144hp2/macrosmall.rdata?dl=0
I think each pixel has has a 1m x 1m cell size, however i think this attribute…
![](../../users/profiles/9714587.webp)
Itsa Me
- 23
- 3
0
votes
1 answer
Is there a way to write a function in R that writes a dataframe like in this script?
I wrote a script in R which reads a csv file to a dataframe, then manipulates that dataframe to create a new one. The current script is as follows:
#read in the csv file for a node
node00D = read.csv("00D.csv")
#create a new data frame with the…
0
votes
0 answers
How to define an area at +- 1 along a road?
Considering a geographical line defined by the following spatiallinedataframe
library(sp)
library(rgeos)
## from the sp vignette:
l1 <- cbind(c(1, 2, 3), c(3, 2, 2))
Sl1 <- Line(l1)
S1 <- Lines(list(Sl1), ID = "a")
Sl <- SpatialLines(list(S1))
##…
![](../../users/profiles/2637604.webp)
Xavier Prudent
- 1,231
- 1
- 18
- 41
0
votes
0 answers
Pandas DataFrame out of range
I am using Pandas DataFrame package of Python to store large set of data. But my DataFrame could hold only 30860 data. I tried DataFrame concatenation to store more data but it did not work.
Can anyone suggest me a better technique to store large…
![](../../users/profiles/6895869.webp)
Nehal Kalita
- 21
- 1
0
votes
0 answers
How to identify the common coordinates in two different SpatialPixelDataFrames
I have two SpatialPixelDataFrames (a and b) which have few common coordinates/locations. I need to identify these common coordinates and remove them from both the dataframes.
Though I have been able to identify and separate common coordinate points…
![](../../users/profiles/7571575.webp)
Saubhagya
- 41
- 1
- 4
0
votes
0 answers
color-coding data of SpatialPolygonsDataFrame by ranges
I have a SpatialPolygonsDataFrame object (polUTM) that contains values at each lat/lon location. I want to color-code on a plot the values per a color scheme. Here is my object and code so far:
polUTM is...
class : SpatialPolygonsDataFrame…
![](../../users/profiles/4241150.webp)
Benjamin Levy
- 153
- 5
- 15
0
votes
0 answers
Nearest line to points using R
I'm trying to do some GIS work using R. Specifically, I have a spatialpointsdataframe (called 'points') and a spatiallinesdataframe (called 'lines). I want to know the closest line to each point. I do this:
# make a new field to hold the line…
![](../../users/profiles/2299245.webp)
TheRealJimShady
- 455
- 1
- 7
- 18
0
votes
1 answer
Convert a list in a dataframe to a lines
I have a dataframe (test) in R. Inside one of the columns contains coordinates in this list structure:
> dput(test$coordinates)
list(structure(list(x = c(-1.294832, -1.294883, -1.294262,
-1.249478), y = c(54.61024, 54.61008, 54.610016,…
![](../../users/profiles/1047496.webp)
falcs
- 435
- 1
- 7
- 19
0
votes
2 answers
Convert data frame to spatial lines data frame in R with x,y x,y coordintates
I have a data frame in R, one of the columns contains the coordinates for points along a line in the form:
x,y x,y x,y x,y
So the whole data frame looks like
id dist speed coord
1 45 6 1.294832,54.610240 -1.294883,54.610080…
![](../../users/profiles/1047496.webp)
falcs
- 435
- 1
- 7
- 19
0
votes
2 answers
Loop to assign new values to multiple spatial dataframes
I am working in RStudio (V 0.99.467) running R (V3.2.2) on Windows10. I have a collection of vector maps from ArcGIS that I read into R with a loop using rgdal to create objects of class 'SpatialPolygonsDataFrame'.
There are several data QAQC…
![](../../users/profiles/5393591.webp)
CrashDrew
- 1
- 2