Questions tagged [masking]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0
votes
1answer
17 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
37 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
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
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
31 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
1answer
37 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 ...
0
votes
1answer
39 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
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) ...
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 ...
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
8k 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
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 ...
6
votes
2answers
304 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 ...
0
votes
1answer
375 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 ...
2
votes
2answers
72 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
145 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
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 ...
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 ...
2
votes
1answer
184 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
1answer
294 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 ...
6
votes
5answers
16k views

Deleting polygon defined area from raster layer in ArcGIS Desktop?

Which tool do I use in ArcGIS 10.1 for Desktop to exclude areas covered by vector polygon layers from a raster layer? I want to keep portions of the raster layers that exclude the portions covered ...
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
1answer
167 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 ...
0
votes
3answers
44 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
71 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 ...
2
votes
1answer
121 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 ...
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 ...
1
vote
1answer
130 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 (...
3
votes
1answer
310 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
58 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 ...
3
votes
3answers
5k views

Changing raster cell values within a polygon using QGIS GUI?

I would like to know how to change the values of raster cells which are within a polygon, leaving all cell values outside the polygon unchanged. I would like to subtract 1.5m from each raster cell ...
1
vote
0answers
46 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" ...
2
votes
1answer
757 views

Raster topo map “collars” overlapping?

I am using QGIS 2.0. I have downloaded USGS 1:100,000 topographic maps which show adjacent areas. The topographic maps were digitized with the borders (I've seen them called "collars", I think) as ...
1
vote
1answer
160 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
111 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....
3
votes
1answer
2k views

Apply cloud mask to sentinel 2 image in SNAP

I want to apply one of the cloud masks in the sentinel 2 file to the sentinel image. The sentinel 2 image I have downloaded features files concerning cirrus and opaque clouds at 10m, 20m and 60m. ...
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-...
2
votes
1answer
924 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 ...
0
votes
0answers
188 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 > ...
0
votes
1answer
149 views

Land masking in ArcGIS Raster Calculator?

I'm trying to mask land in a raster and just wondering if anyone knows how to do this. I tried using the raster calculator by producing a new raster based on a threshold value but my output raster is ...
1
vote
1answer
136 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 ...
2
votes
1answer
215 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 ...
1
vote
0answers
38 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
93 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
189 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-...