Category "raster"

clip raster by SpatialPolygonDataFrame

I have a raster, and want to only retain the sea part of the raster, and remove the land part or the raster. If my raster is "ras" and my SpatialpolygonDataFRam

How to calculate correlation(r) between two raster datasets in R?

I have two (NPP_BEGA and ENACT_BEGA) stacked raster dataset. They have the same spatial resolution, extent and dimension. I want to run and map the correlation(

Display a projected raster on a projected basemap in R/leaflet?

Is it possible to display a projected raster on a projected basemap in R/leaflet? The addRasterImage() functions says that the projection needs to be in EPSG:38

why ggplot and geom_tile create lines on the map?

Data: https://github.com/yuliaUU/data/blob/main/test.csv griddf <- read_csv("test.csv") create a map: world <- rnaturalearth::ne_countries(scale = "medi

Clipping a .tiff Raster into grids with Python

I have a large .tiff raster (at least 200x150), but I need a bunch of 32x32 .tiff files. Is there an easy way to cut up that .tiff in Python? I think the workfl

Clipping a .tiff Raster into grids with Python

I have a large .tiff raster (at least 200x150), but I need a bunch of 32x32 .tiff files. Is there an easy way to cut up that .tiff in Python? I think the workfl

How to use gdal.Wrap() to resample a raster with nan cell

I used gdal.Wrap() to resample from a high resolution to a lower. However, my raster has no value (nan). So, when I set resampleAlg, the larger grids with nan(s

Terra equivalent for raster::stack()?

Basically the title. I know you can read in a folder of rasters with rast() but I just want to stack two rasters that are read in separately. Thanks

How to create a mosaic from different shapefile in R?

I have 37 shapefiles with different names.Individually each of them represent a different part of a country. I would like to create a mosaic of my 37 shp to jus

Downscaling sentinel-2 bands to 10m using R language

I'm trying to calculate NDRE using sentinel-2 bands in R language. The formula for NDRE = (nir-re)/(nir+re)nir- Near InfraRed (Band8) re - RedEdge (Band5) My C

How to plot wind vectors on wind map

I have NAM wind models that I create map from but I am struggling to add average wind direction vectors. How do I convert the U and V vectors so they give avera

Changing values in a raster

I have a raster file (created in QGIS, from a vectorial file). I would like to know if it is possible, in R: 1) to change the values of the pixels? (I believ

The raster overlay function in R produces incorrect values for raster bricks

I'm trying to quantile match two RasterBricks. I am finding the percentile of value<=250 in old_data, which we'll call p. Then I'm finding the value at the p

Mapbox studio - png labels layer - transparency showing up as black

I have created some custom styles in mapbox studio. They are essentially just the mapbox outdoors style and the mabpox satellite style, each customized, separa

GeoDataFrame is Inverted when I converted from Raster to Vector using RasterIO

I'm currently using this code to convert a raster file to a geodataframe: import rasterio from rasterio.features import shapes mask = None with rasterio.open