Skip to main content

Questions tagged [sampling]

Measuring data values at specific, discrete locations.

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

What is the optimal number of samples in a random forest classification?

I am conducting a supervised classification as part of a LULC analysis. I have 8 classes with sample sizes maxing at 500. However, I am still seeing some misclassification and want to add more classes,...
Ceiba's user avatar
  • 1
0 votes
0 answers
20 views

Point-sampling outside of vector polygons

I am using QGIS 3.30.0 to try to sample a defined number of points that are located outside of vector polygons. The overall goal is to have an even number of points within the polygons (positive ...
Carter Dills's user avatar
3 votes
2 answers
147 views

How to auto-update field on geometryChanged() signal?

I have a point XY layer with a Z field used only for annotations. Sometimes there is a need to update the the geometry by moving the point manually. Since the layer is stored on an mssql server, the X ...
Ivan Marjanović's user avatar
0 votes
1 answer
85 views

Extracting values over a large area in Google Earth Engine: memory optimisation

I am trying to sample satellite (Sentinel-2 spectral metrics) data over a rather large area (1500 by 2500 km). I have around 2000 points relatively evenly distributed over this area. However, even ...
Oleg Zheleznyy's user avatar
0 votes
0 answers
27 views

What exactly is a grid point? I am trying interpret methods for replication

These methods describe how the researcher built a model training dataset for the purpose of wetland prediction using points as training samples. My goal is to understand how these points align with ...
Kurtis_Fisher's user avatar
0 votes
0 answers
56 views

Spatial clustering vs sampling

I have a dataset with 100 millions Point (lat/lon). I have started by using GeoHash clustering (applied dynamically by Elasticsearch regarding the user zoom level). I end up with something like that: ...
Klun's user avatar
  • 11
2 votes
2 answers
1k views

Stratified random sampling in R

I want to generate 5 pairs of random points per each stratum. I have 4 strata that represent different rock types. For each rock type i want to generate 5 random points and to each random point I want ...
Luc's user avatar
  • 21
0 votes
1 answer
136 views

Smart Map plugin: error sampling 5000 data points

I'm trying to use the Smart-Map plugin in QGIS to do Kriging. I have about 15,300 data points and I need to sample the data (5,000 points, maximum for Smart-Map right now). But this error appears when ...
Leo's user avatar
  • 1
0 votes
1 answer
68 views

Failed to print projection in GEE after sampleRegions

I'm using the function sampleRegions to extract the iamgecollection values from the sample plot I imported. I assigned the projection at first when doing the sampleRegions , however, when I want to ...
Cinnamon roll's user avatar
1 vote
0 answers
33 views

Estimating resolution interpolated from point samples

I have a series of data samples (actually satellite measurements), and I am interpolating the data to produce a raster. I can interpolate to any arbitrary resolution I like; but how can I estimate the ...
winwaed's user avatar
  • 1,314
0 votes
1 answer
106 views

Avoid adding a bunch of new features for one static location for repeat sampling efforts in Field Maps

I have built several maps and forms for their use in Field Maps for various projects. Most have been creating new features and filling out the form for the new location where we sampled. However, we ...
Ken's user avatar
  • 1
0 votes
1 answer
151 views

Selecting points based on random index location from a filtered GeoDataframe in Python?

I have a large point vector file (and many others like it), where each point has a integer value in the column "DN". However, I only need 6 points per DN and want them to be selected ...
user2031's user avatar
  • 221
1 vote
2 answers
106 views

Randomly select non adjacent polygons in vector layer (QGIS) [closed]

I am trying to obtain a random selection of polygons (e.g., 100 polygons out of 400) with the condition that the selected polygons are not adjacent among each other. Any suggestion on how to achieve ...
Caserio's user avatar
  • 131
0 votes
1 answer
776 views

Random sampling In Google Earth Engine

I want to select random 90000 pixels/points from region of interest wherever there is built-up area. To my surprise when I print number of pixels selected it shows only 1044. I am literally lost how ...
Muddasir Ahmad Akhoon's user avatar
1 vote
0 answers
381 views

Executing minimum distance between random samples in python

Right now, my code finds random points within an area and appends them to a variable that I can export as a file. Next, I want to make sure that no two points are within 100 meters of each other. I've ...
user2031's user avatar
  • 221
0 votes
1 answer
177 views

Sample Multiple Raster Layers Python QGIS 3.26.1

I would like to Identify the value of 15 tiff files at the same coordinates. I am currently using an external python script which iterates through each file. How would I do this with the QGIS Python ...
Ethan's user avatar
  • 53
2 votes
1 answer
667 views

Sample Multiple Points from Raster Layer Python QGIS 3.26.1

I have the coordinates for 30000 locations I would like to to sample from raster layers. These locations are not located next to one another. This is currently done with an external python script and ...
Ethan's user avatar
  • 53
0 votes
1 answer
1k views

Plotting N number of grid points inside a polygon/shapefile Python [duplicate]

I have a shapefile of a region. I want to put N number of grid points on that shapefile and create a new layer(shapefile) with all grid points as we do in QGIS. But instead I want to do it in Python. ...
TK7372's user avatar
  • 29
1 vote
1 answer
1k views

Selecting N samples uniformly from a grid points

I have a grid point shapefile. I want to select N number of samples from those set of grid points. I tried pd.DataFrame.sample() but as we know it selects samples randomly. Is there any way I can ...
TK7372's user avatar
  • 29
0 votes
2 answers
123 views

stratifiedSample() gives an empty feature collection in Google Earth Engine

I am trying to sample 10 random points from each value in the 'QA60' band of a Sentinel-2 image for machine learning purposes. When I use the .stratifiedSample() function, I obtain an empty feature ...
Charbel El Khoury's user avatar
1 vote
1 answer
69 views

QGIS 3.22.8 Raster sampling with polygons

This is a DEM of a slope. I have made a polygon grid 10X10. I can't find a command to sample the raster by polygons. I've thought something similar with r.neighbours picking the minimum value of the ...
Pitheas's user avatar
  • 741
2 votes
0 answers
113 views

Designing stratified random sampling considering two or more shapefiles in QGIS

I have two different shapefiles, one containing field boundaries other is a soil class. I want to choose stratified random sampling points (around 200 points) which will be representative of both ...
tawhid hossain's user avatar
2 votes
2 answers
2k views

Selecting random set of points from existing point layer for sampling in QGIS

I have a point layer and I wish to extract a random sample of these points across the dataset based on a given attribute. For example I would like to select randomly 25 points with attribute "A&...
Ross's user avatar
  • 41
1 vote
1 answer
677 views

Sampling raster data around point set in QGIS

I have the following problem: I have a set of 27 "destinations" which I have selected manually and saved as a POINT layer. I have loaded several raster data layers into my project (with ...
najusten's user avatar
3 votes
1 answer
275 views

Randomly sample features from polygon layer with the condition that sampled features will be non-adjacent

Problem: I have a polygon vector layer with potential sample plot locations across a larger ROI. Using python's geopandas, I can randomly select a subsample of polygons from the layer based on the ...
Kartograaf's user avatar
  • 2,947
-1 votes
1 answer
176 views

How to perform Statified random sampling for supervised classification

I want to select my training points using stratified sampling. When I run the code, there is an error saying "unrecognized argument". Can someone look at my code and help me find the issue ...
Banashree Thapa's user avatar
0 votes
1 answer
128 views

How fast GPS position estimates fluctuate?

I wonder how fast the GPS position estimates generally change over time for a stationary receiver. I want this information to form some idea around what the sampling rate needs to be to estimate the ...
Reza's user avatar
  • 101
1 vote
1 answer
187 views

Optimize sampling on band 1 of a big dataset

We do MANY samplings on band 1 of a big dataset, using rasterio dataset.sample function. (https://github.com/mapbox/rasterio/blob/master/rasterio/sample.py) Our python code looks something like this: ...
MyrionSC2's user avatar
  • 111
0 votes
2 answers
907 views

Sampling points in R with both distance constraint and group

I have a spatial point data frame with categorical variable as a column named "type", I would like to draw a random sample from these points (let's say 100 points) with maximum and minimum ...
Es_a's user avatar
  • 160
3 votes
1 answer
573 views

How to randomly select point within grid (QGiS)

I have a series of occurrence points that I am trying to downsample to 1/20 km to avoid sampling bias. So far, I have made a grid of ~20km squares and have filtered them down to squares with more than ...
Rover Bernhard's user avatar
1 vote
1 answer
656 views

Getting properties of random points in Google Earth Engine

I want to have random points across Peru and their properties (the band values of IMAGE) for statistical analysis in GEE. I found two options which are sampling and random points. I have tried the ...
youcodegirl's user avatar
1 vote
1 answer
230 views

How to sample points on specific landcover class using Image.stratifiedSample in Google Earth Engine?

I need to sample NDVI time series on the crop classe defined in the Copernicus GLDAS Landover dataset (value: 40). The logical approach seems to be using Image.stratifiedSample on the landcover, ...
e5k's user avatar
  • 160
0 votes
0 answers
180 views

Generating random points with overlapping polygons in QGIS

The "Random points inside polygons" tool in QGIS works great to generate a fixed number or density of points within polygons; however, because QGIS does not link the polygon ID to the points,...
midden's user avatar
  • 11
1 vote
1 answer
175 views

Unpack error occuring when sampling raster values to points with rasterio

I'm new to Python. I'm trying to sample raster values to points based on the geometries of a shapefile using the below code but I'm receiving the below error . import fiona import rasterio as rio ...
hashalluring's user avatar
8 votes
1 answer
396 views

How does Empirical Bayesian Kriging of ArcGIS Pro handle sampling bias?

In ArcGIS Pro, simple kriging approaches allow you to de-cluster your data before applying a normal-score transformation. According to the Esri guideline, normal-score transformations are only ...
jslth's user avatar
  • 101
1 vote
1 answer
704 views

Is it possible to read a subset of points with the PDAL C++ api?

I am using the PDAL C++ API to read LAS/LAZ data. We're finding some of the tile files are very large (160M+ points), so I wish to take a sample of them. Although the point order in the tiles is ...
winwaed's user avatar
  • 1,314
1 vote
1 answer
892 views

Extracting different number of points for different class in GEE

I want to write a function that takes class id and number of points for each class as argument and samples points from polygons, returning a FeatureCollection. I could only write a function that ...
Batuhan Kavlak's user avatar
3 votes
1 answer
91 views

Generating sampling points - making series of points in the horizontal centre of a long polygon, equidistant spacing on vertical axis

I have a polygon showing the extent of a beach. I would like to create a series of sampling points along that beach, that are equally spaced north to south (say at increments of 100m to the northing ...
staf's user avatar
  • 326
0 votes
1 answer
391 views

GEE: Select random sample on known-NDVI-range for supervised classification

I intend to get random samples for training the supervised classification in Google earth engine. The code here, for example, I calculate NDVI and mask out NDVI < 0.65 (i.e. NDVI >= 0.65 is ...
Sang Truong's user avatar
0 votes
1 answer
63 views

Non-random sampling of point vector layer in QGIS

I have a point vector layer with 47.000.000 points representing elevation. It is a regular grid with constant spacing. I aim for rasterization but it is very slow. I know how to do random sampling but ...
Rusoiba's user avatar
  • 165
0 votes
1 answer
2k views

How to solve "Collection query aborted after accumulating over 5000 elements"?

I am trying to sample image and to get scatter plot of its' two bands- NDVI and db from senttinel 1. For some reason, probably because of the size of the shapefile, I get the error: Error ...
ReutKeller's user avatar
  • 2,169
3 votes
0 answers
266 views

Raster layer stacking and extracting values at points with PyQGIS

I have a dozen single band raster layers in the same CRS overlapping perfectly. I would like to 'stack them one on the other' and extract values at point locations (from a CSV). After that the ...
Quarantäne's user avatar
1 vote
1 answer
1k views

Exporting dataframe - used reduceRegion to sample an image in Google Earth Engine

I am trying to sample the Global Forest Change dataset using randomly drawn points and the reduceRegion function. The way I construct this is: var sampledPoints = gfc2014_c.reduceRegions({ ...
C. Ashley's user avatar
  • 405
1 vote
0 answers
715 views

Stratified sampling in Google Earth Engine

I am trying to get stratified random points out of GHSL (Global Human Settlement Layer) which is a classified raster over my study area (partially Europe and Asia continent), see the picture below. I ...
user153544's user avatar
1 vote
1 answer
136 views

Cut hole in raster with shapefile and sample at closest edges

I have a raster in which I'd like to cut a "hole" with a shapefile. I have points close to the boundary, but inside the hole, and I would like to find the closest point on the edge. To give a concrete ...
EduardH's user avatar
  • 31
1 vote
1 answer
140 views

Create point clusters based on grid

I am trying to make a systematic cluster sampling pattern for data collection. The sampling consist of the points placed over the landscape in 6 km span (red). From this major point, I need to create ...
maycca's user avatar
  • 3,376
0 votes
2 answers
294 views

Random sampling in ArcGIS Desktop

I have 14,033 points representing the location of some weather stations across the 36 states in Nigeria. I want to use an ArcGIS Desktop sampling tool to implement a random selection of 200 points ...
Sarah Chiejile's user avatar
2 votes
1 answer
908 views

Creating random plots with coordinates within polygon using R [closed]

I am trying to create random plots in a polygon shapefile and then to plot it with index no as 1,2,3,... along with a legend comprising XY coordinates corresponding to each index no. Code example: ...
amit haldar's user avatar
2 votes
1 answer
2k views

Extract row & column numbers of a raster at points in QGIS

Is there a tool in QGIS that will extract the row and column numbers of a raster at a set of points? All I have been able to find is the following: Raster Analysis > Sample raster values (Plugin) ...
wfgeo's user avatar
  • 3,598
1 vote
1 answer
1k views

Export pixel neighborhood in Google Earth Engine [closed]

I have some points and know how to extract the Landsat data at these points and build and export a training dataset to feed an external classifier. But how can I efficiently and automatically build a ...
Shahriar49's user avatar