3,788 questions
Advice
1
vote
2
replies
102
views
Generating Random Polygons in R
I need help coming up with a spatial workflow in R, or to be pointed in the direction of a package or something, I have no idea where to start with this.
I have a raster called "Suit" (epsg:...
0
votes
1
answer
49
views
Filter mosaic dataset by date with arcpy
I am currently trying to create a python toolbox (atbx) in ArcGIS Pro (3.5) to compute a profile of mosaic dataset values. The tool takes a mosaic dataset and a line feature as inputs. The output is a ...
0
votes
1
answer
61
views
High RAM usage when using Datashader with dasked xarray
I have a dasked xarray which is about 150k x 90k with chunk size of 8192 x 8192. I am working on a Window virtual machine which has 100gb RAM and 16 cores.
I want to plot it using the Datashader ...
0
votes
2
answers
141
views
Why are the results from rast() vs raster() different?
I am updating a R script as I am migrating to a new machine and new install of R.
Below is my existing R script.
TiffFile is this file I downloaded from NWS.
RnFileRaster <- raster(TiffFile)
#...
1
vote
0
answers
78
views
Misalignment between a raster overlay and DEM in rayshader 3D maps
I am using the rayshader package to create a 3D terrain visualization of a certain area. My R code is as follows:
# ─────────────────────────────────────────────────────────
# 1. Setup
# ──────────────...
2
votes
3
answers
96
views
Adding raster bricks based on their respective dates in R terra
I need to average two raster stacks which containing daily temperature data shifted by 2 days.
First stack times: "2020-05-01 00:00:00 UTC", "2020-05-02 00:00:00 UTC", "2020-...
0
votes
0
answers
36
views
Ghostscript renders C100M100Y100K100 as raster, instead of full 100% black for all separations with tiffsep1 conversion
When I am trying to obtain TIFF separations using tiffsep1, and when I try a pdf that contains vector images that are C100M100Y100K100, they are rendered as raster, having small white dots in ...
1
vote
0
answers
28
views
NoData areas in GeoPackage raster appear black instead of transparent in ArcGIS SDK for Android Kotlin
ArcGIS Maps SDK for Kotlin version 200.3
I'm having an issue when rendering two GeoPackage raster files from local storage. My goal is to overlay one raster on top of another, but the NoData areas are ...
0
votes
1
answer
146
views
Spectral interpolation of Sentinel-2 in r
I have sentinel-2 data of few months. I am trying to interpolate sentinel-2 image using values from nearest dated image. The problem is that the code is quite inconsitent. It sometime replace the ...
1
vote
1
answer
126
views
Converting a simple feature object into spatraster using terra package
For example:
sf_object <- st_as_sf(df, coords = c("longitude", "latitude"), crs = 4326)
then conversion into a raster object:
Ras_object <- terra::rast(sf_object)
I get the ...
1
vote
2
answers
130
views
Raster not visible in leaflet even though it is visible using plot()
I tried to add a raster file (stored in r_max) to my map.
r_max is a RasterLayer with values from about 0 to 5:
class : RasterLayer
dimensions : 180, 360, 64800 (nrow, ncol, ncell)
resolution : ...
0
votes
0
answers
56
views
Overlay a raster image with the component scattermap (plotly) in streamlit
Type With a streamlit application, I try to add a georeferenced raster image in the scattermap graph. a fixed image appears on the top left of the map, the image seems not well georeferenced, and does ...
2
votes
1
answer
95
views
Separating grouped layers in a raster stack in terra
I have a large raster stack that is a bunch of groups stacked together. The only thing differentiating the groups is the layer name, which consistently starts with the same prefix. I'd like to ...
0
votes
0
answers
39
views
Convert raster map to mbtiles format
I'm working on a mobile app that has to display a small portion of map that I downloaded from the OSM server. It's a very small portion of map (approximately 2/3 mb), and I downloaded it in raster ...
1
vote
1
answer
106
views
Preserving original categories when using terra::focal
I am using the terra::focal function to fill missing data in a categorical raster. The problem is that the result of the focal function gives a raster with numerical values. I would really like to ...
0
votes
1
answer
186
views
Using terra in R to calculate & map (dis)similarity and uniqueness across cells of a large GDM-based raster
I am looking to employ terra to update an analytical workflow (from Mokany et al 2022; Glob Ecol and Biogeo) originally written in R with the raster package. The workflow involves spatial analyses of ...
3
votes
2
answers
86
views
Extent is rewritten for separate SpatRaster when modifying extent using terra in R
This is truly bizarre behavior I can't explain.
library(terra)
r1 = rast(nrow = 2, ncol = 2)
values(r1) = c(0, 1, 2, 3)
r2 = r1
ext(r2) = ext(r2)/2
ext(r2)
ext(r1)
What you see is that the extent of ...
2
votes
1
answer
69
views
Conditionally subsetting raster layers using index based on another raster
Is it possible to conditionally subset (and summarize) a raster using another raster as an index?
I have a set of rasters that show monthly data across a number of years. For each point, I need to get ...
0
votes
1
answer
603
views
Resampling Raster in Terra: Just resample, or aggregate before resampling?
I'm working with two rasters, both the same projection, but one is at a 4x higher resolution and with a different origin. I need to resample the high resolution raster to match the resolution of the ...
0
votes
1
answer
369
views
Employing `terra::` to avoid std::bad_alloc error when extracting values from large SpatRaster stack
Looking to employ terra:: to extract values from a large raster stack, and bypass the memory errors I'm getting via other means.
The published code (Mokany et al. 2022) I'm using was developed with ...
3
votes
2
answers
204
views
Merging diagonal-touching polygons from raster using terra
Consider the following binary raster, with patches in various shapes:
Using terra to get separate polygons for each patch, I converted to vector via as.polygons() and then disaggregated via disagg(). ...
0
votes
0
answers
43
views
Reprojecting Raster Tiles in BNG format on React Native Maps?
I am using template URL to display tiles from a third party API. That API for tile serves the tiles in 27700 format. React Native Maps Template URL expects it in 3857 or similar web mercator formats.
...
0
votes
0
answers
130
views
Terra::Extract- Largest value?
I am running into issues with proper data extraction using Terra. It appears to be obtaining the mean and I am not seeing an option to select the most frequent or largest coverage for a selected area.
...
1
vote
1
answer
307
views
How can I extract data from a GeoTIFF at specific x, y co-ordinates in C++
I am an R user but a novice in C++. I need a C++ workflow that returns the value of a GeoTiff at a specific (x, y) coordinate. The GeoTiff contains 1 layer. The layer is a 2-dimensional array. Each ...
0
votes
0
answers
52
views
Downloading satellite raster data using Earth engine lib in python
I'm using the following code to download satellite imagery for the given polygon. The script runs successfully, but I don't get the files downloaded in the drive. What could be the reason?
import ee
...