Questions tagged [nearest-neighbor]

A technique for resampling raster data in which the value of each cell in an output raster is calculated using the value of the nearest cell in an input raster.

35 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
2
votes
0answers
355 views

Geo-hash finding nearest neighbour with massively variable distance to actual nearest neighbour

I have a series of points in lat-long space, ranging from having their nearest neighbour very close to 1000s of km away. Say I do a geo-hash of these to a high precision, my search of nearest ...
2
votes
0answers
306 views

Find the nearest neighbour for points in one layer to points in another, then measure the distance

USING QGIS 2.18.19 with python console (planning to upgrade to the newest QGIS after this piece of programming) I am struggling with finding the correct pyQGIS coding for this. I have a shapefile ...
2
votes
0answers
127 views

create neighborhood list in R with large dataset

I want to create a weight matrix based on distance. My code for the moment looks as follows and functions for a smaller sample of the data. However, with the large dataset (569424 individuals in 24077 ...
2
votes
0answers
186 views

k nearest neighbour with count limit

I have a set a points, and I want to create 10 clusters. I used attribute based clustering plugin, which worked well for creating the clusters, but the points count isn't perfect, some clusters have ...
2
votes
0answers
216 views

Finding the closest points to a line with only one point from each subset of points

I have a set of data points that represent many paths for different journeys, where each journey has its own identifier (Operation No). The data for all journeys is in a single table but in effect has ...
2
votes
0answers
43 views

Setting vector area

I'm new to QGIS and am using it to spatially analyze the placements of artifacts within an excavated site. I am trying to conduct nearest neighbour analysis; however, I do not know how to set the area ...
2
votes
0answers
98 views

Choosing interpolation method for monthly atmospheric parameters derived from AQUA/Air satellite?

I want to investigate atmospheric refraction and i am using Aqua/ Airs satellite data. These are atmospheric parameters (1) Air temperature (2) Geopotential height (3) Relative Humidity All these ...
2
votes
0answers
684 views

N Nearest Neighbours efficiently PostGIS/Python

The data is worldwide about a million points, lat/lons, with an id and an importance value (0.0 to 1.0), and it's limited to being on land. Ideally I need to cluster all 1 million points into 100,000 ...
2
votes
0answers
307 views

Weighting Point Data whilst performing a Near analysis

I am struggling to work out how I can assign weights to my points (airports), So far I have carried out a Near fuction so that all of my raster (output areas ) are assigned a point with its distance ...
2
votes
0answers
466 views

Can Nearest Neighbor Analysis help determine values for a Heat Map?

Given the below parameters (from Nearest Neighbor Analysis): A) Is there a definite range my Radius value should be within? B) Are there definite values my cell size should be near? C) Is there a ...
1
vote
0answers
37 views

Generating similar random points in QGIS

I have data (Lat, Lon) of 32 buildings, and their plot in QGIS is given below in red dots. Now based on the calculated mean distance (Nearest neighbor analysis) between these points, I want to ...
1
vote
0answers
26 views

Nearest Neighbor Global matching

I'm trying to compare two datasets; a satellite image and some known points. In the satellite image I've got 20 to 50 detections that should match up to a set of lat/lon points that I have. There is ...
1
vote
0answers
28 views

Distance Point x,i from nearest Point x,j report Point x,j ID in r

I have a sample of points villages x,i, and I want to know the distance between each village x,i and the nearest village x,j. The i, and j depicts two different samples. I am able to find the distance ...
1
vote
1answer
44 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 ...
1
vote
1answer
173 views

Error creating DEM with Nearest Neighbour tool in QGIS?

I have an issue when I am creating a DEM with the tool natural neighbour on QGIS. When I extract my data directly on Qgis I have no issue creating a DEM. My points are coming from different sources ...
1
vote
0answers
220 views

Nearest Neighbour Analysis Or NN join

I have two Layer in my Project 1) Voronoi Layer which is constructed on point Layer 2) Building Layers which is represented as Polygon. The goal is to find the nearest node for every polygon (...
1
vote
0answers
300 views

QGIS Nearest Neighbor Analysis on Layer Subsets with User Defined Area

I have a data set of developments of various types in a single US City. My aim is to run a nearest neighbor analysis for each of the various development types to explore how clustered, random or ...
1
vote
0answers
815 views

NNJoin returns incorrect distances

Bottom Line Issue: The distances I get from NNJoin for the shortest distance from a point to the nearest polygon are several hundreds or even thousands of meters shorter than the distance I calculate ...
1
vote
0answers
46 views

max sum within a 200mt radius

I have a SpatialPointData Frame in R. Each point represents lat long and InsuredValue amount. I would like to find the maximum sum of insured value in a radius of 200 mt. How I can do in R
1
vote
0answers
108 views

Applying Edge Correction in ArcGIS Average Nearest Neighbor?

I am using ArcGIS 10.3 with the tool Average Nearest Neighbor from the Spatial Statistics toolbox to describe the data. I want to avoid mistakes caused by Edge Effect. In the Ripleys K Function tool ...
1
vote
0answers
35 views

When would I use K analysis over NNA?

I'm working with the dataset Redwood (62 redwood trees in a 23^2m square). I intend to test whether these are random or not. In what cases would I prefer Nearest Neighbor Analysis and in what cases ...
1
vote
0answers
97 views

Coordinate System choice for Nearest Neighbor

Here's an interesting scenario I came upon yesterday and I wanted to throw it out as a question to try help me visualize what is happening. I have a single point (a person, say) who is looking for ...
1
vote
0answers
679 views

Using spatial index in spatialite query?

I posted this question originally Using nearest neighbor query in SpatiaLite? Using the answer given I was able to get the query working on some test data. However I am having trouble applying a ...
1
vote
0answers
132 views

Why would Nearest Neighbor Analysis give 0 observed mean distance?

I am working with small datasets (around 100 points or less) with Nearest Neighbor Analysis in QGIS 2.8 (although I also tested in 2.6 and the result is the same). I have the layers referenced with a ...
1
vote
0answers
672 views

Loop though records in PostGIS (using PL/PYTHON or PGSQL)

I've seen many example of loops, but I can't get that one to work. I work for a regional transit agency and each year, we conduct several surveys. I geocode everything to the house level for internal ...
0
votes
0answers
22 views

Accounting of strength of spatial autocorrelation between some grocery stores in distance 500 meters

I'm analyzing sales one supermarket chain and I want to know how other neighborhood stores influence on turnover store. I have data about other stores and their location. As a result, I need to get ...
0
votes
0answers
22 views

Google Earth Engine: When mean pixel value is blank, take nearest pixel value

I have a code for calculating the mean value of a variable, and reducing it to get values for 5 regions of interest. The full earth engine code for this is here. However, I'm getting blank/null values ...
0
votes
0answers
22 views

How to evaluate the statistic significance in the Neighbour Nearest Test?

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 ...
0
votes
0answers
14 views

What percent of non-zero weights should I aim for when selecting value of k?

I am attempting to test for spatial-autocorrelation among regression residuals via Moran's I in R using the 'spdep' package. While creating the spatial weights, changing the value of k changes the ...
0
votes
0answers
12 views

Linking clusters and masks by a common identifier

In ArcMap, I have raster clusters with unique identifiers. Around each cluster I have masks. Is there any way to carry each of the clusters' identifiers over to the attribute table of its closest ...
0
votes
0answers
33 views

Nearest Neighbour along a route instead of geographical displacement

Say that I have three layers as follows for a certain region: Line Layer representing roads Point Layer representing hotels Point Layer representing train stations Using QGIS is there a way in which ...
0
votes
0answers
36 views

NearestNeighbor producing bad quality tiles

I have been using Bicubic interpolation to render some basemaps because this produced good results. This is what I get when using Bicubic: However, when using Nearest Neighbor interpolation, a white ...
0
votes
0answers
34 views

Finding nearest 10 observations that occurred 2 years before original observation using ArcGIS Pro ModelBuilder?

I have a point sample of house sales (~42k points over 9 year period) with a date field(integer), and for each point I want to find the 10 nearest houses within a year of sale and also which were sold ...
0
votes
0answers
55 views

PostGIS - Nearest Neighbour Join to sum values

I have a table of polygons T1 and a second table of points P1 Each point has a value I want to sum the values of P1 for each T1, with P1 being the closest set of points to T1 At the moment the only ...
0
votes
0answers
63 views

Sampling Points and Areas around them

I have some coordinates in QGIS. I want to sample the values corresponding to those coordinates on a layer. I know that I can do that for the exact point using 'Point Sampling Tool'. Is there also a ...