Questions tagged [masking]
Covering or hiding features on a map.
355
questions
0
votes
0
answers
634
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 ...
3
votes
0
answers
816
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 ...
2
votes
1
answer
165
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 ...
1
vote
1
answer
3k
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
1
answer
104
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 ...
1
vote
1
answer
2k
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
1
answer
132
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 ...
3
votes
2
answers
2k
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 ...
1
vote
2
answers
472
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
1
answer
824
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 == ...
1
vote
3
answers
3k
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
0
answers
129
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
1
answer
4k
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 ...
4
votes
0
answers
692
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 ...
1
vote
0
answers
112
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 ...
2
votes
2
answers
828
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=...
2
votes
1
answer
267
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 ...
6
votes
2
answers
621
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
1
answer
726
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 ...
0
votes
4
answers
1k
views
Create a mask out of a raster layer
I have a raster file (TIF file) and want to use its extent as a mask. I need this mask to be able to extract other shape files /raster files by this mask.
How can I convert my raster file to a simple ...
2
votes
1
answer
2k
views
Rasterio Write Masked Array to TIFF - Shape write and read indices are wrong [closed]
I'm clipping a raster to a shapefile, which returned a masked array, and my goal is to write that masked array to a new .tif file with the correct metadata. I can view the masked array and it looks ...
7
votes
1
answer
7k
views
How to clip raster inside of circle (python gdal)
I have a source raster and an ERSI shape file, want to crop the raster into the circle.
raster = gdal.Open("raster.tif", gdal.GA_ReadOnly) #read raster
projection=raster.GetProjectionRef()
...
5
votes
0
answers
364
views
Google Earth Engine: Prevent Cloud mask algorithm for Landsat-8 from masking coastline
I am trying to remove clouds on Landsat image using cloud mask. However, the cloud mask removes even the shoreline that do not have clouds. I don't know why. Is there another way?
(upper: pre-masked ...
2
votes
1
answer
1k
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 (...
2
votes
0
answers
617
views
Mask out areas inside a feature collection on Google Earth Engine
I am quite new to javascript and I am trying to apply a mask on an image to exclude areas inside a feature collection, I have seen that for the case of image collections the "mask" and "mask.not" ...
1
vote
1
answer
924
views
Masking using two sliders on Google Earth Engine
I am trying to apply a mask based on two conditions (elevation and MNDWI), however, I don't find a way to integrate the two conditions using sliders, which would update the map when any of the sliders ...
1
vote
1
answer
390
views
Perform Fragstats-like analyses around a defined radius of multiple points with overlapping buffers on raster file [closed]
I'm trying to do patch analyses (similar to those available on Fragstats) on NLCD landscape data (raster data). I have about 2000 points all over the state of NY.
My plan is to:
1) create a 100 ...
0
votes
1
answer
824
views
R: mask a raster by a polygon also keep cells partially covered [duplicate]
I want to mask a raster by a polygon, the R script was as followed. However, some cells with only partially covered weren't included in the masked raster as listed in the picture link (https://drive....
0
votes
2
answers
1k
views
Create mask for each layer of time-series raster in R
I'm trying to create a mask using each layer of my stacked Pixel Reliability QA rasters in R. I'm trying to exclude pixels with values greater than 1. I will use them to mask my vegetation index time-...
0
votes
1
answer
115
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
0
answers
750
views
Clipping raster by feature using GDAL in QGIS?
I have successfully selected the feature from a shapefile (boundary) and intend to use this as a mask to clip the raster map underneath. However, having followed instructions when I open the GDAL > ...
1
vote
1
answer
682
views
Overlapping multiple images with cloud masked?
I am now using fmask algorithm to eliminate the cloud covered areas on Landsat images.
I choose a period of time (Jan 1st 2017 to Dec 31st 2017), and selected the study area (Florida). I want to get ...
1
vote
1
answer
3k
views
Mask water bodies in GEE
I'm trying to to detect changes in land surface over few periods in a specific polygon.
The problem is that I want to block water bodies from my calculations.
How can I do it?
This is the code I ...
4
votes
1
answer
2k
views
Masking pixels inside the polygons using Google Earth Engine?
I am working on a classification problem on agricultural fields. To make things easier, I first identified road, cities, water, fields, and etc. I am planning to eliminate road, cities, and water out ...
0
votes
1
answer
96
views
How to mask an area in ArcMap and run supervised classification on unmasked area?
I would like to just run supervised classification on my area of interest (all along the coastlines) and would like to know how to do this in ArcMap. I have created a polygon to mask out the area out ...
2
votes
1
answer
1k
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 ...
1
vote
0
answers
117
views
Is there a way to interpolate lost data/lost pixels caused by cloud and cloud shadow masks in Google Earth Engine? WITHOUT editing filter(Date) [duplicate]
I'm sure cloud and cloud shadows have been, time and time again, a frustrating problem. Usually after masking the two, I composite multiple images (in a set time interval e.g. 2015-2016, months 6-8) ...
2
votes
1
answer
187
views
Reducing file size by not storing no-data points
I have to compute sea wave forecast for large period of time. Land information is of no use here.
Is there any file format that allows to not store no-data/fill values for land area to reduce file ...
1
vote
0
answers
344
views
Filtering anomalous pixels from masked raster in Python?
I am struggling to succesfully filter out anomalous pixels from a Sentinel-1 image band mask (Pixel based), produced in Python.
I am new to Python.
By anomalies, in this situation, I mean ...
1
vote
1
answer
1k
views
Google Earth Engine Mask application
I'm using GEE in order to extract evapotranspiration (ET) data from MODIS (MOD16A2v6).
I want to extract only ET band in order to make some further process.
To do so, I apply some filters (like ...
1
vote
0
answers
78
views
Why did not I manage to reproject layer?
I have a global land cover map, which has the following properties: Name ESACCI-LC-L4-LCCS-Map-300m-P5Y-2010-v1.6.1
Path C:\QGIS\ESACCI-LC-L4-LCCS-Map-300m-P5Y-2010-v1.6.1.tif\ESACCI-LC-L4-LCCS-...
4
votes
1
answer
2k
views
Creating water and vegetation mask via image collection?
I am a Java script and EE novice but I'm already a great fan of Google Earth Engine. I am simply trying to create a single NDVI and NDWI masked layer to work on. Below you'll find my Frankenstein of a ...
5
votes
1
answer
5k
views
Setting masked pixel value in Google Earth Engine image export?
I'm using Earth Engine to preprocess and download some NDVI data. I used a region of interest to clip the imagery to a geometry, and values from the Summary QA layer to mask out pixels that were of ...
2
votes
1
answer
151
views
Replacing masked cloud areas with another satellite image?
I have various Landsat images of which many are cloudy. Using the cloud masking plugin available in QGIS, I was able to identify and remove the areas with cloud and cloud shadows from every image.
...
1
vote
0
answers
104
views
Raster masking with vector error in QGIS 3.6
I have a global glc-2000 raster map. I would like to clip it to study specific area. I used boundries of continents shapefile as mask. Both of them have same projection. Since I am beginner I have ...
6
votes
2
answers
4k
views
Masking layers by a vector polygon layer in QGIS
I have a vector layer of buildings:
and a polygon layer coloured by some quantity:
and I want to mask one by the other to produce this:
This can be done by setting the blend mode to "Multiply" with ...
1
vote
1
answer
37
views
Trouble with masking
I am trying to mask out a section of an image I created with an algorithm. I create a geometry of the section I want to mask out and clipped that with an image of 1's to create my mask image. But when ...
2
votes
1
answer
61
views
Performing localized raster edits using ArcGIS Spatial Analyst?
I have a raster image of water depth, float point values 1-15, in a very small area some erroneous values are in the raster with values of 100 - 375. I'm looking for a repeatable work flow in ArcMap ...
2
votes
2
answers
173
views
Visibility analysis with mask for non visible areas?
I have LiDAR data and I've made a Digital Surface Model (DSM):
I've made a visibility analysis for 3 buildings with this model:
My goal is to know from where the buildings are visible, not what do ...
3
votes
0
answers
796
views
Sentinel 3 Cloud Masking in Google Earth Engine
I am new to GEE and I wanted to use this as part of my research.
My first step was to mask the clouds off the images.
The code i created basically mask out pixels based on the Quality Flag Bit 27, ...