Questions tagged [masking]

Covering or hiding features on a map.

Filter by
Sorted by
Tagged with
1
vote
1answer
261 views

QGIS: Clip Raster by Mask Layer-permanently remove black edges

I want to introduce geotiff images generated in QGIS by clipping ortho imagery to a shapefile into matlab. However, the clipped raster images come with black borders. I managed to remove them in QGIS (...
0
votes
0answers
10 views

How to get pixel positions when cropping a raster with rasterio? (Faster)

I am trying to crop a raster but instead of just getting the values of the cropped raster I am trying to get the positions of that values on the matrix. I already did this with this code: import ...
-1
votes
0answers
6 views

ArcScan not working even with all prerequisites. Can't use raster celanup

I am creating a mask with the NIR band from Landsat8. The image is a raster in 32 bits and has 2 classes of values. . I need to use the Brush tool from the Raster Cleanup to manually fill some high ...
0
votes
0answers
19 views

Cloud masking Rapid Eye images

I am trying to delete clouds (ideally also their shadows) from Rapid Eye images (5 bands; blue, green, red, red edge, near-infrared). I have tried to set a threshold for the red band and mask ...
0
votes
1answer
35 views

How do I make/edit a land sea mask in NetCDF format?

I have a land-sea mask.nc file where land=1 and sea=0. I want to mask this global LSM to my study area so that the study area=1, and rest=0. I have the study area shapefile and the LSM NC file. How ...
0
votes
0answers
10 views

Filtering an image by regional mask

How could I filter an image by an user defined mask on a user defined area? Here an example: # select area crs = 'SR-ORG:6974' scale = 926.625433056 area_extent = (294666.8877, 5639442.3861, 314126....
0
votes
1answer
19 views

Why it doesn't mask the complete layer?

Through the code I need to calculate the number of pixels of a layer composed by three classes (severe, medium and low), but the code just take into account the medium and low classes. https://code....
2
votes
1answer
40 views

How to include pixels excluded by MASK in GRASS GIS?

I have a 150km x 150km raster layer of elevation. I'm running a cell-by-cell PyGRASS script, with one step that considers all neighboring cells within a fairly large circular radius (25km). To account ...
1
vote
1answer
26 views

Mask out pixels smaller than 1ha in Google Earth Engine

I am new here so please forgive any mistakes in this post: I have a simple script to classify cultivated area vs none cultivated areas using Sentinel-2 in GEE. I want to mask out all objects that are ...
0
votes
1answer
70 views

Aligning pixels for using GSW as mask layer with Landsat 8 and Global Surface Water (JRC) Layer

I want to isolate some surface water areas on Landsat 8 images by using the Global Surface Water dataset in GEE as mask. After mapping both in the Editor I realized the positions of pixels of GSW and ...
-1
votes
0answers
34 views

Extracting only a given part of a dataset using an Image

I am new to this field, and do only want to use it just to extract some data I need for a very specific operation. I am using google earth engine and have uploaded a shape file to mark a certain area ...
0
votes
1answer
27 views

ENVI fmask Error for Landsat 5 data

I'm trying to mask cloud cover of multi-spectral Landsat 5 image containing bands 1-7 that have been preprocessed using dark object subtraction and Landsat calibration. I am using the fmask tool in ...
1
vote
0answers
25 views

Cloud Shadow interferring with NDWI Analysis

I'm working on surface water identification in Northern Kenya. I'm using Landsat 5TM and Landsat 8OLI data in ENVI 5. I've masked clouds using the QA band (although have also tried the fmask tool- ...
0
votes
0answers
23 views

Adding two rasters results in negative infinity and positive infinity

I'm trying to create a hydro-flattened DEM according to USGS specifications. I have two rasters, a DEM of my study area and a raster that only contains the water bodies that I have flattened so the ...
0
votes
1answer
28 views

Semi-Automatic Classification plugin: Cloud Masking errror

I'm doing Tutorial 2 out of the manual for this plugin as a GIS course lab exercise and I'm hitting an error when attempting to run the cloud masking function. I'm using 3 bandsets of Sentinel-2 data ...
-1
votes
1answer
17 views

Masking non-NDVI feastures such as clouds, water and infrastructures

I would like to calculate the NDVI value for my study area, however there is cloud cover which makes it unable to calculate the NDVI. How do I mask all the non-ndvi features such as water, ...
0
votes
1answer
25 views

Give non-overlapping parts of 2 rasters a value 0 (QGIS)

Is there a way in QGIS to give non-overlapping parts of 2 rasters a value of 0 in the new raster file? I would like the data gaps in the velocity file (so where Ice mask is displayed on the chart) ...
0
votes
1answer
439 views

Apply a mask to multiple images(for same geo location) in a image collection

I have a image collection which holds multiple images of the same area. I can apply mask individually to those images but how do I apply a mask to all the images in the collection. Say the mask i have ...
0
votes
1answer
37 views

Masking out pixels from the Sentinel 1 image in Google Earth Engine

I am trying to classify paddy areas from time-series(in this case, four-date) Sentinel 1 image in both VH and VV polarization. Hence prior to classification, I need to mask out land covers such as ...
0
votes
1answer
23 views

Count number of pixels in range of values in GEE

I have raster with NDVI values and I would like to use reducer in order to know how many pixels in the raster are smaller than 0.2, between 0.2-0.4 , betwen 0.4-0.6 and gt than 0.6. i'm not sure that ...
1
vote
1answer
31 views

QGIS - extract xyz of max raster values in mask vector layer

I have a bathymetric raster from which I want to extract the max depth value within a mask (vector) layer. The vector layer has 252 circular polygons The end result must have x, y and depth attributes ...
1
vote
0answers
27 views

Clipping raster image using mask layer is not clipping in correct way

I am using QGIS 3.10 when tried to clip raster with mask layer I got the same result of extent layer knowing that I activated option with extent boundary Link for shapefile and raster
1
vote
1answer
63 views

Exporting masked image?

In this script, I take an image and mask off everything below certain elevation. The result looks really interesting as one can still see the names of the towns and roads where the image is masked ...
2
votes
1answer
319 views

Google Earth Engine: Masking land out of Sentinel-3 imagery

I'm trying to isolate ocean cover from OLCI imagery using a bitmask from the quality_flags band. But it's masking all the pixels, and I notice when I mask the ocean and leave the land, the land is ...
2
votes
0answers
92 views

Clipping Raster by Mask using PyQGIS

I'm trying to develop code that is capable of cutting out a mosaic from the polygons of a shapefile using PyQGIS. The script is run but does not produce any results. from qgis.core import * from ...
1
vote
0answers
31 views

How to add different NDVI layers of Landsat 8 data from 2014 to 2019 to a map in Google Earth Engine?

I am trying to calculate NDVI for each month and masking NDVI images with lte(0) filter to identify water bodies and show the timelapse between encroachment area of waterbodies in different years and ...
1
vote
1answer
43 views

Removing tidal flat and coastline after applying Landsat Cloud Masking

I am a new Google Earth Engine user. I have tried to remove clouds and cloud shadows using pixel_qa band. However, sometimes the cloud masking makes tidal flat or coastline to remove. I don't know why ...
0
votes
1answer
28 views

Not plotting NA-Values in raster with python

I have a raster that I cropped beforehand based on a shapefile with gdalwarp -srcnodata '-1000 -255' -cutline {shape} {vrt_path} {tiff_path} The thing is, that there are many NAs that get simply ...
0
votes
0answers
35 views

Crop `vrt` by vector-geometry with gdal

Is it possible to crop a .vrtmosaic to a vector-geometry? I have a .vrt-file which is a mosaic of various sentinel2-scenes. For me it seems to be more efficient to already crop and mask (set ...
0
votes
1answer
232 views

ENVI 5.1 - ANN Classification - Background was classified into one of the class

I'm new to Remote Sensing and I'm having trouble in ENVI 5.1 where the background was classified as one of the classes in the ROI I used, which is not right. How can I exclude the background or at ...
2
votes
1answer
31 views

QGIS Raster Mask Layer?

I have a raster slope layer and a raster aspect layer. The slope layer is single band grey, that is black to white, with white as the steepest slope. The aspect layer is pseudo colour. I'd like to ...
14
votes
4answers
11k views

Using polygons to apply unique value to all raster cells within those polygons?

In ArcGIS 9.3, I have a raster file that I would like to "mask" with polygons, giving a single value to all the raster cells that overlap the polygons. How can I do this? Here's a screen shot, ...
-1
votes
1answer
155 views

Creating Cloud free images out of a MOD09A1 MODIS image in GEE?

How can I mask clouds in a MODIS\MOD09A1 images in GEE? I know I should do sth with the "Bitmask for QA", but how? var myImgCln = ee.ImageCollection("MODIS/006/MOD09A1") .filterMetadata(???
1
vote
1answer
176 views

Calculating water occurrence of Sentinel-1 images in Google Earth Engine

I would like to derive the occurrence of surface water bodies from Sentinel-1 image collection in the Google Earth Engine.In my example I could already compute the water mask using Otsu’s method for ...
2
votes
1answer
136 views

Get pixel values from a raster using a multipartpolygon

I'm trying to get the mean value of pixels from an NDVI raster, that intersect the geometry of a FeatureCollection, that is a multipart polygon which represents my sample area, but I can't find the ...
-1
votes
1answer
192 views

Shapely Polygon to numpy boolean mask [closed]

How can I convert my Shapely polygon to a numpy pixel array representing a boolean mask, with True for where the polygon is?
0
votes
1answer
21 views

Give a specific value to mask layer

I have code that creates 3 different layers using masking, each time other different pixels get mask and the others get 1 so the final result is 3 layers that are complemntary: My problem is that ...
0
votes
1answer
41 views

Masking edges of S1 composite in Google Earth Engine

From the following code I would like to mask the edges of my sentinel 1 composites. @Daniel provided the code. var roi = Map.getBounds(true) var startDate = ee.Date('2015-01-01') var endDate = ee....
1
vote
1answer
68 views

Creating a raster based on values of other rasters

I have three single band rasters, raster_a, raster_b and raster_c with pixel values 1 and 0. I am trying to burn the values of raster_a to raster_b and create a "new_raster_b" where if: raster_a == ...
0
votes
1answer
28 views

Check for NAs in `RasterLayer` and plot them in different colour

I know it's an easy question. But how can I find out whats the distribution of my NA-Values to non NA-Values? And how could I plot my raster normally and make the NA values appear in a different ...
0
votes
0answers
32 views

Low-pass filtering raster with a mask - matrix

I have to do low-pass filtering with a mask - matrix: 1 2 1 2 4 2 1 2 1 This is my code import arcpy import numpy as np arcpy.env.workspace = r"C:\Users\ASUS\Documents\ArcGIS\Default.gdb" raster = ...
1
vote
1answer
130 views

Create a new raster TIFF file which is masked based on the GeoJSON file

I was trying to mask the building given its TIFF file and GeoJSON file creating a new raster TIFF file. I don't know what is the problem, the result is all black, here is the code below: from osgeo ...
2
votes
0answers
65 views

Offset after clipping an image using rasterio.mask (illustrated with figures) [closed]

I want to clip an image named img_A of dimensions 14000x10000 using a polygon shape in order to get the same dimensions than another image named img_B of dimensions 1925x1372 (see figure 1 below). The ...
4
votes
2answers
2k views

Detecting cloud shadows

I am trying to detect cloud shadows in Landsat images. I came up with producing good shadows and cloud masks. Now I'd like to implement my cloud mask adding cloud shadows. Do You have a good idea to ...
7
votes
3answers
9k views

Turn a shapefile into a mask and calculate the mean?

I have been using Python to process huge arrays stored as NetCDF files. I would like to calculate the mean of an area defined by a shapefile. I have just installed GDAL but if there are other tools I ...
1
vote
0answers
24 views

Defining invalid regions of VRT file with rasterio in a way that allows windowing [closed]

I'm using a VRT file to represent a bunch of individual map tiles as one big image. I noticed that some of the data is invalid but not marked as such (via the invalid data value). I'd like to define ...
6
votes
2answers
331 views

Replace specific raster class by surrounding classes

I have a classified landcover raster which also contains the classes "clouds" (pixelvalue 5) and "shadows" (pixelvalue 10). I want to eliminate them by replacing these two classes by the majority of ...
2
votes
2answers
133 views

Cropping raster using multiple shapefiles

I have a raster which I want to crop multiple times using different shapefiles. My code uses mask method which returns numpy array and its metadata: out_img, out_transform = mask(raster=data, shapes=...
3
votes
1answer
153 views

Masking LiDAR points to create DEM in ArcGIS Pro with ArcPy?

I have an irregular LiDAR point cloud dataset, so when I try to create a DEM or DSM, the points are connected across the irregular edges of the LiDAR point cloud. I thought that creating a mask ...
0
votes
0answers
74 views

Exporting image of modeled data in Google Earth Engine results in too much mask

I am using harmonic regression in Google Earth Engine to model NDVI values for 2011. I would like to export the modeled values for every semi-monthly time-step (twice a month). However, if there was ...

1
2 3 4 5