Questions tagged [sampling]

Measuring data values at specific, discrete locations.

Filter by
Sorted by
Tagged with
0 votes
0 answers
20 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
45 views

Spatial clustering vs sampling

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

Randomly sample locations from a large xarray dataset

I want to create random sample locations on land (lat/lon), weighted by latitude, from a large xarray dataset. Currently, I am creating the lat/lon pairs from a land-sea-mask with the script below, ...
Felix's user avatar
  • 11
2 votes
2 answers
621 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
0 answers
66 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
43 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 ...
Lin Annie's user avatar
1 vote
0 answers
29 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,294
0 votes
0 answers
75 views

Apply image.sampleRegions obtaining geometry of pixels instead of points in Google Earth Engine java-script API

Goal In Google Earth Engine, I would like to turn a multiband image of 10x10km resolution into a feature collection, where every pixel becomes a feature (i.e., a rectangle) with the pixel values of ...
Thierry's user avatar
  • 119
0 votes
1 answer
72 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
109 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
81 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
537 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
319 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
99 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
  • 43
1 vote
1 answer
444 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
  • 43
0 votes
1 answer
783 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
99 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
50 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
91 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
1k 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
484 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
252 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,862
-1 votes
1 answer
139 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
95 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
153 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
777 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
500 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
583 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
202 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
  • 150
0 votes
0 answers
170 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
156 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
298 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
577 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,294
1 vote
1 answer
792 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
85 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
  • 306
0 votes
1 answer
339 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
62 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,047
3 votes
0 answers
262 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
  • 395
1 vote
0 answers
668 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
118 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
131 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,386
0 votes
2 answers
246 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
867 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,488
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
2 votes
1 answer
1k views

Understanding spsample in R?

I have read the documentation for this but still unsure of what the function spsample does. The documentation is here: https://www.rdocumentation.org/packages/sp/versions/1.3-1/topics/spsample I ...
shibaducks's user avatar
3 votes
0 answers
295 views

Creating equidistant sampling points in polygon in QGIS 3.6.0?

I have figured out how to add random points inside polygon boundaries. Although this works well, nevertheless I need a few different things to happen for my application. What I would like to do is ...
Elliott's user avatar
  • 31