Skip to main content

Questions tagged [spatial-cluster]

Use this tag when referring to spatial clustering in GIS.

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

Testing for joint spatial clustering across multiple variables

I have an analysis that I'm uncertain how to conduct. I have a GeoPandas dataframe that consists of a few hundred sample points (rows) and for each point I have counts of different variables. These ...
clifgray's user avatar
  • 409
3 votes
0 answers
126 views

Effective points clustering using PostGIS

I want to implement clustering points like here in the last example(with big and small points): https://www.crunchydata.com/blog/postgis-clustering-with-dbscan I have a table in PostgreSQL with ...
hifichevymane's user avatar
-1 votes
1 answer
63 views

Clustering points based on maximum distance to each cluster center

I have a layer of buildings (points). I would like cluster as many of them as I can around a common point in space in such a way that all the members of each cluster have a maximum distance of 100 m ...
Luís Macedo's user avatar
0 votes
1 answer
284 views

Modify the “kmeans” function to include the condition that all cluster centers have a value from a given raster

I would like, if possible, to add a condition to the “kmeans” function. The condition is that all centers of final clusters must have values from a given raster, and thus, should not contain any NAs. ...
Marine Régis's user avatar
0 votes
1 answer
234 views

Clustering points with maximum number of points using QGIS

I have a dataset of 488 GPS points which I would like to break up into small clusters. The maximum number of points per cluster should be 3. I have tried the K-means clustering tool in Vector Analysis,...
bellbyrne's user avatar
2 votes
0 answers
143 views

Measuring and comparing 'closeness' of two different clusters in QGIS

i'm doing a paper for university and i'm having problems with statistical analysis in QGIS (v.3.28). i have two sets of waypoints (nests) from two different years plotted on a beach in QGIS. visually ...
aaaastayinalive's user avatar
0 votes
0 answers
248 views

Point Stacker GetFeatureInfo

I've got a sld globally inspired by those posts (and a lot of others): GeoServer – Creating Stacked Points GeoServer Point Stacker: does identify work on non-clustered points? Point Stacker in ...
FloCAD's user avatar
  • 33
0 votes
1 answer
178 views

How to mask a raster and apply an unsupervised classification? R

I am getting the error: In matrix(values, nrow = ncell(x), ncol = nlayers(x)) : data length [6691] is not a sub-multiple or multiple of the number of rows [25628]. In reaction to knr <- setValues(...
Aaron_Elph's user avatar
0 votes
2 answers
267 views

Multiply two rasters in R, one raster has stack of 25 images, and another raster has one image

I want to multiply two rasters (one has 25 images, and the second raster has 1 image). I am using the loop function for multiplication. But I am not getting the results. library(raster) library(rgdal) ...
user221527's user avatar
1 vote
0 answers
144 views

Split a region into segments based on majority points

Having many points that belong to different classes (in the example below 9), I would like to split the region into multiple segments. In QGIS, the majority/minority tool does the job. In Python, ...
Niko Gamulin's user avatar
0 votes
1 answer
116 views

How to change eps float value to geographic meter distance

I have a problem in making distance meter parameters for the DBSCAN tool. The problem is that I don't know the eps unit to use and how to change it to meters to be a parameter. Here's the Python ...
dimas putra's user avatar
7 votes
2 answers
462 views

Cluster polygons into equal parts in QGIS

I have a large area divided into three parts. Each of these parts is divided into smaller parts. Each part contains an amount of biomass that can be cut and sold. The total amount of biomass in the ...
Frodo's user avatar
  • 2,407
2 votes
1 answer
496 views

Create multiple callout lines from a single label

I would like to label groups of points (clusters) with only one label but several call-out lines. I built on top of the very appealing answer from @eurojam here: Giving one label to two points using ...
Beni's user avatar
  • 356
1 vote
2 answers
735 views

Selecting points based on mutual distance and same attribute value using ArcGIS Pro

I have a layer of many points. From those, I need to select only those, that meet condition of having atleast two other points, in specified distance (lets say for example 100 meters) but where these ...
Martin's user avatar
  • 13
3 votes
1 answer
373 views

ClusterDBSCAN eps unit is meter or degrees if SRID is 4326

My SRID is 4326 for the points_geom column. Here is my code: SELECT row_id, ST_ClusterDBSCAN(points_geom, eps := 100, minPoints := 5) OVER(ORDER BY row_id) AS cluster_id FROM subset_cr Am I ...
analyst92's user avatar
  • 857
1 vote
2 answers
307 views

QGIS Clustering: Can I create heatmaps grouped by an attribute?

I've got some data that looks like this: Where the relevant attributes is called pci (and sepearately a signal level). I'd like to create a separate heat map for each pci value (e.g. pci=18). ...
Bryce's user avatar
  • 606
0 votes
1 answer
58 views

Calculating inter-point distances worldwide - a dilemma

I am new to GIS, and am to cluster geospatial datapoints using DBScan() in the fpc package on R. However, my dataset is in ESPG 4326 (WGS 84). Since WGS 84 stores lat-long as degrees, and not metres. ...
Akshay Birdwatch's user avatar
1 vote
0 answers
183 views

Nearest Neighbour Index (NNI): how to compare values & in depth explanation of how to calculate expected mean distance

I have two questions regarding the ‘Nearest Neighbour Index (NNI)’, sometimes also referred to as ‘Nearest Neighbour Analysis (NNA)’: I have calculated the ‘Nearest Neighbour Index’ for 4 different ...
kalakaru's user avatar
  • 562
0 votes
0 answers
134 views

Spatio-temporally cluster points per individual group using R

I require an efficient approach in R to identify clusters of points using the following rule sets: 2 or more points within 2 hours of each other should be clustered. Clusters that are within 150m ...
Ross's user avatar
  • 141
2 votes
0 answers
98 views

Comparing Heatmaps over time

We have a huge dataset of mobile users (tourists) and want to see how the density in a city has changed (from one spot to another) before during Covid. Of course we can create a heatmap for different ...
Roman Egger's user avatar
1 vote
1 answer
793 views

How to cluster 1000+ points into 50 clusters based on geospatial proximity in R?

Sample data: set.seed(123) lon <- runif(1200, 72.6, 73.2) lat <- runif(1200, 18.8, 19.6) df <- data.frame(lon, lat) Progress so far: geo.dist = function(df) { require(geosphere) d <- ...
Shibaprasad's user avatar
1 vote
0 answers
640 views

R: Clustering observations together based on distance and time

In R, I have a dataframe with roughly 3 million observations, with the columns being longitude, latitude and time respectively. My goal is to form clusters (using a custom distance function), and then ...
MODIS Help please's user avatar
2 votes
1 answer
167 views

Differences in first-order Polygon Contiguity in ArcGIS - Contiguity Edges Corners (CEC) vs. Contiguity Edges Only (CEO) [closed]

I am working on spatial autocorrelation, and using the spatial modeling relationship methods available in ArcMap. In ArcMap, there are the following methods for polygon contiguity: Contiguity Edges ...
qxzsilver's user avatar
  • 121
4 votes
1 answer
897 views

If a Moran's I value is close to 1, then why is it necessary to report the p-value?

For instance, if we get a Moran's I value of around 0.6, then we already know based on that Moran's I value that spatial autocorrelation is present. Why is it important to additionally report the p-...
dustedcat's user avatar
1 vote
0 answers
93 views

Group PostGIS table-rows where geometries are close

In OSM there are often e.g. lines (paths) with the same name but different OSM-IDs. Right next to each other, so basically the same thing, but just different objects with no real relation to each ...
Georg's user avatar
  • 1,001
0 votes
2 answers
564 views

Clustering adjacent polygons with values over a given threshold with Python

I have a GeoPandas dataframe that looks like the following geometry raster_val 0 POLYGON ((1.85626 49.12003, 1.85626 49.11171, ... 28.530001 1 ...
emax's user avatar
  • 269
0 votes
1 answer
365 views

Creating homogeneous groups of areas from raster using QGIS

I'm trying to create homogeneous groups of areas from a raster which contain elevations data (in the red area). currently I am doing it manually creating new polygons for each groups. Is there a way ...
PT89's user avatar
  • 35
0 votes
0 answers
235 views

Creating polygons based on attributes in point layer using ArcMap

I have a point layer of residential coordinates which includes an attribute field indicating the most visited hospital for the people living at the coordinate. From these data, I want to create a ...
Sofia S's user avatar
  • 41
2 votes
1 answer
160 views

PostGIS: Creating Polygon from lots of other geometries and then returning list of ID's in the same query

I am fairly new to all of this but in simplistic terms I have the following problem: I need to create lines from points, and from said points group all of those within n distance of one another. From ...
Phish's user avatar
  • 165
6 votes
1 answer
238 views

How to choose limited number of points to represent a point grid

I need to choose a few points to represent the grid below, e.g: 8 points in the grid below. This point need to be geographic distributed This points needs to be geographic distributed. Lets see a bad ...
Guilherme Lima's user avatar
1 vote
0 answers
223 views

DBSCAN with huge number of points

We have a dataset of approximately 30 million new points per month (latitude, longitude, and a measurement associated with that point). So far, we have applied DBSCAN to generate a monthly map such ...
Rourich's user avatar
  • 11
0 votes
1 answer
53 views

Keeping only highest point in cluster of points using ArcMap

i have a cluster of points in particular areas around NZ. I am only wanting the point with the highest value in this cluster to remain. Also many of the points have the same value, i am just wanting 1 ...
Vanessa's user avatar
  • 113
0 votes
0 answers
95 views

If there is no spatial autocorrelation, should the spatial cluster detection be performed?

I have a regional count data of disease incidence. First, I calculated empirical Bayes estimate of standardized morbidity rate. Then I performed global Moran's I to check for spatial autocorrelation ...
Asunray's user avatar
  • 11
0 votes
1 answer
124 views

ArcGIS JS 4.15 Cluster Popup navigation for Cluster

I would like to migrate from ArcGIS JS API 3.x to 4.16. One other feature I am using from 3.x version is clustering. In 3.x is it allow user to click on Cluster marker and navigate between all ...
apaleja's user avatar
  • 405
0 votes
0 answers
299 views

Distance computation for geospatial clustering of lat/lon points

I am working with a pretty large dataset (~500K data points) in Python (GeoPandas) and I would like to perform geospatial clustering on some subsets (~60K points) of the data. My question has to do ...
CopyOfA's user avatar
  • 101
0 votes
0 answers
204 views

Evaluating statistic significance in Neighbour Nearest Test using QGIS

I'm reviewing a scientific article to be publish. I tried to evidence that pathogens collected from different geographic areas clustered. I used Nearest Neighbour test to prove it. However, I've ...
Agar's user avatar
  • 9
3 votes
1 answer
489 views

Statistic for measuring (local) autocorrelation of ordinal data

I have a spatial data set with a bunch of variables in nine-level ordinal scale. I want to calculate (local) spatial autocorrelation for each of these ordinal scale variables. I've been using ...
brabont's user avatar
  • 53
2 votes
0 answers
184 views

How to cluster interconnected lines in Python without PostGIS?

I'm working with a subset of data from OpenStreetMap, where I have these island-like groups of line features. The groups are not connected to one another, but the lines are all interconnected within ...
dericke's user avatar
  • 992
-1 votes
1 answer
228 views

Clustering large number of locations

I am trying to cluster points inside the USA for which I have the latitude and the longitude. My condition is that, every point within a cluster should be less than 25 miles away from every other ...
Karthik Katragadda's user avatar
14 votes
1 answer
6k views

Clustering points in PostGIS

I am trying to cluster points in PostGIS. I have the points and the corresponding Latitudes and Longitudes which I have converted into point geometries. I want to cluster points in such a way that all ...
Karthik Katragadda's user avatar
2 votes
1 answer
634 views

PostGIS Recursively Finding Intersections of Polygons to Determine Clusters

My dataset currently contains about 15.000 buildings which partially touch each other. The objective is that those which do touch should belong to a cluster. This "basically" works but the main issue ...
Timothy Dalton's user avatar
2 votes
0 answers
305 views

Defining Parameters using Spatially Constrained Multivariate Clustering of ArcGIS Pro

I have a point shapefile with 51673 features. I am trying to cluster them using the Spatially Constrained Multivariate Clustering tool in ArcGIS Pro. After reading through the documentation, I'm ...
champezius's user avatar
1 vote
1 answer
557 views

Cluster analysis based on both location and attribute (seconds)? [closed]

I'm looking to create clusters both on spatial density, as well as an attribute (time, in seconds). Essentially, I am trying to figure out what areas are choke points in terms of time spent at certain ...
Afidus's user avatar
  • 83
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
3 votes
1 answer
261 views

Clustering geometry points, return a point's label if the point does not belong to a cluster?

I am clustering geometry points using the k-mean algorithm. The result is a list of clusters. Some clusters contain multiple points. Others only contain a single point. On the client side, we would ...
GNG's user avatar
  • 421
1 vote
1 answer
173 views

Create fake clustered raster data in ArcGIS [closed]

I'd like to create several polygon grids with fake species occurrence (see example image) where each grid cell has a random value between 0 and 5 but high and low values cluster in certain areas as ...
Kristina's user avatar
  • 1,073
2 votes
0 answers
886 views

Looking for QGIS equivalent of ArcGIS Pro "Build Balanced Zones" tool

The "Build Balances Zones" was introduced in ArcGIS Pro 2.4 and allows a kind of spatial clustering with the help of genetic growth algorithm: The Build Balanced Zones tool uses a genetic ...
F. Jehn's user avatar
  • 131
3 votes
2 answers
1k views

Applying ST_ClusterDBSCAN repeatedly until cluster sizes small enough

I am looking for a way to spatially clusters thousands of datapoints (potentially millions) based on distance, such that each cluster contains less than 5000 points. This is a similar question to ...
Pedro's user avatar
  • 163
4 votes
1 answer
1k views

Clustering spatial lines in R by direction

There are tens of ways to cluster spatial points in R but I couldn't find any for spatial lines. What I would like to get is the average trajectory directions that each of these cyclones (spatial ...
Andrei Niță's user avatar
2 votes
1 answer
215 views

Applying QGIS point cluster exception

I have applied a point clustering effect on a layer in QGIS. What I'd like to be able to do is cluster on all features except the ones that I have a NULL value in an attribute. I can Categorize on ...
B-C B.'s user avatar
  • 765