So, I am currently learning about closest pair algorithms and found this problem in a text book: Assume you have a sorrted Array of length n that cont ...

O(n) solution for a one dimensional closest pair problem?

So, I am currently learning about closest pair algorithms and found this problem in a text book: Assume you have a sorrted Array of length n that cont ...

boost::geometry can't recognize that three points are in line (boost::geometry::difference fails)

I have a complex polyline processing using boost::geometry where I need to do boolean operations with them. I got a strange situation, when boost::geo ...

incorrect result showing in K nearest neighbour approach

I am reforming the 2D coordinate number in a aligned way which was not aligned (coordinate numbers were suffled) before. I have below input coordinat ...

Finding closest pair of points in the plane with non-distinct x-coordinates in O(nlogn)

Most of the implementations of the algorithm to find the closest pair of points in the plane that I've seen online have one of two deficiencies: eithe ...

Using ST_ClosestPoint, ST_StartPoint, and ST_EndPoint to find closest object to beginning and end points of lines

I need to find the closest points to either end of a line using geometry from two separate tables. So far I was able to use the following to find the ...

Find three closest points which triangle contains a given point on a sphere

I have a 3D sphere with points on its surface. These points are represented in spherical coordinates, so azimuth, elevation and r. For example my dat ...

Generalized ICP algorithm in PCL

I am trying to solve this exercise (slide 40). I downloaded the kitchen-small dataset an performed the following two steps. First step: Convert Dept ...

Find the closest pair of points in a given set of points

Q) Find the closest pair of points in a given set of points. Expected time complexity: O(nlog2(n)) / O(nlog(n)) i was reading up this problem from h ...

Verify that all edges in a 2D graph are sufficiently far from each other

I have a graph where each node has coordinates in 2D (it's actually a geographic graph, with latitude and longitude.) I need to verify that if the dis ...

PostGIS: Find nearest point from a list of 3D points

Using a PostGIS databse I would like to filter from a list of points (stored as geometry in a table) the one closest to a certain point passed to the ...

How can I select data points based on similar coordinates and year with Python?

I have two datasets (shp files (converted into csv)) in which one contains fire history and the other lightning strikes. Both data sets have latitude ...

Random garbage ouput when trying to find the minimum distance between points in an array

What's the fuss about? I'm trying to find the minimum distance between points (distance between 2 points in a 2D - plane: distance from (x1, y1) to ( ...

How can I write a function to find 2 closest points in 2D dimensional array in Java?

How can I find 2 closest points in an Array in Java? My input is, my output is, ...

Getting the first k closest pairs of points from a set of n points in O(nlogn) time?

Is it possible to find the k pairs of closest points in a set of n points faster than O(n^2)? I know that I can calculate the closest pair of points ...

Create line network from closest points with boundaries

I have a set of points and I want to create line / road network from those points. Firstly, I need to determine the closest point from each of the poi ...

Iterating though a 2D list and put the elements in a Hashtable

I have a list of point coordinate and want to iterate through a 2D list then process the elements in the hash function to generate the key for my hash ...

TypeError: unsupported operand type(s) for /: 'tuple' and 'int'

I'm having trouble with dealing with this error unsupported operand type error and I'm not sure what I'm doing wrong in this case. Any help would be a ...

Find the closest point on a road network coordinates list to a given point

Working with Python, so my actual problem is computationally finding the closest 2D point from an array (thousands of points) which represents a road ...

nd array object of numpy module

I am writing code to find out if a point 'npA' from the set 'pA' has a closest neighbour from a set 'pB' containing randomly generated points. (In the ...

Algorithm, closest point between list elements

I have n ordered lists of unequal size (where I do not know beforehand how many lists there are going to be). I need to find the minimum average dista ...

Sorted:

Quality: