Questions tagged [algorithm]
A mathematical procedure used to solve problems with a series of steps. Algorithms are usually encoded as a sequence of computer commands.
585 questions
179
votes
9
answers
304k
views
Algorithm for offsetting latitude/longitude by some amount of meters
I'm looking for an algorithm which when given a latitude and longitude pair and a vector translation in meters in Cartesian coordinates (x,y) would give me a new coordinate.
Sort of like a reverse ...
98
votes
8
answers
130k
views
Finding minimum-area-rectangle for given points?
As you see in the figure, the question is:
How to find the minimum-area-rectangle (MAR) fitted on the given points?
and a supporting question is:
Is there any analytical solution for the ...
59
votes
7
answers
165k
views
Calculating Latitude/Longitude X miles from point?
I am wanting to find a latitude and longitude point given a bearing, a distance, and a starting latitude and longitude.
This appears to be the opposite of this question (Distance between lat/long ...
49
votes
3
answers
48k
views
Why is law of cosines more preferable than haversine when calculating distance between two latitude-longitude points?
In fact, when Sinnott published the
haversine formula, computational
precision was limited. Nowadays,
JavaScript (and most modern computers
& languages) use IEEE 754 64-bit
floating-...
46
votes
6
answers
65k
views
Trilateration using 3 latitude/longitude points, and 3 distances?
I want to find out an unknown target location (latitude and longitude co-ordinates). There are 3 known points (latitude and longitude co-ordinate pairs) and for each point a distance in kilometers to ...
43
votes
1
answer
47k
views
Finding center of geometry of object?
Given a set of 2D or 3D points:
How to find the center of geometry of an object?
According to the following figure, the center of geometry differs from the center of mass if it is calculated in the ...
30
votes
2
answers
11k
views
Calculating areal distortion outside UTM zone?
One of my colleagues is working with data that is spread across two UTM zone. The majority of the data is in one zone, with a few outliers in another zone. He would like to know what the area ...
29
votes
3
answers
12k
views
Dividing polygon into specific sizes using ArcGIS Desktop?
I have several thousand irregularly shaped polygons in a shapefile. I want to be able to split each polygon into three areas, and to specify what the size of those areas (they sum to the previous ...
25
votes
2
answers
1k
views
Seeking Algorithm to detect circling and beginning and end of circle?
I've got lots of flight data from glider pilots in the form of gps fixes in a fixed interval.
I would like to analyze the flight path and detect the start and the end of the 'circling' the glider ...
22
votes
5
answers
21k
views
Calculating roundness/compactness of polygon?
I am trying to find ways to quantitatively describe the shapes of various polygons. For my project, these polygons represent lakes, rivers, lagoons, and parks. So they can be almost any shape. One ...
22
votes
3
answers
8k
views
Algorithm to find out points of inflection for a polyline
I am trying to find out the points of inflection , i.e. points where the curves in a line start and end. If you look at the image, the green line may be a road or a stream, and the black points are ...
21
votes
2
answers
8k
views
Finding the Center Line from a set of 3D Points
I have a set of 3D points. They follow a curved pattern with a rather constant diameter as shown below. What would be the algorithm to trace the approximate center line of these points?
20
votes
3
answers
25k
views
Algorithm to find nearest point
I have a list of a few hundred cities with their latitude/longitude. Given another location (also in lat/long) I need to find the nearest city.
As I don't use any GIS, by now the obvious algorithm is ...
20
votes
5
answers
3k
views
Algorithm to fix topological errors in GIS software apps
Related question here.
I notice that ensuring topological correctness is essential for GIS applications, this is because the input from user or polygon boolean operation can have severe topological ...
19
votes
1
answer
5k
views
Heatmap algorithm to visualise point diversity
Can anyone suggest an algorithm to generate a heatmap for visualising point diversity? An example application would be for mapping areas of high species diversity. For some species, every single plant ...
18
votes
3
answers
2k
views
Clustering undirected lines
I'm looking for an efficient way to cluster lines independent of their direction. That means that a line between New York and Los Angeles should be in the same cluster as a line in the other direction ...
17
votes
5
answers
6k
views
Seeking algorithm to place maximum number of points within constrained area at minimum spacing?
I have a polygon layer that describes a constraint; I wish to add points within this area. I want to add as many points as possible, but they must have a minimum spacing between them. Is it possible ...
17
votes
1
answer
255
views
Alternative indexing methods for point set operations
It is common to use a bounding box spatial index to improve performance when working with a large number of features. Where operations are performed against individual geometries with a large number ...
16
votes
2
answers
9k
views
Point of Intersection for a Ray and Earth's Surface
Say I have a ray vector originating from somewhere out in space. An example might be a ray of light from the sun. How can I calculate the point of intersection (if it exists) between the ray and the ...
15
votes
3
answers
10k
views
Calculating a spherical polygon centroid
I'd like a general way to calculate centroids for polygons on a sphere.
So far, the best online reference appears to be:
Tools for Graphics and Shapes by Jeff Jenness.
The method described there ...
14
votes
7
answers
11k
views
Calculating maximum distance within polygon in x-direction (east-west direction) in PostGIS?
I am interested in the maximum width of a polygon e.g. a lake, in east-west direction. Bounding boxes will help only in simple polygons but not in complex concave polygons.
14
votes
2
answers
1k
views
Detecting branched polygon shape?
I have a vector layer with millions of polygons making continuous coverage. I need to classify them according to their shape. I am already using several shape indexes from landscape ecology like ...
13
votes
10
answers
17k
views
Algorithm for finding irrregular polygon centroid (label point)
I need to find a centroid (or label point) for irregularly shaped polygons in Google Maps. I'm showing InfoWindows for parcels and need a place to anchor the the InfoWindow that is guaranteed to be on ...
13
votes
4
answers
23k
views
Bilinear interpolation of point data on a raster in Python?
I have a raster that I'd like to do some point interpolations with. Here is where I'm at:
from osgeo import gdal
from numpy import array
# Read raster
source = gdal.Open('my_raster.tif')
nx, ny = ...
13
votes
8
answers
949
views
Looking for pedestrian-specific routing engines
Most of the applications providing pedestrian routing I see are sufficient for many needs but not optimal: you cannot cross open spaces like town squares, routing is in the middle of the street etc.
...