Skip to main content
11 votes
Accepted

Why is SQL Server 2019's STDistance Very Slightly Different Than The Vincenty Formula? (Same Up To ~0.0001km)

SQL Server's STDistance function does not compute geodesic distances. Its algorithm essentially generates straight lines in 3D, densifies them and maps them on the ellipsoid in a manner described more ...
FSimardGIS's user avatar
  • 3,846
7 votes

Get lat/long given current point, distance and bearing

What follows is a development of the formulas found in the Aviation Formulary by Ed Williams and in Movable Type Scripts by Chris Veness, from the formulas of spherical trigonometry, to solve the ...
Gabriel De Luca's user avatar
6 votes
Accepted

How is it possible to calculate azimuth from a single lat lon cordinate with x, y offsets in meters?

After couple of days of searching and testing I finally managed to get this to work. The first question was whether it was possible to calculate azimuth using an image's x,y pixel coordinate. The ...
Hossein's user avatar
  • 191
6 votes

calculating bounding box from known centre coordinate and zoom

Assuming you are using the Web Mercator projection (Google Maps, MapBox etc), the key lies in these two equations: where λ is the longitude in radians and φ is geodetic latitude in radians. The x and ...
Matti Wens's user avatar
5 votes
Accepted

Euclidean and Geodesic Buffering in R

For most purposes it will be accurate enough to use a spherical model of the earth--and the coding will be easier and the calculations much faster. Following suggestions by M. Kennedy in a comment, ...
whuber's user avatar
  • 69.9k
4 votes

Definition of "most northwesterly point" on a landmass?

Draw the landmass in the Mercator projection. Find the most NW point, e.g., by scaning a NE-SW line across the map. That's it! The Mercator projection is the one to use because it's the only one ...
cffk's user avatar
  • 3,281
4 votes

When calcuating distance between points on Earth why are my Haversine vs. Geodesic calculations wildy diverging?

There was a matrix algebra error in the Haversine formula. I updated the code in the question. I am getting much better agreement between Haversine and geodesic now: On my actual dataset:
Bstampe's user avatar
  • 223
4 votes
Accepted

Why are my icosahedron triangle subdivisions not equilateral (PostGIS)?

Yes, this is due to the tiled icosahedron to-sphere projections. I think of this process as: Take a normal icosahedron, all corners lie on the same sphere, and therefore, the distance is also the same,...
Fee's user avatar
  • 1,210
3 votes
Accepted

Complexify geography polygons in PostGIS

I think you can use ST_Segmentize to do this (especially if you have Geography objects). Returns a modified geometry having no segment longer than the given max_segment_length. Distance computation ...
Ian Turton's user avatar
  • 82.1k
3 votes

Figure out location of city direction sign in image - friday fun project

I am the author of this picture. So I can tell for sure the sign post is located in Thessaloniki, Greece.
user176351's user avatar
3 votes

Why is SQL Server 2019's STDistance Very Slightly Different Than The Vincenty Formula? (Same Up To ~0.0001km)

Without having access to the source code of SQL Server it may be impossible to say. As a comparison, PostGIS ST_Distance query from the geography example of https://postgis.net/docs/ST_Distance.html ...
user30184's user avatar
  • 67.3k
3 votes
Accepted

Would nearest point using Geodesic distance and nearest point using Haversine distance be the same point?

For sure, "closest" will return different points, in general, for great-circle (what you call haversine) and geodesic distances. For a specific example, consider the set of points {A, B} where the ...
cffk's user avatar
  • 3,281
3 votes
Accepted

When calcuating distance between points on Earth why are my Haversine vs. Geodesic calculations wildy diverging?

I appreciate your code because it contributes to geodesy, by allowing to make some interesting analyzes in a practical way, regarding spherical approximations for the calculation of length of geodesic ...
Gabriel De Luca's user avatar
3 votes
Accepted

ArcPy Insert cursor losing vertices when writing Polygon features?

Try adding sr to arcpy.Polygon(polygon, sr)Here is the reason why: I sometimes see significant coordinate movement when I do not supply a Spatial Reference to an Arcpy Geometry object such as a ...
klewis's user avatar
  • 7,495
3 votes

Moving dead ahead: rhumb line, great circle or none

I know the question has answered already, but allow me to show you something cool for future use: A live Google map where you can move the edge markers affecting the great circle and rhumb line same ...
hookie's user avatar
  • 31
3 votes

Is order among distances preserved when using Geodesic and Cartesian distances?

No! And it's pretty easy to find counterexamples (where the cartesian distances are ranked opposite to the geodesic distances). For example, for the WGS84 ellipsoid, pick 3 points with positions ...
cffk's user avatar
  • 3,281
2 votes

Buffer not providing accurate geodesic buffers in ArcGIS Desktop 10.0?

I just tested this in ArcMap 10.3 and it has produced accurate buffers based on the field 'Dist' in my point feature class: arcpy.Buffer_analysis(in_features="//pmgfile01/Users/jb/Documents/ArcGIS/...
jbalk's user avatar
  • 7,583
2 votes

Creating a geodetic line that goes around the whole ellipsoid with pyproj

pyproj hooks up with the geodesic routines (I am the author of these) in proj. The geod_directline and geod_inverseline functions both initialize objects which allow you to compute points on a ...
cffk's user avatar
  • 3,281
2 votes
Accepted

Understanding geodesic envelope?

It looks like you've figured things out OK. In case it helps, I give here the MATLAB/Octave code that I used to generate this Wikipedia figure showing the envelope: The envelope is formed by the ...
cffk's user avatar
  • 3,281
2 votes

Figure out location of city direction sign in image - friday fun project

If you want to measure (real world)- distance, don't draw circles / create buffers on a flat map canvas. Using EPSG:3857 / Web Mercator is especially a bad choice for measuring distances or areas, as ...
Babel's user avatar
  • 73.1k
2 votes
Accepted

Figure out location of city direction sign in image - friday fun project

Just eyeballing this on a globe view with a measure tool like: https://map.terria.io/ Makes me think the location is in Southern Greece. Using an online app like https://www.distancefromto.net we can ...
nmtoken's user avatar
  • 13.5k
2 votes

What's the name of the area between two geographic coordinates?

A quadrangle? Yes, it is named: spheroidal quadrangle.
Gabriel De Luca's user avatar
2 votes

Choosing projection for running polygon intersections at global scale (i.e, geodesic intersections)?

You should not use a projection (except for making maps; or when you must use an algorithm that really cannot deal with angular data). For area computations in R, you should use the lon/lat data. That ...
Robert Hijmans's user avatar
1 vote

Choosing projection for running polygon intersections at global scale (i.e, geodesic intersections)?

Jochen's table led me to an accurate answer (I think/hope). Here is the answer I came up with. First, if you can run this in ArcGIS Pro, go for it, because it has a geodesic option, but it is not a ...
Matt F's user avatar
  • 49
1 vote
Accepted

What's the name of the area between two geographic coordinates?

More informally than a spherioidal quadrangle, a much more common and useful term is "bounding box", sometimes shortened to "bbox".
alphabetasoup's user avatar
1 vote

Leaflet.Geodesic.js line not drawn

var Geodesic = L.geodesic([[[52.5, 13.35], [33.82, -118.38]]], { opacity: 1, color: 'red', steps: 50 }).addTo(map); Instantiates a polyline object given an array [point_1, point_2, point_3] ...
Taras's user avatar
  • 33.3k
1 vote

Converge origins on destination leaflet geodesic

Simply instantiate your L.Geodesics inside the for (var i in sheet) loop, like var fg = L.featureGroup().addTo(map); var orleans = new L.LatLng(30.053206, -89.934873); var origin; Tabletop.init({ ...
IvanSanchez's user avatar
  • 10.3k
1 vote

Calculate perimeter of a large polygon using geodesic calculations

You can achieve that using web mercator projection and addGeometryAtributes form ArcGIS
Luis Felipe Fragoso's user avatar
1 vote
Accepted

Calculate perimeter of a large polygon using geodesic calculations

In QGIS, it seems that if you have the project coordinate reference system set to an ellipsoid and not a projection, then calculating the perimeter via the field calculator will automatically use the ...
wfgeo's user avatar
  • 3,598
1 vote

Calculate turn required to follow a line of latitude

Consider the circle of latitude φ; this has a radius R = a cosβ, where a is the equatorial radius and β is the parametric latitude. A cone with base radius R and apex semi-angle φ ...
cffk's user avatar
  • 3,281

Only top scored, non community-wiki answers of a minimum length are eligible