Questions tagged [extract-by-mask]
Isolating particular cells to a new raster based on overlap with another raster or vector layer, or specified values/ranges.
141
questions
0
votes
0
answers
35
views
+50
Exporting four band TIFF for transparency (alpha channel) using ArcMap
I am using ArcMap 10.8. I try to add a fourth band with my TIFF to extract it by mask and NOT have a black box arroud with NoData values. In the end I need a four band PNG with transparency layer. ...
0
votes
1
answer
40
views
What exactly is mask band according to GDAL? [closed]
The GDAL documentation for the translate function says:
Select an input band to create an output dataset mask band. But what exactly is a mask band?
band can be set to "none" to avoid ...
0
votes
1
answer
17
views
Clipping a raster via mask on runtime before uploading into GeoServer
I have point data which is being interpolated and a raster is generated. The raster is a rectangular grid and I need the raster of Pakistan only. I'm using shapefile of Pakistan to specify the bounds ...
1
vote
0
answers
30
views
ArcGIS Pro - ERROR 010167: Could not open workspace <undefined>
I'm trying to run the Extract by Mask tool in ArcGIS Pro 3.1.2 to extract areas of a raster overlain by a polygon layer. I keep getting:
ERROR 010167: Could not open workspace .
I have tried ...
0
votes
0
answers
60
views
Clip raster by mask layer attempt gives ERROR 1: netCDF chunk fetch failed
When trying to clip raster by Mask layer I get the following error:
My input layer is a TIFF file, the mask layer a shapefile.
ERROR 1: netcdf error #-62 : NetCDF: One or more variable sizes violate ...
0
votes
0
answers
77
views
Cookie-cut out data from a NetCDF4 file using a shapefile in R
I have a netcdf4 file with precipitation data (365 days) that I want to cookie cut using a country shapefile.
I have tried reading the NetCDF4 file as a raster brick and then applying my shapefile as ...
0
votes
1
answer
435
views
Rasterio - Extract raster pixel values based on another raster's pixel values
I have two single band rasters, both with the same spatial resolution and CRS. A land cover raster (named clc), and another one, that is for a smaller area (named patch) and falls within the extent of ...
1
vote
0
answers
90
views
Invalid parameters in arcpy Extract by Mask
I get the following error when I try to extract by mask within a function in my script. When I run the same script separately outside of the function it runs fine. The output is just an intermediate ...
0
votes
1
answer
251
views
Extract By Mask Tool is changing my composite raster bands
I wanted to extract an area (as set by a polygon) from a composite band raster using the Extract by Mask tool. Once I've done it, I've changed the RGB symbology to the correct bands specified by ...
0
votes
0
answers
68
views
how to use a raster mask (Landsat Image) and find values from another raster (Sentinel) within the masked area with python
I have a Landsat image which I used to create a mask (NDVI>0.4 for example). The mask is a numpy array. Now using this masked array and Landsat geolocation, I want to find the sentinel values ...
0
votes
1
answer
2k
views
R terra::mask report error ‘Error: [mask] extents do not match’
I have a temperature tif, and I want to extract my study area.But it reports that extents do not match. I want to know how to fix it and why the extents do not match?
I think to_be_masked raster's ...
0
votes
0
answers
78
views
Getting blurred image after extracting AOI through shapefile from USGS data
I intended to generate DEM of required location using ArcGIS Pro. Using USGS Earth Explorer, I downloaded the SRTM DEM as a .tiff file for a huge block of area which consists my desired area in it.
...
1
vote
0
answers
377
views
Mask NetCDF file data with multiple variables from shapefile in Python
Most of the solutions to this I've seen online only work on 3-D time series data, but my NetCDF files has more than one variable.
It has a data variable named Albedo and I need to plot it using a ...
3
votes
3
answers
431
views
Extract multiple raster samples by input vector layer
I am working in QGIS 3.24.0. I am working on a project using the NLCD raster for the contiguous USA. I need to extract 208 circular buffers (10km radius) and have them each saved as a separate raster ...
1
vote
1
answer
581
views
Extract by polygon from a rioxarray's raster
I'm attempting to extract NBR mean value from MODIS data based on a set of polygons. The polygon set has overlapping everywhere (don't blame me, it's not my work nor my idea). The shapefile is ...
1
vote
0
answers
137
views
different extent after extract by mask
I have two rasters and a study area vector, they are all WGS84 CRS. When I use the vector to mask those rasters, the results showed different extents and rows and columns.
I tried 'extract by mask' in ...
1
vote
1
answer
1k
views
Using Identify in ArcGIS Pro
I am a fresh to GIS.
In ArcMap 10.3 I can use the Identify tool to check the same pixel in time series, but in ArcGIS Pro when I load several rasters, it can only identify one layer.
What can I do so ...
1
vote
1
answer
780
views
increasing 'extent' of small raster to be same size as large raster in R [closed]
I have a satellite image with dimensions (11418, 13790, 1). The resolution is 10m. I have two other rasters, which fall inside of my satellite image which are the same resolution and crs.
How would I ...
1
vote
1
answer
134
views
Clip a vector without losing geometries - QGIS 3.22
I experienced a lot of issues trying to keep only a German region from the vector I have of Europe. I've tried everything, using mask+clip with my shapefile of the German region, using "Select by ...
1
vote
0
answers
18
views
Actual area from polygons is either under- or overestimated when extracting raster values - any solutions?
I am trying to use ModelBuilder to iterate through sets of polygons to overlay on top of two rasters and extract the total area of each value from each raster, but am having issues with the estimated ...
1
vote
1
answer
1k
views
Mask raster with bounding box from a different CRS
My apologies if this question has been asked before; but I could not find my specific question answered elsewhere.
I define a bounding box with bounds (xmin,xmax, ymin, ymax) in a rotated lon/lat ...
2
votes
1
answer
1k
views
Cropping raster (rectangle) with shapefile (mask) in QGIS
My study area is in black, and in grey the shape of Portugal.
I am creating my study area. It corresponds to the coastal area of Portugal. I have a shapefile for Portugal. I want to crop a raster that ...
0
votes
0
answers
116
views
QGIS crashing when runing a loop to perfom select by location with PyQGIS
I have written a script to divide United States into a grid of 200 km, then in each grid will contain a certain number of mobile towers with (lat and long). The script must then select each grid and ...
2
votes
1
answer
205
views
Splitting georeferenced image with grid features help
I have a large orthomosaic image with a fishnet grid overlaid on top. I am trying to cut the image into the grid sized pieces and follow their FID. So far the best way to do this I've found is using ...
0
votes
0
answers
141
views
Extracting pixel values from dispersed pixels across various countries
I am trying to calculate extreme events of rainfall using ERA-5 Daily Data in Google Earth Engine through Python. I am trying to find pixels that had more rain than the 95th percentile of the previous ...
1
vote
2
answers
358
views
NoData values surrounding the masked raster (.tif) after using Extract by Mask (ArcMap)
I do have a NUTS-2 region shapefile as you can see below
and a raster (.tif) file that represents the soil erosion (tonnes per hectare per year) derived from the RUSLE2015 model.
What I want is to ...
3
votes
1
answer
925
views
Batch process the clipping of multiple rasters by a corresponding polygon layer (different for each layer)?
I'm trying to clip ~300 rasters from a time series by vector masks to extract only reliable pixels - the vector polygons are different per raster. The file names are corresponding eg. ...
1
vote
1
answer
385
views
Geting slope in Google Earth Engine of defined sets of points?
I have an reclassify a slope in the, and I have points(ee_kaski) with lat,lng . I want to extract value of the reclassify slope value where this points lies on it. I have tried this using Python API.
...
0
votes
1
answer
173
views
Errors generating an NDVI Timeseries for masked land cover classes using the Copernicus landcover 2019 Global product in Google Earth Engine
I have masked my landcover classes but I am unable to generate an ndvi time-series for these masked landcover classes. I am using the Copernicus 2019 land cover product and would like to start with ...
0
votes
1
answer
300
views
Multiple Selection and clip raster by mask in QGIS using PyQGIS
I am doing raster by mask on multiple polygons. Selection on the basis of "CONTCD='AFR'" is running fine. Second selection and looping to for mask is only showing all.
layer=QgsVectorLayer(&...
1
vote
1
answer
616
views
Masking out Copernicus 2019 100m global land cover classes and for an NDVI time-series analysis in Google Earth Engine
I am quite new to Google Earth Engine and Java scripting. I am delineating land cover data for an administrative area in Kenya (Samburu county) from the Copernicus Global Landcover 100m product. I've ...
2
votes
0
answers
174
views
Why does raster still have pixels around edge when clipped?
I am trying to clip a raster in ArcMap 10.6 (derived from 'make nedcdf raster') to the shape of the Ireland polygon and I keep getting back pixels around the edge:
I have tried 'Clip' in 'Data ...
0
votes
0
answers
122
views
Getting ERROR 010161 in geopackage using ArcMap
I am using ArcMap 10.7.1.
I'm trying to share a model via geopackage. The model works fine while open in my .mxd file and shares without any errors but when I open the newly saved geopackage I receive ...
0
votes
0
answers
36
views
ExtractByMask ignoring my set workspace, saving to Default.gdb instead
I am calculating NDVI and then want to mask it with a vector file. I set my workspace a gdb and the NDVI raster calculator function saves to my gdb but the extract by mask saves to the Default.gdb.
...
0
votes
0
answers
66
views
QGIS Invalid cutline polygon when cutting a raster with mask
I am working with QGIS 3.10, I should cut some rasters with a vectorial mask , but whenever I do it, it gives me error: 'Invalid cutline polygon' and the operation provides a raster with pixel values ...
1
vote
1
answer
2k
views
Using 'updateMask().not()' in Google Earth Engine
I am trying to mask out part of an image(tiff) with another image(tiff) using the 'updateMask' in google earth engine but I keep getting an empty output. The '.not()' is supposed to give the opposite ...
0
votes
0
answers
37
views
Input feature mask name with variable - error 865
I have 73 raster files, with 73 corresponding shapefiles. I have to extract each of these raster by their corresponding shapefiles. I tried to call the shapefile using %Name%, since it has the same ...
0
votes
2
answers
1k
views
Extract pixel values of dataset (NetCDF) based on shapefile in R
I want to extract certain pixel values from a raster stack/brick from one layer (there are two Layers stored in the data - RSS_TOP and RSS_SUB --> if possible I would take both, or separately as ...
2
votes
1
answer
3k
views
Naming raster layers in a rasterstack with the same name
I have a for loop where I loop layers from a rasterstack into a predict function, which requires the output of a model and two raster files, including one layer for the present ("rastFile") ...
-1
votes
1
answer
1k
views
GeoJSON to masks [closed]
I need to use the GeoJSON file and TIFF images to produce masks. Is there a Python program that takes GeoJSON file and TIFF image as input and produces masks?
1
vote
1
answer
741
views
Add "buffer" around mask (R, raster)?
I am working with a RasterStack, from which I only need the data for a certain region, defined in a SpatialPolygonsDataFrame. I used the following code which works well:
test.ex <- crop(dat.stack, ...
0
votes
1
answer
633
views
How to get the NDVI value and the coordinates of each pixel within a geometry? [closed]
I would like to know how to extract the NDVI values from a list of points and export them in a file in CSV format with the following structure: LAT / LONG / NDVI.
I managed to get to a certain point ...
2
votes
1
answer
2k
views
Error on Clip Raster By Mask Layer (QGIS)
Can not seem to figure out this problem when i am running Clip Raster by Mask Layer function:
>
INFO gdalwarp -of GTiff -cutline "C:/Users/user/Downloads/gis files/final 23.05.2020.shp" -cl "final ...
-2
votes
1
answer
775
views
Extract temperature data from NC file using GeoPandas polygon in Python 3 [closed]
I am trying to draw a polygon in the NC file and extract temperature value from this polygon using Python.
import rioxarray
import geopandas
from shapely.geometry import mapping
geodf = geopandas....
1
vote
1
answer
41
views
Extract proportion of raster by several rectangles
I have quite big raster and I 7 restangle polygons. What I need is to extract the raster so the result is 7 small TIFF tiles ideally using QGIS (possibly also ArcGIS but it's really slow here). Clip ...
6
votes
1
answer
15k
views
Masking NetCDF time series data from shapefile using Python
I have a 3-D time-series precipitation data (187 x 1800 x 3600), stored in a NetCDF file. I need to obtain the precipitation data for a shapefile.
import matplotlib.pyplot as plt
from netCDF4 import ...
4
votes
2
answers
487
views
Extract pixel values in raster stack using shp
I am using the following code to extract mean pixel values over an area represented by a polygon:
mean<-lapply(S2_stack, FUN=function (S2_stack) {data.frame(mean=extract(S2_stack, polygons2, fun=...
1
vote
0
answers
88
views
Extracting Climate classifications from raster using multiple polygon shapefiles
I have performed a cluster analysis on geographic locations (national and sub-national level) in Matlab. I have also written code to write the shapefiles for each of the locations in a cluster to it'...
1
vote
0
answers
43
views
Mask raster time series
I am quite new on spatial R. I would like to apply the land mask to monthly SST data from https://www.esrl.noaa.gov/psd/data/gridded/data.noaa.oisst.v2.highres.html.
I tried to use "mask" from the ...
2
votes
2
answers
2k
views
extract() while keeping polygon ID in output
im trying to extract the mean from a satellite imagery. The point is, that when Im using this code (simplified for this example):
> semana21 <- raster("Semana21.tif")
> poly <- ...