23k views

Algorithm to find nearest point

I've 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 ...
24k views

What is unit of shapely length attribute?

I'm doing a very simple calculation of the length of a polyline using shapely: from shapely.geometry import LineString ... xy_list = [map(float,e) for e in xy_intm] line = LineString(xy_list) s = '%...
4k views

What is the right solution (and map projection) to compute distances between points located all over the World?

After my study on map projection I realized that it is very difficult to choose a projection that allows to compute simultaneously the distances between a great deal of points if these points are ...
6k views

Which is the most accurate method of measuring distance?

I aim to analyse the accuracy of the various methods of geodesic calculations (distance between two points on Earth)based on the three assumed models of Earth - flat, spherical & ellipsoidal. I ...
2k views

Why is this polygon "self intersected" and invalid?

I have a polygon defined as follows: segment from 43:29:02 N 003:50:39 E to 43:34:12 N 003:43:04 E arc(CW): center (43:34:49 N 003:58:16 E) from 43:34:12 N 003:43:04 E to 43:45:45 N 003:59:56 E ...
4k views

Find tangent point on circle furthest east or west

There are few ways of articulating my question. It starts with a known circle on a sphere, i.e. a point-radius, and one that does not cover a pole. I would like to calculate the point furthest west ...
989 views

What is a delta in lat/lon called?

What is the delta between two lat/lon pairs called? Delta degrees? Arcs? Is it some quantity of distance but what is its unit of measurement? And related: Can we use pythagoras to calculate this ...
10k views

Generate random location within specified distance of a given point

In a simulation (not using any GIS), I need to generate a random location that is within a specified distance of a given location. I found a very helpful post here on this exact topic: How to ...
536 views

Getting a "square" of lat/lon for database query [duplicate]

So I want to get the square formed by a single point of lat/lons, my plan was to take that point's latitude, divide by 360, and multiply by the circumference of earth. Giving us the distance from the ...
2k views

What kind of margin of error can I expect in figuring distance?

I have reviewed Why is law of cosines more preferable than haversine when calculating distance between two latitude-longitude points? and that does not equate to the specific question that I wish to ...
1k views

JTS - Java Topology Suite - Calculate radius from a given point

From point A, I want to check if a point B is within a certain radius from A. How calculate it usindo JTS? I tried this: Coordinate posicaoAtual = new Coordinate(-12.974900375893823, -38....
3k views

Creating Longitude and Latitude Lines in Google Maps

I'm working on an independent high school project where i'm trying to build a simple differential equation model for diffusion. I'm trying to overlay the model on top of a map to visualize spread, so ...
110 views

Center-to-Center distance [duplicate]

Possible Duplicate: What is the right solution (and map projection) to compute distances between points located all over the World? I want to know how I could calculate the center-to-center ...