Questions tagged [masking]

Covering or hiding features on a map.

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

How to mask everything but a polygon in QGIS?

I am able to draw polygons over areas of interest in QGIS. For example via: Layer -> Create Layer -> New Temporary Scratch Layer, name the layer, select Polygon as Geometry type, OK, select the ...
  • 370
0 votes
1 answer
31 views

Clip a GeoTIFF based on a bounding box coordinates using rasterio

I would like to clip a geodaframe based on coordinates. Let's say that I have the following bounding box from a GeoPandas dataframe. The projection is mollweide. gdf.boundary.plot() gdf.total_bounds ...
  • 177
3 votes
0 answers
43 views

QGIS - Label masks breaks layer on PDF export

I have a contour lines layer with index labels, which uses masks, it works correctly on the editor and composer as seen below When exported the layer goes past map boundaries and it's style breaks. ...
0 votes
0 answers
21 views

Developing masks to a Landsat composition

I'm a beginner at GE and JavaScript code. I want to apply two masks to a Landsat composition that is already done in the code. First I've done the raster upload (that I want to be a mask), which I ...
2 votes
1 answer
39 views

QGIS - Clipping raster by raster (0-1 range)

I am supposed to clip 6 raster files of Europe by a raster of agricultural land in Europe (mask layer). Initially, to do that I vectorised my mask layer and then clipped the rasters by that. It seemed ...
1 vote
0 answers
13 views

Remove inner side of mask layer from raster (equivalent of clip raster by mask for the inner side, instead of outside) [duplicate]

Objective: Clip raster by a mask but remove area interior to the mask (instead of the default exterior area, when using clip raster by mask) Details of Attempts: Clipping raster using the outer ...
0 votes
0 answers
27 views

Create new shapefile layer per raster layer

In QGIS i have several hundreds raster tiles. For a deep learning application i would like to create segementation masks. To achieve this, my approach is to make a new shapefile, create the polygon ...
  • 15
0 votes
0 answers
16 views

How to mask raster based on multiple band values using GDAL?

Let's say I have a 3-band raster and I want to mask it based on the band combination of all three bands. For example I want to mask all pixels in all bands (set to NA) where Band1=0 AND Band2=1 AND ...
0 votes
1 answer
40 views

Output raster of rasterio.mask doesn't match CRS of input [closed]

I'm trying to mask a raster with population data with my area of interest. I reprojected the original population raster according to the AOI's crs, but after masking and writing the new file, the crs ...
  • 35
1 vote
0 answers
32 views

Quality Control process for MODIS Leaf Area Index in GEE

I am trying to mask certain features from MODIS LAI image such as cloud cover and image quality. MODIS LAI has two quality control measures - FparLai_QC and FparExtra_QC. I tried doing it with the ...
  • 87
0 votes
0 answers
29 views

Masking non-vegetation areas in image

I'm having a little trouble masking non-vegetation areas in my images. I'm using Sentinel-2 images, and I have land use and cover across my country (Brazil). To this end, I reclassified this land use ...
0 votes
0 answers
98 views

Cloud masking (S2cloudless) and temporal gap-fillin interpolation on GEE (using Python API)

I need a time series of Sentinel-2 images freed from clouds and with the masked pixels of each image replaced by interpolated values (linear over time). Thus, first, I applied the cloud mask as ...
  • 71
1 vote
1 answer
76 views

Indexing Sentinel 2 image collection using several conditions

I want to mask water bodies with two different conditions and then add the two indexed layers together to create one layer with different values of 0 (no water), 1 (water: based on index 1), 2 (water: ...
  • 15
3 votes
0 answers
36 views

Merge rasters and clip by a shapefile

I was wondering how to merge multiple TIFF files together and clip the mosaic by the bounds of a intersecting shapefile. I've been able to merge them and output as a .tiff, but am not sure how to to ...
  • 31
0 votes
1 answer
33 views

Looping with a variable r.mapcalc GRASS GIS

I want to crop a raster based on another one, inside a loop. I created a mask (MASK) and then cropped the old raster (old), creating a new raster (new). r.mask vector=EU@PERMANENT #my mask r.mapcalc &...
0 votes
0 answers
111 views

Earth Engine: Landsat 8 QA_PIXEL issues with cloud, shadow, and land masking

Using the QA_PIXEL band in Landsat 8 to mask out clouds, cloud shadow, and land often masks out large areas of water. The QA_PIXEL band identifies these water areas as land and cloud shadow, when this ...
  • 85
0 votes
0 answers
37 views

Clip Raster by Mask problem

I have a scanned in hand drawn image that I'd like to use as a layer. I've added it is a raster image and have georeferenced it and it works fine. The image has lines, some are of the feature I'd like ...
0 votes
0 answers
33 views

Use sen2r() with L2A data to create BOA and SCL?

I have three L2A files downloaded. They are in the .SAFE format. My understanding is that sen2r can process these data, but I don't know which arguments to use. I tried this: sen2r(list_prods=c("...
  • 175
0 votes
1 answer
56 views

Change missing areas value(0) to other in Google Dynamic World Landcover Yearly Mode Mosaic to not mix with water class (also 0)

When I create a yearly mode mosaic using Google Dynamic World Landcover Data, the areas with missing landcover values especially in high Himalayan regions(perhaps due to the 35% cloud threshold) are ...
  • 29
0 votes
0 answers
46 views

Masking a curvilinear/rotated grid netCDF with a shapefile?

Obviously it's difficult to reproduce a netCDF here on Stackexchange, especially a curvilinear/rotated grid type. So let me start with what I already know. I know how to mask a regular netCDF with ...
  • 141
0 votes
1 answer
315 views

How to mask raster based on vector shape file

For this work Data are obtained from:- For Raster:-https://download.hermes.com.np/land-cover-map-of-nepal-2010/. For Vector :-https://cellapp.co/download-nepals-new-map-vector-image/. Rupandehi ...
  • 165
2 votes
1 answer
60 views

Use polygon lines to create masks

Given a tile (the cropped base map in the left) and polylines (red lines), is there any tool/workflow in QGIS to convert them into masks in the right?
  • 63
0 votes
2 answers
98 views

Delete single pixels (noise) from raster

I have a raster layer (based on Landsat (30x30m)) of newly emergent lakes after spring snowmelt and subsequent runoff. These are stored in a raster layer. When I look at it, there is a lot of noise (...
  • 798
2 votes
2 answers
354 views

Creating polygon mask in QGIS

In QGIS 3.22.5, is there possible to use polygons for the masking layer? I want to use numerous little polygons to mask lines (only layer which consists of lines). In ArcGIS that works just by ...
  • 21
0 votes
1 answer
176 views

Google Earth Engine Creating a mask for an ImageCollection

I'm using Google Earth Engine's JavaScript API to process Sentinel-2 images. I've calculated the EVI from the Sentinel ImageCollection, and would like to apply a mask that removes all the values ...
  • 181
0 votes
0 answers
71 views

Mask non value flags when opening dataset with rioxarray

I'm trying to read Leaf Area Index (LAI) data from the MODIS product (MOD15A2) using rioxarray, but there are a number of land cover flags (e.g. 253 = land cover assigned as barren) that don't get ...
  • 1
2 votes
1 answer
110 views

Why is my combined Mask masking different areas to the individual Masks over an ImageCollection?

I'm trying to perform a time-series analysis of Sentinel-2 satellite imagery over Water, and to do that I've been muddling through using functions to perform analysis on images over an Image ...
1 vote
1 answer
245 views

Masking clouds on Landsat8 with Python before NDVI [closed]

I'm new to remote sensing and trying to mask clouds with Python. I'm using the same method in Earth Data Science website (https://www.earthdatascience.org/courses/use-data-open-source-python/...
0 votes
0 answers
116 views

Error when trying to mask raster to shapefile after interpolation using R - "sp supports Z dimension only for POINT and MULTIPOINT"

I am trying to mask an interpolated raster to a shapefile with the same coordinate reference system using R, but I keep getting an error. The error is shown below. How can I overcome this error and ...
0 votes
0 answers
88 views

Getting Rid of Black Boundaries from Tiff Image using Google Earth Engine

I'm getting a tiff image from earth engine using the code below, but the image I get is rectangular and surrounded by a black box. How can I get rid of the black boundaries on the corners and get a ...
0 votes
0 answers
175 views

Clip data while reading file into Python with GeoPandas

Geopandas is able to read in only part of a file using: roi= geopandas.GeoDataFrame(geometry) indexed_data = geopandas.read_file("path-to-file", mask=roi) or geopandas.read_file("path-...
  • 71
0 votes
0 answers
43 views

Smoothing layer after masking on Google Earth Engine

I'm working with RADD alerts and I'm trying to apply temporal filters to the image. That way: Script: https://code.earthengine.google.com/eda2cd15ca30478bf6e5d4104b57fc39 // Getting the latest alert. ...
0 votes
0 answers
165 views

NaN values after masking NetCDF with an shapefile in Python

I want to mask a global NetCDF dataset (datacube) to Germany. before I have already spatially resized it with slice. It is the GLEAM dataset v3.5a variable evaporation. I will do some analysis in ...
  • 1
0 votes
0 answers
29 views

Clipping raster with subsetted PostGIS mask in QGIS Python?

I create a subset of a PostGIS table as layer (using the WHERE-like statement in setDataSource). The layer is added just fine into the map. However, the raster is clipped by the whole PostGIS table (...
0 votes
1 answer
345 views

Mask Sentinel-2 image using SCL product in Google Earth Engine

I need to create a Google Earth Engine (JavaScript API) function to mask the pixels corresponding to no_data, satured_or_defective, dark_area_pixels, cloud_shadows, unclassified, ...
  • 479
1 vote
2 answers
137 views

"Clip vector layer by mask layer" algorithm stucked in QGIS

I am using QGIS 3.22 and I try to use a mask to get rid of the part of the shapefile I don't want. However it stays stucked (see img) without even pointing an error. Does someone know what to do? I ...
  • 399
1 vote
0 answers
366 views

Cloud mask algorithms for Sentinel-2 Level-2A data

I am trying to find the best Sentinel-2 cloud mask algorithm for Level-2A data that can be integrated in a Python script and that works well on oceanic areas. I am working with level-2 data because I ...
2 votes
1 answer
82 views

Rasterio mask washing out result

Using the rio.mask.mask function to clip out a section of an ortho. The result .tif looks like it has been "washed" out. The pixel values from the ortho and the result are exactly the same, ...
  • 1,057
2 votes
2 answers
2k views

Masking with rasterio in Python

Introduction I have a shapefile for my area of interest (which in this case is Tehran) and also a TIF file that contains the categorical information(cloud status). In this case, I want to mask the TIF ...
0 votes
1 answer
40 views

Find the min. distance of each pixel to a connected component

I have a matrix in a similar format to the following a = [1, 1, 0, 0; 1, 1, 0, 0; 0, 0, 0, 0, 2, 2, 2, 2] This matrix represents a mask over a region, where each connected component ...
  • 103
1 vote
2 answers
60 views

Unable to mosaic raster bands of the same region in ArcGIS Pro

I am trying to mosaic the Landsat satellite imagery of an ROI to fill the masked cloud regions. For this, I am using f1023clip and f5163clip (as shown in images below). I am trying to mosaic the two ...
1 vote
1 answer
78 views

Retrieving State Heightmaps (DMTED) - Accuracy possible with QGIS? - Requesting Steps

I need a gmted2010 height map of Massachusetts. Only Massachusetts, including its shoreline, islands, and of course state boundaries. What I am currently doing, in bullet point form: I am using https:...
0 votes
0 answers
40 views

Creating Masks with osmnx and rasterio, could misalignments be due to projection?

I'm still quite new to geospatial data and I found that when I'm creating masks for my dataset (building and roads from open streetmap), they are slightly misaligned. Now I see that this is also the ...
  • 195
1 vote
1 answer
255 views

Masking FeatureCollection using image in Google Earth Engine

I have a FeatureCollection with my study area, and an image with urban areas. I want to remove the areas in my FeatureCollection where the image has urban areas. How can this be done? var studyArea = ...
  • 11
1 vote
1 answer
1k views

Rasterio mask doesn't work with shapely polygon

I have raster which I want to mask with shapely polygon.According the rasterio documentation, rasterio.mask can work with shapely geometry.However, in this case, it doesn't work. whenever I use my ...
  • 1,819
1 vote
0 answers
27 views

How to get novalue data of xyz points

I have multibeam and single beam xyz points. I am looking to do the exact same process as Patch over raster A with values from raster B where raster A values are nodata in GDAL as I want to infill the ...
0 votes
0 answers
104 views

How to convert binary mask to lat/lon points Google Earth Engine

I have a binary mask in Google Earth Engine made from an MNDWI raster import os import ee import geemap import matplotlib.pyplot as plt import geemap.colormaps as cm import sys os.environ["...
3 votes
1 answer
113 views

Substracting a lake from my DEM using QGIS

I got a rather small DEM which includes a lake. If I want to calculate the strahler order, flowaccumulation etc. it's calculated wrong. The lake "doesnt exist" in my DEM so I got the values ...
1 vote
1 answer
245 views

How to export masked MNDWI raster from Google Earth Engine

I am working with Google Earth Engine and the wonderful geemap package to export channel centerlines using Modified Normalized Difference Water Index (MNDWI; Xu, 2006). Computing the MNDWI is simple ...
0 votes
0 answers
80 views

Cropping and masking rasterstack to a list of shapefiles

I have a raster stack (nlayers = 366, ncells~10 million). I am hoping to crop and mask this raster stack to a data.frame of coordinates for which I have made a series of concentric circle shapefiles ...
  • 33

1
2 3 4 5
7