3
votes
1answer
51 views

How to overlay a county boundary on a raster file?

I want to overlay California county boundary top of raster layer. Here is is my code: data(coastsCoarse) data(countriesLow) library(gtools) library(maps) library(maptools) library(sp) # Raster ...
0
votes
0answers
20 views

Spatio-temporal Overlay

I have a SpatialPointsDataFrame that lists satellite-detected fires (firesutm), including location and date. I also have a SpatialPolygonsDataFrame with county boundaries (countyutm). I would like ...
3
votes
1answer
256 views

remove land area from marine region polygons

In my pursuit to merge multiple polygons for the purpose of calculating the surface area of marine species distributions, using shapefiles from Marineregions, I am now trying to remove potential land ...
3
votes
4answers
2k views

how to overlay a polygon over SpatialPointsDataFrame and preserving the SPDF data?

I have a SpatialPointsDataFrame with some additional data. I would like to extract those points inside a polygon and at the same time, preserve SPDF object and its corresponding data. So far I've ...
1
vote
2answers
271 views

Calc vs. Overlay for speeding up band math in R 'raster' package?

Regarding yesterday's question about how to speed up band math in the R 'raster' package, would it be the same to use overlay to calculate NDVI instead of calc? If that's not the case, what's the ...
3
votes
1answer
271 views

Find which grid cells contain a point

I have a dataframe with x,y coordinates. I've sampled 10 x,y coordinates from my dataframe: y <-c(24.637032,21.569813,21.687,19.677183,24.72438,21.433136,24.637032,22.21065,21.443762,25.273882) x ...
3
votes
2answers
728 views

Clip depth contour with spatial polygon

I need to somehow combine my Spatialpolygons with my depth contour, but not sure how do to so. Maybe create a SpatialPolygonsDataframe? This is what I've done so far: > class(subarea0) #This is ...
5
votes
1answer
1k views

How to rasterize SpatialPolygons in R?

I'm trying to extract the bathymetry values of my area of interest from a world bathymetry raster layer using the 'rasterize' function in the {sp} package. *Edits: I found the 'extract' function ...
3
votes
2answers
3k views

How to overlay map layers (shp and csv) in R?

This is a crosspost from stackoverflow. I know very little about GIS software and am doing all my mapping in R. Apologies in advance if this is too basic question. Let's say I have two shapefiles from ...