Questions tagged [masking]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
15 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
19 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 ...
2
votes
1answer
46 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
1answer
24 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
votes
1answer
47 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(???
0
votes
1answer
24 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
votes
1answer
46 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
16 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 ...
1
vote
1answer
65 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 ...
0
votes
1answer
30 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
45 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
22 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
60 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
34 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
0answers
19 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
2answers
88 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=...
0
votes
1answer
46 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 ...
0
votes
0answers
50 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 ...
6
votes
2answers
320 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 ...
1
vote
1answer
39 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
0answers
23 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
3answers
56 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
1answer
92 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 ...
0
votes
0answers
22 views

Clipping an ImageCollection with a raster image instead of a polygon in Earth Engine?

I'm trying to extract NDVI time series values from MODIS, but my ROI is a raster file, not a polygon. It's big and has lots of small pixel clusters, so if I convert it to polygon, it's quite heavy and ...
4
votes
1answer
461 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() ...
3
votes
0answers
69 views

Google Earth Engine: Prevent Cloud mask algorithm for Landsat-8 from removing coastline lines

I'm a new Google Earth Engine user an I am trying to remove clouds on Landsat image using cloud mask. However, the cloud mask removes even the shoreline lines, not the clouds. I don't know why. Is ...
1
vote
1answer
177 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 (...
1
vote
0answers
60 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
1answer
194 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
1answer
63 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
1answer
133 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
0answers
44 views

Removing clouds in Landsat 5 TM Collection 1 Tier 1 TOA Reflectance image

I am trying to remove the clouds from my image but when I try to run the masked layer seems to be error. Is there any solution how to remove the clouds or solve the issue. The link is: https://code....
0
votes
1answer
104 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
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
0answers
215 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
1answer
155 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
1answer
331 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 ...
2
votes
1answer
294 views

Uploading polygons and 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
1answer
25 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
1answer
232 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
0answers
40 views

Is there a way to interpolate lost data/lost pixels caused by cloud and cloud shadow masks in Google Earth Engine? [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
1answer
69 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
0answers
106 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
1answer
235 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
0answers
56 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-...
0
votes
0answers
27 views

Why the Masking in ENVI does not give different statistical result

I want to run statistical band correlation of an image in ENVI. The image has been masked with polygon of interest, and shows no-data value outside the polygon. I expected that it calculated only the ...
3
votes
1answer
235 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 ...
2
votes
1answer
1k 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
1answer
64 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 2 3 4 5