Questions tagged [masking]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
20 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
31 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
30 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 ...
1
vote
0answers
22 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
15 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
71 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
38 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
37 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
290 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
36 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
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
3answers
42 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
65 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
21 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 ...
3
votes
1answer
296 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
55 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
124 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
43 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
155 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
56 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
108 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
38 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
71 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
187 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
135 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
293 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
207 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
23 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
180 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
37 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
90 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
177 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
55 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
26 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
194 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
916 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
61 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
0answers
79 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 ...
4
votes
2answers
305 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
1answer
25 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
1answer
34 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 ...
1
vote
2answers
96 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 ...
0
votes
0answers
68 views

Missing raster data from masking with a spatial polygon layer in R

I am fairly new in R and I am trying to create a new raster by using a spatial polygon layer. I have the code written by using the mask function and the output is essentially what I want, but I'm ...
0
votes
0answers
91 views

How to mask a raster layer (interpolated surface) onto a polygon layer? [duplicate]

I have performed interpolation (IDW) for average monthly precipitation and temperature values for Europe. For my project, I'm focusing on the UK and Sweden so I'm wondering can I clip or mask the ...
2
votes
0answers
215 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, ...
0
votes
0answers
72 views

Function to remove borders and clouds from SENTINEL2

I've been trying to test SENTINEL, and found some functions to clean the clouds and edges of the images, but I do not understand exactly how this function works, and I'm very curious to understand ...
0
votes
0answers
152 views

How delete delete or mask nodata 0 value in the mask

I have raster (with 5 bands) and shapfile in the same projection. I do this script for rastersize and do mask and clip raster or crop raster with mask but I need to have just clip raster without black ...
3
votes
0answers
257 views

Writing masked GeoTIFF in rasterio and visualizing in QGIS?

I have an interpolated raster, which is a masked array, that shows where the data is valid. I want to save it as masked TIFF with rasterio. To test, here's the JSON file, and the code: import ...