Skip to main content

Questions tagged [subset]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
24 views

Restricting to region of interest in GEE

I'm using the following code to visualise and export a monthly mean of satellite data. How can I restrict the analysis to a small region? I tried creating a rectangular geometry and adding ....
Simon Hales's user avatar
0 votes
0 answers
46 views

Clip a SpatialGrid using a SpatialPolygon

In order to perform kriging methods using automap::autoKrige I need to provide a SpatialGrid for which values can be predicted. I would like to reduce the rectangular grid to the actual area (in this ...
M.Teich's user avatar
  • 115
1 vote
1 answer
61 views

WCS Subsetting on two axes returns "Null domain values provided"

I have two layers, where one only has a datetime "time" dimension, and the other layer has a custom integer "forecast" dimension next to time. I'm able to request both layers with ...
KamillaK's user avatar
1 vote
1 answer
471 views

Using the "Selected Features Only" checkbox with QgsProcessingParameterFeatureSource in PyQGIS script

I'm working on a custom QGIS Processing algorithm, and I'd like to include an option for the user to process only the selected features in the input layer by using the checkbox "Selected Features ...
Matt_Geo's user avatar
  • 1,050
1 vote
2 answers
171 views

Output from gdal_translate projwin is different from geoserver WCS GetCoverage request?

I've a hard time understanding which one should be the correct result by gdal_translate or GeoServer. My system (Ubuntu 22.04) has: GDAL 3.4.1 Geoserver 2.22 running on Tomcat on port 9090 I have a ...
Bằng Rikimaru's user avatar
0 votes
1 answer
918 views

How to create 'select by attributes' feature layer when greyed out? File is a feature class (not a feature layer) and I cannot convert it

I have a subset of attributes selected from a query in 'Select by Attributes' in the Attribute Table. I want to export these selected attributes into a new layer, and am unable to do so in ArcGIS Pro (...
Rad_GIScience's user avatar
1 vote
2 answers
2k views

Subset polygons in R

I am trying to separate a specific area on my window of analysis. I have a georeferenced floor plan with rooms as polygons. I want to select and plot only some the rooms I tried this: rooms <- ...
MaryM's user avatar
  • 39
2 votes
3 answers
2k views

How to subset a raster stack by year with a loop in R?

So I have a folder with loads of .tif files showing NDVI. What I want to do is read them into a rasterStack, then subset that stack by year. I've been able to do this manually, but I'd really like to ...
Xandian97's user avatar
0 votes
1 answer
214 views

Random selection of XY% of points within fishnet cells in ArcGIS Pro

I am using ArcGIS Pro and have a feature class of approx. 30.000 points and a polygon grid. Within each grid cell I want to select XY% (50, 70 or any other percentage) of the points (see picture). I ...
Rakete's user avatar
  • 3
1 vote
0 answers
188 views

How can I match the colors between the subset and the original image?

I have test subset using an AOI, and I have unchecked the "Ignore zeros in stats." option in the subset dialogue box. The difference in colors may have been cause by the histogram re-...
Shadi Abdelhadi's user avatar
9 votes
2 answers
7k views

How to subset a SpatRaster by value in R

How do I subset a SpatRaster from the R terra package by value? This is the raster: > rh10 class : SpatRaster dimensions : 2732, 4379, 1 (nrow, ncol, nlyr) resolution : 1000, 1000 (x, y) ...
Teed's user avatar
  • 93
-1 votes
1 answer
103 views

Subsetting a specific number of features in a large dataset so that they are all together in ArcMap

I have a very large feature layer consisting of polygons of different sizes. I need to select or subset a certain amount of features (say I need 4 polygons of size x, 6 polygons of size y, and 10 ...
Daniel's user avatar
  • 1
1 vote
0 answers
43 views

Supervised classification in parts

I have an image from 1990 (res 30m, also clouds) for an area equal 2100km2 and when I performed the supervised classification, the software (ERDAS) confuses the classes that look similar. Is it ...
Andrea's user avatar
  • 11
0 votes
1 answer
79 views

Randomly subsetting x% of polygons where attribute value=x for a large feature class using ArcPy

Referring to this topic: Randomly subsetting % of polygons by class/attributes using ArcPy...I am trying to randomly subset a % of polygons based on an attribute that they all share. For example, I ...
Maxmarie Wilmoth's user avatar
1 vote
1 answer
386 views

Iterate through ee.List of strings containing dates to subset to new ImageCollection

I've got a Sentinel-2 ImageCollection that I want to subset by date. The example below contains images from two dates (2019-02-17 & 2019-02-20), and I want to separate them. The i_date and f_date ...
EduardH's user avatar
  • 31
3 votes
2 answers
2k views

Filtering with setSubsetString using PyQGIS

I would like to create a layer with a filter on one of my columns ("GAMME_DE_S"). I saw that I can use setSubsetString but no way to use it. uri = r"C:\impression_plan\FicheCana.shp&...
patrickblancseau's user avatar
2 votes
2 answers
292 views

Creating Catalog Subset using lidR

I have a catalog of just over 3000 LAZ files that I want to split into regions using clip_rectangle(). The total catalog size is 60GB. My PC has 64GB of RAM but I get an error that lidR is unable to ...
Steve's user avatar
  • 61
2 votes
0 answers
474 views

Clipping multiple raster with multiple shapefiles in Python

I am trying to adopt existing code for clipping multiple rasters with multiple polygons based on this link: Subsetting multiple rasters with multiple shapefiles using Python I added the following ...
Sam's user avatar
  • 66
1 vote
1 answer
333 views

Applying Jenks classification on subset of features using PyQGIS [closed]

I have a layer of watersheds, and a layer of diagnostic units, that are contained in each watersheds. I have indicator values for each diagnostic unit. Indicator values have been normalised according ...
Juliette Lapeyre's user avatar
7 votes
4 answers
2k views

Taking only the largest polygon from MultiPolygon layer in QGIS

I have MultiPolygon geometries in my file, and I want to take only the largest polygon within the MultiPolygon geometry to further work with it. I tried using the "Multipart to singleparts" ...
Anabella's user avatar
4 votes
1 answer
587 views

Subsetting multiple rasters with multiple shapefiles using Python

I want to subset multiple raster files with multiple shapefiles and the following code is working (it is not the whole code, only the part for the subsetting). I am using Python 3.6.8 i_shp = 0 # ...
FelixB.'s user avatar
  • 109
6 votes
2 answers
267 views

Subselecting features in QGIS

Is there a way to subselect features in QGIS as can be done in ArcMap? For example, I have 5 features selected, and I want to look at each one of them individually (e.g.: zoom to), without unselecting ...
Adrian_Drosera's user avatar
2 votes
0 answers
66 views

QGIS Get maximum sum of a feature subset in Atlas-View

I have a data-layer called data wich looks like this: I also have an atlas-layout with pagenames defined by the column Jahr from the another Layer, representing the unique values from the Data-Layer. ...
Bjoern's user avatar
  • 283
1 vote
1 answer
2k views

Rasterio: select subset of georeferenced image by lop left coordinates and height, width

I want to subset a 10m sentinel dataset using rasterio window modul. I have tried using the window = from_bounds(...) part in .read() however it requires for me to put in the left top right bottom ...
Pratyush Kumar's user avatar
3 votes
1 answer
178 views

Subtracting line features in QGIS

Doing network analysis in QGIS. This is where I came from: Start situation: + 600 points with fid and 1 relevant attribute. Also road network data. First step: ran "network tools - service area (...
Matti Pesu's user avatar
0 votes
0 answers
572 views

Shifting in pixel after subsetting with gdalwarp

I am trying to subset multiple image to smaller Area of interest I have tried with gdal_translate & gdalwarp in commandline but it causes slight shift in pixel in the output raster after cropping/...
Tua's user avatar
  • 57
2 votes
1 answer
519 views

R {sp} spatial subset: keep so many polygons as number of overlapping points

I have a set of overlapping spatial points and spatial polygons. I need to subset the polygons by overlapping points, but, if my polygon contains 2 points, I need to keep polygon twice, etc. To keep ...
maycca's user avatar
  • 3,376
2 votes
0 answers
111 views

Where_Clause expression working for one FeatureClassToFeatureClass_conversion export but not another

I am attempting to export a feature class to both a shapefile and feature class with a where_clause restriction on particular values within particular fields. I have written a function to take dataset ...
MapPeddler's user avatar
1 vote
1 answer
328 views

Count subset of points in polygons

Being an SQL-noob, I found a working solution to generate a virtual layer with counts of points in the polygons of another layer, inspired by this https://gis.stackexchange.com/a/54680 SELECT ...
Bernd V.'s user avatar
  • 3,199
1 vote
0 answers
119 views

Getting subset with same cordinates for different rasters using gdal.translate?

I am a new into Python. I have processed 1000 NDVI rasters covering larger area. I need to burn those NDVI raster with Water mask. The water mask came for whole world I need to subset AOI and also ...
Tua's user avatar
  • 57
4 votes
1 answer
3k views

Spatial subsetting SpatialPolygonsDataFrames completely within selecting area using R

I am trying to spatially subset in R: the forest stand data (many small polygons) by the watershed data (one polygon) My datasets are both in SpatialPolygonDataFrame format. I don't want to ...
maycca's user avatar
  • 3,376
1 vote
0 answers
112 views

Speeding up spatial subsetting in R?

I need to subset a global fishing dataset to just have the fishing in the Pacific. Right now I have a shapefile of the Pacific and I am using the sp method of subsetting (see below) oceans <- ...
confused_coder's user avatar
0 votes
1 answer
676 views

Subset raster stack in R by a vector of number sequences?

I have a large raster stack that I need to subset by somewhat irregular time spans. I'd like to do something like this: rstack[[c(1:3, 4:8, 9:15)]] But there are 30 sequences like the ones above ...
Jason's user avatar
  • 141
4 votes
1 answer
3k views

subset FeatureCollection by position - Google Earth Engine

I have a FeatureCollection such as: // Make a list of Features. var features = [ ee.Feature(ee.Geometry.Rectangle(30.01, 59.80, 30.59, 60.15), {name: 'Voronoi'}), ee.Feature(ee.Geometry.Point(-73....
John L. Godlee's user avatar
2 votes
1 answer
2k views

Subset raster stack with logical indeces R

Is it possible to subset a raster stack by indexing on a logical vector? r1 <- raster(nrow = 100, ncol = 100) r1[] <- round(runif(ncell(r1), 1, 4), 0) r2 <- raster(nrow = 100, ncol = 100) r2[...
philiporlando's user avatar
7 votes
1 answer
3k views

'Could not load source layer for INPUT: layer not found' error when running QGIS algorithm on selected features using PyQGIS

I try to run algorithms on layers but only on selected features with QgsProcessingFeatureSourceDefinition() in a loop and then write the result with QgsVectorFileWriter: layer1 = QgsVectorLayer(path1,...
dmjf08's user avatar
  • 1,293
8 votes
1 answer
2k views

Running QGIS algorithm with selected features from layer using PyQGIS

In the QGIS GUI, the select-by-location algorithm has a choice to only use the selected features from the INTERSECT layer. How can I do this (or use any other algorithm) in a python script for QGIS 3? ...
Jose's user avatar
  • 218
2 votes
1 answer
2k views

Making subset of Sentinel-2 with rasterio?

I am looking for a solution to my problem with rasterio. I want to download just a specific part of the image from AWS based on lat lon coordinates. Rasterio offers a great tool (window) although it ...
h.steve's user avatar
  • 23
1 vote
1 answer
243 views

Add a scale or category to a rule which is only applied to points within original subset in QGIS

I have subset a shapefile of points to only include those having a value of (for example) 33 in the variable "Bout" using a rule based assignation: Now I would like to apply a sub-category to that ...
Jojo's user avatar
  • 141
1 vote
1 answer
496 views

Randomly selecting single point from within multiple fishnet grid-squares?

Using ArcGIS, I have a large data set of occurrence data many of which are in similar places. I have created a fishnet around the total area and want to select a single random point from within each ...
Billy Gardener's user avatar
2 votes
0 answers
683 views

more than one reactive events to subset markers in Leaflet in R

I am trying to create a shiny ap in R that displays markers on a map. I have a couple of categories that I would like to subset. Currently, I can subset but the map is only reactive on a single input (...
JWH2006's user avatar
  • 121
3 votes
1 answer
1k views

Subset SpatialPolygon using Raster in R

I have a polygon and raster with the same extent: library(rgdal) library(raster) library(rgeos) library(sp) # make the polygons df <- structure(list(LAT = c(35.61226, 35.34986, 35.17794, 34....
tjr's user avatar
  • 163
0 votes
1 answer
1k views

Spatial subset using a rectangular bounding box - geometry not in Mercator?

I want to restrict my feature collection (in red, below) to the conterminous U.S. I found this solution to create a bounding box: var continentalUS = ee.Geometry.Rectangle(-127.18, 19.39, -62.75, 45);...
setophaga's user avatar
  • 209
2 votes
1 answer
265 views

Cannot write a subset of features back to the source Geopackage or File Geodatabase

At QGIS 2.18.16, I have a Geopackage point layer with a selection subset. I need to write the selected records to the same Geopackage as a new layer, with a new name. When I attempt to Save As... ...
Stu Smith's user avatar
  • 8,192
1 vote
2 answers
2k views

Not giving output for gdal_translate

I am using following code to take subset of all files in a folder. The code is not giving any error but it is not creating output files. How to solve it? import numpy as np import re import gdal ...
vigna purohit's user avatar
3 votes
0 answers
1k views

Subset polygon data of SpatialPolygonsDataFrame by Distance to a Set of Coordinates in R? [duplicate]

I am learning and I made a very similar question when I hadn't learnt what a Spatial Polygons Data Frame was about 10 days ago: https://stackoverflow.com/questions/49193867/select-raster-in-ggplot-...
delcast's user avatar
  • 133
4 votes
1 answer
4k views

How to subset point data by outside of polygon data in R

How can I subset point data from outside of polygon data in R? Currently, I can subset point data inside polygon data, now I want to get point data outside polygon data. library(sf) nc <- st_read(...
ogw's user avatar
  • 131
1 vote
0 answers
542 views

GeoServer WCS 2.0.1 subset request data with different file dimensions

I'm trying get two sets of data using WCS 2.0.1 request from my GeoServer and do raster calculation using GDAL's gdal_calc.py. Both datasets in GeoServer are converted to the same coordinates and same ...
MaxG's user avatar
  • 515
9 votes
2 answers
9k views

Usage of gdal utilities to subset from raster

How to you use GDAL to subset a smaller raster from a bigger one given the bounding coordinates?
nickves's user avatar
  • 11.5k