Questions tagged [r-sp]

An R package for spatial data. Questions on spatial data might be better asked on https://gis.stackexchange.com

691 questions
0
votes
1 answer

Find maximum point with in each polygon for a set of polygons R

I'm sure this question has been answered elsewhere, but I have not been able to come up with it by searching. I have points representing cities within a country along with population for each city. I also have a polygon file of counties. I want to…
Pete
  • 321
  • 4
  • 16
0
votes
0 answers

Incorrect values returned by sp::over function?

I'm extracting elevation data of a route from a Digital Elevation Model using my.elev <- over(new.points, mygrid) new.points is a SpatialPoints object, with the coordinates (long/lat) of about 7000 points transformed in the CRS of mygrid mygrid is…
mbranco
  • 101
  • 2
  • 8
0
votes
0 answers

Create a list of Spatial Polygons based on a list of shapefiles

I have a list of Shapefiles list_shp_Tanzania with 61 shapefiles and each shapefiles contains several polygons. I want to create a Spatial Polygons list out of this shapefile list. Here is the structure of a polygon in a shapefile. .. .. ..$…
Simon Besnard
  • 377
  • 1
  • 6
  • 18
0
votes
1 answer

R - values above the scale

I'm plotting a rain map for a region. My problem is that when a temperature is above the established scale, some white points are plotted. function: spplot( datavalue, main = list(label=main,cex=0.9), sp.layout =…
perondi
  • 165
  • 1
  • 3
  • 8
0
votes
1 answer

Using sp (spatial package) from my own package results in error: could not find function

I'm developing my first package - well, actually I'm packaging some existing code - in RStudio. I've marked up all the comments with roxygen2 and this has generated a correct NAMESPACE file which…
Michael Henry
  • 599
  • 2
  • 4
  • 17
-1
votes
1 answer

Extracting max pixel value inside polygons in R

I have been using extract(raster,polygons,na.rm=TRUE, fun=max) This generates pixel values from the pixel with max area inside polygons, i would like to extract the values from the pixel with max raster value inside each polygon, any suggestions?
MANY
  • 1
  • 2
-1
votes
2 answers

Ignore rows while creating SpatialPointDataFrame where a single pixel value of any raster layer of rasterstack is NA

I have three rasters e.g. r1,r2,r3. I want to create a Spatial Point DataFrame from these rasters using rasterToPoints(). But the issue is, i want to ignore any row that contains at least one NA during the execution of…
BetterCallMe
  • 636
  • 7
  • 15
-1
votes
2 answers

Dissolve Overlapping Polygons using difference and union in R

Have the shape file which has multiple polygons with logical division of Zones and Plots. Plots are overlapping over Zones. The task is to dissolve / merge plots with Zones with no overlapping. Here is spplot of the shape file. Here plots are on…
string
  • 787
  • 10
  • 39
-1
votes
1 answer

How to convert data.frame to SpatialPixelsDataFrame in R

I have a dataset tagged with latitude (y) and longitude (y). x y pH EC RSC SAR 644602.7184 3295635.709 7.82 1.069 6.8 2.612316328 644219.281 3293883.389 7.45 2.27 6 2.40812669 644368.6088 3295296.452…
UseR10085
  • 7,120
  • 3
  • 24
  • 54
-2
votes
1 answer

Downside to Sphinx index_sp?

I need to enable the index_sp (sentence and paragraph indexing feature) of Sphinx so I can perform 'Word1 SENTENCE Word2' searches i.e. ones in which two words exist in the same sentence as it is currently not working and as per the documentation…
user3649739
  • 1,829
  • 2
  • 18
  • 28
-2
votes
1 answer

Identifying maximum/minimum coordinates of polygon/owin edge [R]

I am working with a polygon, and would like to identify the outermost point of the polygon (in my case it is in owin (spatstat) format but can be converted to any of the spatial formats. For example here is my polygon: How would I go about…
-2
votes
2 answers

Turn extraction list to csv file

I have uploaded a raster file and polyline shapefile into R and use the extract function to to extract the data from every pixel along the polyline. How do I turn the list output by extract into a CSV file?
Selena Chavez
  • 139
  • 2
  • 10
-3
votes
1 answer

Converting latitude and longitude to coordindates

I manually entered latitude and longitude in my dataset in csv format and imported the dataset to R. I am trying convert the variable lat and lng into coordinates so that I can use tmap or geom_sf to plot it as a map in R. But I am not able to do…
-3
votes
1 answer

I need help mapping in R coding

Here is my R code to plot the RR: # Display posterior means of RR(relative risks) va$RRmean <- end4$summary.fitted.values[, 1] library(classInt) breaks.qt2 <-classIntervals(va$RRmean, n=7, style="quantile",…
-3
votes
1 answer

How can I check if sp package (R software) is installed on my Linux and how can I install it?

I have installed R on my Linux machine. Whenever I type > library(ps) I get Error in library(ps) : there is no package called ‘ps’ How can I check if sp package (R software) is installed on my Linux and how can I install it?
Mohd
  • 1
  • 1
1 2 3
45
46