Skip to main content

Questions tagged [masking]

Covering or hiding features on a map.

Filter by
Sorted by
Tagged with
0 votes
0 answers
13 views

Clip raster with mask layer, but retain the unclipped areas

I want to clip a raster with a mask layer that consist out of several polygons to remove unwanted areas. The resulting rater that I am getting retains the areas within the polygons. I want to obtain ...
Jordaan Fouche's user avatar
2 votes
1 answer
43 views

Pearson's Correlation for Masked Images in GEE

I'm trying to calculate and plot correlation coefficients between two Image Collections, which are monthly NDVI and MODIS hotspot counts (where hotspot counts represents the number of times a pixel ...
KatieGeo's user avatar
0 votes
0 answers
32 views

GEE applying raster Mask misses pixels and won't align with target image

I am trying to mask an image in GEE by a raster image. Value 1 corresponds to presence of trees and 0 absence in a 30x30 resolution. However, all pixels are masked when they shouldn,'t, as I ...
williwiw's user avatar
0 votes
0 answers
30 views

Google Earth Engine updateMask() with a mask of finer resolution gives strange results

It seems updateMask() will keep the projection of the original image. However, masking the original image with a finer resolution image produces strange results in the following calculation. As the ...
QRW's user avatar
  • 63
0 votes
0 answers
56 views

Remove pixels from a raster in QGIS

I have a raster map and I would remove isolated pixels or groups with less than 4 adjacent pixels. How can I do it in QGIS?
Salvatore Praticò's user avatar
1 vote
0 answers
35 views

Unexpected output from masked area calculation in Google Earth Engine

Using a 500m MODIS burned area dataset in GEE, I want to find the area burned in a period of time (say, a few months). Specifically, I want to find the area of pixels that have burned one or more ...
KatieGeo's user avatar
2 votes
0 answers
57 views

Replacing values in a raster using a mask in Python

I have a tiff-file with three color bands that I want to mask in Python using a shapefile, but when I use the normal masking method with rasterio, the data points under the mask are replaced with (0,0,...
Marcus K.'s user avatar
  • 141
0 votes
0 answers
31 views

Keep nan values when resampling using GEE and Python

I'm processing MODIS GPP data using GEE and python. The issue is the resolution of MODIS is very coarse so I need to upsample it using, for instance, bilinar resampling. The problem is MODIS contains ...
stray_dog's user avatar
0 votes
0 answers
14 views

Process the img1 using the img2 which contained with only 0 and 1 to keep the raster corresponding 1 and erase the raster corresponding 0

How can I use an image with only 0 and 1 to process another image, so that the original image value corresponding to the 0 value area becomes 0, and the value corresponding to 1 is preserved? Is there ...
Cris Wang's user avatar
0 votes
1 answer
34 views

Trying to create mask to eliminate false NDVI numbers in GEE time series analysis using Sentinel data

It keeps given me the error that ndvi.gte is not a function, I shared my code below: var images = sentinel.filter(ee.Filter.date(startDate,endDate)).filterBounds(geometry) print(images); var ndvi = ...
Eppez's user avatar
  • 1
1 vote
1 answer
100 views

Deleting or hiding features in QGIS in one layer based on the value of the feature in another layer

I have two tiff-tiles which are maps of the exact same area: One of them displays the height of each cell in the area while the other displays an identification number of the same cells. What I was ...
Marcus K.'s user avatar
  • 141
0 votes
0 answers
18 views

Mask get wrong value

While trying to see if 2 images share some matching pixels I try to implement the mask() function. In order to do so I used image1.mask(image2) Here is an example : Mask of Image 1 : Mask of Image 2 :...
Aurélien Lengrand's user avatar
3 votes
1 answer
263 views

Adding simple Geomasking (Donut masking) feature using PyQGIS

I would like to add a simple halo masking feature/plugin in QGIS. Halo/donut masking basically transforms (shifts) all points in a layer to a random distance between two user-provided distances. ...
Pankaj Sharma's user avatar
0 votes
1 answer
38 views

Adding pixel-level classification to ee.ImageCollection

I am working with ee.ImageCollection('LANDSAT/LE09/C02/T1_L2') data pulled from earthengine-api in Python. I have previously defined a function to mask cloud, shadow, water, and snow. based on the ...
richard.turner's user avatar
0 votes
0 answers
98 views

AttributeError: NoneType

I have this code I use in the QGIS Python console. I used it a few days ago and it worked, but I tried using it again and I got this error: Traceback (most recent call last): File "C:\PROGRA~1\...
Gabriel Mulero's user avatar
4 votes
3 answers
847 views

Inverted Polygon in ArcGIS Pro

Back when I used QGIS, I symbolized with the 'Inverted Polygon' setting all the time. Mostly it was to create a half-opaque mask around a feature that I wanted to pop out more prominently, but I can't ...
Russell Toler's user avatar
0 votes
1 answer
31 views

Does MapServer allow to set up empty tiles as a return of a webapp request for data outside of the layer mask in MapServer?

Is it possible to set up empty tiles as a return for webapp request of a data outside of the layer mask in MapServer ? I have a MapServer-based webapp with a layer that uses a mask option to limit ...
Markoyee's user avatar
2 votes
0 answers
57 views

How do I batch-assign NoData values?

I have a number of rasters I need to mosaic together. The areas with data are within a rectangular "nan" envelope. The "nan" envelopes of different rasters overlap each other. No ...
Matt's user avatar
  • 151
1 vote
1 answer
301 views

Google Earth Engine Water Mask and keep non water area

I'm pretty new at GEE. I want to mask only the water areas for my study area. I want non-water areas to retain their pixel values. For this I detected and masked water areas with NDWI. However, after ...
user217304's user avatar
1 vote
1 answer
26 views

How can I update this function to block out values of NDVI that are greater than or equal to 0.1?

Really new to JavaScript and Google Earth Engine, sorry if formatted badly. I am wondering if there is a way to only calculate an NDVI value that is greater than 0.1 in my .addBands line. If not, how ...
Westfruit's user avatar
1 vote
2 answers
427 views

How to mask bands of an image based on values of one of the bands using numpy and gdal

I have a raster with two bands, and I want to mask both bands to get data where band "yod" has a value of 2011 and export a new tif file with the same two bands masked. The following script ...
Isa's user avatar
  • 193
1 vote
2 answers
269 views

Mask GeoJSON with nested Polygons/Nested donuts

How would I mask a geojson that looks like this {"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":&...
four-eyes's user avatar
  • 3,420
1 vote
0 answers
64 views

Masked raster is completely black when reprojecting and masking in GRASS GIS

I have a global raster of railways networks in Mollweide CRS (resolution 1000x1000) and I want to reproject it to Europe (EPSG:3035), crop it to Europe, and change the resolution to 30x30 km (0.25°). ...
LT17's user avatar
  • 303
1 vote
2 answers
71 views

Naming clipped files from layer mask?

I have to clip a quite large raster (corn crops) into individuals rows. It's working fine with the "Clip raster by mask layer" tool with a grid I created. However, I need the clipped images ...
basile's user avatar
  • 69
1 vote
0 answers
49 views

Expanding QGIS mask Plugin query

When I select a polygon and I apply the QGIS plug-in mask to it then a buffer is created around the polygon. The plug-in does this with the following expression in my case: in_mask(31370) Can I ...
Filip Lasseel Million paradise's user avatar
4 votes
3 answers
819 views

Use Raster Layer as a Mask over a polygon in QGIS

I have a raster layer, as seen on the attached image, that works as a background of my working area. The red line, that marks the limit between the two countries, is a .shp file that, naturally, goes ...
Trikelians's user avatar
0 votes
1 answer
176 views

s2cloudless sometimes masking out fields

I have implemented the s2cloudless code as written in the official documentation. The only changes I did were: Skipping the step where the median is calculated (I aim to do a time-series analysis); ...
Barbara Perez de Araújo's user avatar
0 votes
0 answers
173 views

Fully removing raster values that have been masked out

I want to fully delete the values to this suitability raster that have been masked out. When I apply the mask (feature layer -> appearance -> masking) the stretch does not rescale. It is ...
Jeremy P's user avatar
0 votes
1 answer
128 views

How to make multiclass color mask based on polygons (osgeo.gdal python)?

I know how to make binary 1-band mask in python with osgeo.gdal.Rasterize(src, shp_file_name, burnValues=[1]) But what if I have several classes and want to make 3-band mask with different colors for ...
Nikita Artemenko's user avatar
1 vote
0 answers
23 views

Clip all polygons inside the boundary of provinces to separate and calculate every inside polygons area

I need to calculate area of polygons inside every province but some of polygons are not exactly inside of one province and part of it is in one province and the other part is in another province. How ...
coral's user avatar
  • 81
2 votes
1 answer
768 views

How to use Turf mask when Polygon has islands in inner rings/inner rings

I am getting some weird result with turf.mask(). This is the polygon I am trying to run the mask() function with: https://gist.githubusercontent.com/Stophface/50155878441205412001247878f58b63/raw/...
four-eyes's user avatar
  • 3,420
1 vote
0 answers
42 views

Get rid of GeoTIFFs that fall outside the boundary when adjacent GeoTIFFs overlap each other

I am currently working in ArcGIS Desktop 10.4 with data driven pages enabled. I have ten GeoTIFFs with some overlapping into other GeoTIFFs. I want to mask those that are overlapping so when I show a ...
britainie's user avatar
1 vote
1 answer
358 views

Masking in rasterio changes the values the output file

I am masking a raster file using rasterio. I am doing this using the mask function. The result of the masking changes the value of the pixels when loaded to GIS. import fiona import rasterio import ...
Nikko's user avatar
  • 611
1 vote
1 answer
838 views

Mask NetCDF data in Python with shapefile

Precursor to this question: Masking NetCDF data with a shapefile in that has more than one variable Python. Note: Data files are in the previous question. I am trying to mask my polygon but I don't ...
Julius Bamah's user avatar
0 votes
0 answers
142 views

Turf.js with multiple webworkers for point transformation 48 core CPU

I need to split a GeoJSON file to multiple parts engaging about 10 web workers to do some point transformation using turf.js. Afterwards, the returned processed data will need to be appended to form ...
sharmapn's user avatar
0 votes
1 answer
189 views

Split categorical image into multi-band image in Google Earth Engine, where every band only contains pixels from one category

Context I need to calculate the yearly forest area lost for every country, based on the Hansen Tree Cover Loss (TCL) image. The band I use is categorical and indicates the lossyear in the form of an ...
Thierry's user avatar
  • 139
0 votes
1 answer
51 views

Stacked image created, while most of the bands became masked

I am trying to do a crop-type classification, so I created a stacked image from my collection for training by RF. However, when the collection is stacked, most of the bands inside the stacked image ...
Samar Tarek's user avatar
1 vote
1 answer
230 views

How to get rolling count of masked pixels in Google Earth Engine

Using the Global Forecast System from NOAA, which provides relative humidity (RH) estimates several hours in to the future (up to 16 days to be exact). I create a binary of the RH, call it leaf ...
John Polo's user avatar
  • 377
1 vote
2 answers
385 views

Sample Regions - excludes points with masked bands. Google Earth Engine

I have a set of points from around the world and I want to extract the pixel values from a set of images, giving information about the local environment, for each point. Then export the set of values ...
Erin's user avatar
  • 157
0 votes
0 answers
63 views

Raster masking keep old extent

I want to clip a raster file using for mask other raster file and in SAGA GIS provider tool QGIS QGIS Processing | Raster Tools | raster masking . I realized the new masking file keeps in the ...
hellas's user avatar
  • 393
3 votes
1 answer
72 views

Fixing errors in old DTM in QGIS

I'm currently working on fixing some errors in some old DTMs. The issue is there are pixels with a value of "-1.4013e-45" which are all over the rasters. I'm looking for a way to remove ...
Richard McDonnell's user avatar
0 votes
2 answers
413 views

rasterio.fill.fillnodata doesn't work as expected

I have a DEM of a lake bottom, that contains a few holes (nodata) which I'd like to fill. For that purpose i'm using rasterio's fillnodata with a mask. Unfortunatly, I don't get the results I am ...
Zev_Zide's user avatar
  • 187
2 votes
1 answer
375 views

Google Earth Engine: can I use multiple masks?

I am trying to use GEE to get temperature rasters. I am using the Daymet data, pulling every day of the year in 2011 in a county in New York, USA. I want to exclude temperatures less than 10 C and ...
John Polo's user avatar
  • 377
3 votes
1 answer
60 views

Delimit the loading "zone" in a shapefile

I have to make several atlases of a large region in France. My study area is relatively small compared to the entire region. However, most of my layers are related to the entire region. As I intend to ...
caslumali's user avatar
5 votes
1 answer
2k 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 ...
zabop's user avatar
  • 2,650
1 vote
1 answer
3k 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 ...
emax's user avatar
  • 269
3 votes
1 answer
241 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. ...
Undermon's user avatar
1 vote
1 answer
581 views

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

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 ...
geogalog's user avatar
1 vote
0 answers
15 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 ...
Ashish AJ's user avatar
0 votes
0 answers
72 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 ...
Milap's user avatar
  • 25

1
2 3 4 5
8