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.

Filter by
Sorted by
Tagged with
1
vote
1answer
31 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 <- ...
0
votes
0answers
36 views

Interpolating surface as though bare earth DEM after using Extract by Mask in ArcMap

I have some stone wall features that I need to determine the height of in ArcGIS Desktop. I have extracted the features out of the DEM by using the extract by mask tool. Now I need a method for ...
1
vote
0answers
35 views

Alternative to Rasterio Mask module for clipping a raster using masked geojson

I am clipping a raster (.tif file) using a mask vector (.geojson) file. with rasterio.open(url) as src: out_image, out_transform = rasterio.mask.mask(src, shapes, crop=True) But, this ...
2
votes
1answer
54 views

Extract images from GeoTIFF file using shapefile

I would like to know if there is any way that I can extract images from a GeoTIFF file using a shapefile which contains shapely polygon data for specific locations in the image in Python. I would like ...
2
votes
0answers
61 views

Is there a way to create a DEM that follow the point cloud so you don't need to clip the DEM after?

I would like to create a DEM from an XYZ file (gridded 0,25x0,25) with 0,25 cell. I'm wondering if there is a way so that my interpolation follows my point cloud, instead of covering a rectangle like ...
0
votes
0answers
17 views

Masked array fill value getting changed

I am using the following code to mask the clouds from Landsat image using QA band. I am facing the strange issue as you can see I have 2 print statements in my code which prints the fill_value of ...
0
votes
2answers
75 views

Mask raster function in R not working to extract values in one raster based on conditions in another

require: raster package I am having trouble masking values of one raster using values in another. This is similar to this question: https://stackoverflow.com/questions/51716315/how-to-subset-...
0
votes
0answers
23 views

Masking Landsat-8 and Modis (Aqua) with same shape file doesn't result in same shape

I was trying to mask Landsat-8 and Modis (Aqua image). FYI, I have converted the MODIS image to the same projection as Landsat and same resolution as 30m. Finally once i am done with masking using ...
1
vote
1answer
34 views

Is there an alternative function which does the same thing as clip raster by masked layer on QGIS?

I am having some technical problems with the clip raster by masked layer and I faintly remember using a different method a long time ago for a similar problem. Anybody familiar with another function?
1
vote
1answer
55 views

Mask with ring polygon in R?

I'm trying to mask a raster with a ring polygon using the function raster::mask, but only recognizes the outer edges of the polygon, can anyone help me with this? I only need the pixels within the ...
0
votes
1answer
64 views

Count number of pixels from .msk in Python to derive study area size

Apologies I am totally new to GIS in Python. I am trying to find out the total area of the Barents Sea mask the NSIDC use to calculate their products and therefore I need to know how many pixels the ...
1
vote
1answer
65 views

How to mask a raster layer to only include specific values in QGIS?

I'm attempting to reduce a raster layer, wherein each point represents night-time luminosity/intensity of city lights, to include only those pixels with values in the top 10% of values. Effectively, I'...
2
votes
1answer
60 views

Select area from raster layer as a new layer

In qgis 3.4.6, I tried to select an area from a raster map, to use the cropped area as a new layer or export the cropped area as a geotiff. I'm trying to use "Raster/Extraction/Clip Raster by Extent",...
0
votes
0answers
283 views

QGIS 3.6--Error— Creation of data source failed: unable to open database file

I have been working on 3 predators' data layer files. I created a vector point shapefile for each predator prior to do a heatmap (GeoTIFF file) for each data layer file. In order to extract 50% of ...
0
votes
1answer
15 views

Additional mask files

I used the tool "Extract by Mask" to clip a raster. It resulted in 5 tif images: mask, maskc1, maskc2, maskc3, and maskc4. What are the maskc1-4 files? They're large and I'd like to delete them if ...
0
votes
1answer
158 views

Clip bathymetry raster file from vector mask layer its not working in QGIS 3.4.3

I'm trying to extract bathymetry of Mediterranean Sea raster GeoTIFF file (downloaded from https://www.bodc.ac.uk/data/hosted_data_systems/gebco_gridded_bathymetry_data/gebco_30_second_grid/) from ...
1
vote
1answer
56 views

Extract By Mask - Raster Horizontal Shift

Is there a way to snap a raster/DEM to a mosaic dataset? I am using the Extract By Mask tool in ArcPro on a mosaic dataset. The output raster's cell values do not match the original mosaic dataset it ...
1
vote
1answer
176 views

Reprojection of satellite images mosaic to CRS with latitude and longitudes

I downloaded MODIS product MOD13A1 for India. Then mosaiced the granules in GeoTIFF format using rasterio Python library. I have the appropriate shapefile to mask the mosaiced raster. After mosaicing ...
1
vote
2answers
430 views

Extract by Mask tool not clipping to mask extent?

I am using ArcMap 10.4.1. I am using the Extract by Mask tool to clip a raster using a polygon shapefile. When the tool finishes running, the output raster does not fill the entire mask extent (see ...
1
vote
1answer
85 views

QGIS Mask - Error Code

I am trying to interpolate points and then clip the interpolation with a Raster> Extraction> Clipper. I receive an error code after trying to mask over the region I am interested in. Would you ...
0
votes
1answer
43 views

Does ArcGIS Desktop have similar tool to QGIS Clip raster by Mask layer which creates and outputs alpha band on request?

This QGIS tool creates an alpha band by clipping an image with a polygon. https://docs.qgis.org/2.8/en/docs/user_manual/processing_algs/gdalogr/gdal_extraction/cliprasterbymasklayer.html Is there an ...
1
vote
0answers
144 views

Clip raster by mask layer gdalwarp error in QGIS

I've been trying to find why my gdalwarp isn't allowing me to clip a raster to the shape of a shapefile. GDAL command: gdalwarp -ot Byte -of GTiff -cutline /Users/johnmorris/Desktop/Geodata/...
1
vote
1answer
746 views

Google Earth Engine, how to distinguish between rivers/streams and ponds/lakes in a water mask

I am trying to pull out every lake and pond in a region of SW Alaska. I have successfully identified all water features using the following code: // study area var rect = ee.Geometry.Rectangle([-168, ...
1
vote
1answer
166 views

Clipping raster with shapefile and exporting each raster subset using ArcPy?

I want to clip a raster image using a shapefile with differents polygons (each polygon have its "FID_malla" value [FID_malla is large data type]) and save the subset rasters individually with "...
1
vote
0answers
184 views

Exporting NetCDF layers as individual rasters? [closed]

I have a NetCDF (CRU diurnal temperature data) for each year and month from 1901 to the 2016. I would like to export individual rasters for a selection of the year and month options. I would like ...
0
votes
0answers
33 views

Extraction by mask using a polygon changes the cell counts on each category?

I am attempting to use Extraction by Mask on a raster set (land use) to gather the cell counts of each category. The data is from a county level and the polygon I am using is a specific city within ...
1
vote
0answers
67 views

Different outputs from Clip_management and ExtractByMask

I have a question about clipping a part from a raster according to the extent of a polygon. Should Clip_management and ExtractByMask create the same results if I set the "NO_MAINTAIN_EXTENT" option ...
1
vote
1answer
133 views

Average of polygons within mask polygon

I have two shapefiles. One consists of squared grid cells and contains ... let's say precipitation data. The other one was downloaded from NaturalEarthData and contains country-internal administrative ...
1
vote
1answer
868 views

Error clipping raster files in QGIS?

I have a series of raster files I´d like to clip to the same extent. To do so I am using a shapefile as mask through the method (raster >extraction> clipper) but every time I do so I keep getting the ...
1
vote
1answer
75 views

How to clip specific cells from raster that aren't fully covered by mask?

I have two data layers of the same geographic area, one which has a much coarser resolution and the other that is a much finer resolution. As such, the first layer has some cells that do not overlay ...
1
vote
3answers
5k views

Iterate through features to use selection as input for ExtractByMask

I need to iterate through each of the features of a feature class successively to use each one as the mask to extract from a raster with the ExtractByMask tool. Basically I'm looking for the "Iterate ...
1
vote
3answers
841 views

Extract by mask

I have a netCDF file. After converting the file into a Raster layer, I extract it for my study area i.e Pakistan. After applying the extract by mask tool the extracted raster layer does not properly ...
1
vote
1answer
110 views

Extracting multiple shapefiles by mask

I have one shapefile which is divided into multiple villages (polygons). I can see the name of the villages from attribute table of the shapefile. For each village, I want to extract elevation from ...
1
vote
1answer
324 views

Cell size changing when cropping a raster

I am cropping a large raster with the extent of a smaller one. The printout for large: class : RasterLayer dimensions : 6327, 12697, 80333919 (nrow, ncol, ncell) resolution : 463.3127, 463....
6
votes
1answer
159 views

Extract By Mask gives different result (and WARNING 000622) in ArcPy than from tool dialog?

I'm using ArcMap 10.3.1 When I use the gp tool to extract by mask, I get the correct result with any area outside the mask set as NoData. When I do the same thing in a script, I end up with cells ...
0
votes
1answer
45 views

Extract Specific Raster Cells From Gridded Shapefile

I have a raster image with a corresponding shapefile grid in which I am looking to extract an individual piece of that image using a single grid of the entire shapefile. The gridded shapefile is ...
2
votes
1answer
459 views

Need to Extract by Mask on Features in a Feature Class

I have a polygon feature class of a country that has water basin polygons as individual features. I am trying iterate each feature and Extract by Mask using a set of rasters - for instance on Basin_ID ...
1
vote
1answer
270 views

Export raster with one band only using gdalwarp in extracting raster using shapefile via python script? QGIS 2.18

This code of mine is written to extract raster using a particular shapefile in PyQGIS: import subprocess, os, glob, gdal result_path = "/data/brent/bukidnon_hansen_data/result_path//" os.chdir("/data/...
0
votes
1answer
2k views

Extracting raster by mask outputs raster with extent beyond the mask layer's in QGIS

I'm trying to extract a section of a raster file that overlaps with a polygon shapefile in QGIS 2.18.3. When I run extract, I'm left with a large null value area as part of the extent of the output ...
1
vote
3answers
153 views

Error on Extract to Mask | ArcPy

I am attempting to run Extract by Mask through a loop using Search Cursor, where the Cursor is defined by the row "FID" in a table from a grid shapefile. The code is as follows: import arcpy, os ...
0
votes
1answer
504 views

How to clip mesh files with a mask, and calculate the (3D) area of triangles inside?

I have a georeferenced mesh produced by photogrammetry software such as Agisoft Photoscan. Within this mesh, I have some areas of interest, which I can define with 2D vector masks (on the x and y ...
1
vote
0answers
44 views

Extract raster data by feature attributes/elements

I have a DEM raster, and a shapefile consisting of ~20 lines of steepest descent, created from the "flow Path Tracing" tool in Arc Hydro. Though the lines are all in the same shapefile, I wish to ...
1
vote
4answers
96 views

Clip a shapefile, given a set of coodinates

I need to clip a shapefile, the same way one would use Extract by Polygon on a Raster to achieve a smaller subset of the shapefile. I have previously exployed Extract by Polygon on a Raster and used ...
5
votes
1answer
353 views

Displacement when clip raster by shapefile

I run a script to clip raster by shapefile. Even with layers own the same crs (epsg: 4674) the output raster be displaced. I didn't find out in my script what is caused the error. Here is my code: ""...
0
votes
1answer
49 views

Extract by Mask produces large box

I am using ArcGIS Pro 1.4. I have a shapefile with the boundaries of the countries in Sub-Saharan Africa which I am using as the mask. The raster is a land use data set. When I run Extract by Mask ...
5
votes
2answers
1k views

Mask pixel values in Raster image QGIS

I am looking at classifying an image to identify crop types. I am interested in masking out all other landcover classes except crop class in the band stack false colour composite image e.g. buildings,...
1
vote
0answers
54 views

Function “Extract by Mask” in batch mode - just one resulting layer

I would like to clip 25 raster layers with self-made polygon using "Extract by Mask" function. The problem is that I am still receiving just one processed layer, instead of 25 processed layers. ...
0
votes
1answer
1k views

Building Masks (0-1 binary image) out of ROIs in Envi Classic?

I have the following 701x551 image in Envi with the shown raster ROIs (By pressing pixelbutton of ROI Tooldialogue window, I've converted the ROIs into raster format but I have access to ROI vectors ...
2
votes
1answer
1k views

Clip raster by mask without change values

I am clipping raster by mask with python. My input raster owned Float32, however the output of clipping was Byte. I don't know why? I suspect that transformation of tif to numpy.array is changing ...
0
votes
0answers
177 views

Summing pixel values within polygon zone in ArcGIS Desktop? [duplicate]

My question is the same as Summing pixel values within polygon zone in QGIS? but I'm working with ArcGIS and not QGIS. I have a raster data set with values of type float. And a polygon ...