Questions tagged [subset]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
6
votes
4answers
345 views

Taking only the largest polygon from multi-polygon layer in QGIS

I have multi-polygon geometries in my file, and I want to take only the largest polygon within the multi-polygon geometry to further work with it. I tried using Geometry Tool Multipart to Single part, ...
5
votes
2answers
148 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 ...
4
votes
1answer
1k 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 ...
4
votes
1answer
91 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 # ...
3
votes
1answer
3k 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(...
3
votes
1answer
61 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 (...
3
votes
1answer
702 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....
3
votes
0answers
773 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-...
2
votes
1answer
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[...
2
votes
1answer
146 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 ...
2
votes
1answer
188 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... ...
2
votes
0answers
48 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 ...
2
votes
0answers
28 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. ...
2
votes
0answers
44 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 ...
1
vote
1answer
945 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....
1
vote
1answer
753 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 ...
1
vote
1answer
40 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 ...
1
vote
1answer
311 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 ...
1
vote
1answer
45 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 ...
1
vote
2answers
723 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 ...
1
vote
1answer
155 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 ...
1
vote
1answer
126 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 ...
1
vote
0answers
47 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 ...
1
vote
0answers
52 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 <- ...
1
vote
0answers
576 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 (...
1
vote
0answers
244 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 ...
0
votes
1answer
59 views

Apply Jenks classification on a subset of features - PyQGIS3

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 ...
0
votes
1answer
287 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 ...
0
votes
0answers
30 views

Temporal subset and mosaic from a Landsat 8 image collection for each image in Google Earth Engine

What I need are image mosaics from a cloud-masked, chronologically ordered Landsat 8 image collection for each position in the collection. So, the first mosaic should be built from all images 1 ...
0
votes
0answers
182 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/...
0
votes
1answer
778 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);...