# Tag Info

Accepted

### Creating buffer circle x kilometers from point using Python?

Use a spatial projection library to do the hard work. Adapting from a previous answer, use a dynamic azimuthal equidistant projection to do a geodesic buffer. Updated solution with PyProj 2.1+ from ...
• 42.2k
Accepted

### Interpolating series of points between two locations using Python

A simple linear interpolation solution This solution generates N-number of random points lying on a straight line between two initial locations. Initial latitude and longitude were transformed to x ...
• 33.5k

### Calculating longitude length in miles

Equations Suppose we are discussing latitude and longitude in WGS84 and we want to be accurate. Both meridian radius of curvature M (latitude length) and radius of curvature of parallels R (longitude ...
• 468

### Manually transforming rotated lat/lon to regular lat/lon?

This transformation can also be computed with proj software (either using command-line or programmatically) by employing what proj calls an oblique translation (ob_tran) applied to a latlon ...
• 151

### Manually transforming rotated lat/lon to regular lat/lon?

https://www.mathworks.com/matlabcentral/fileexchange/43435-rotated-grid-transform PYTHON: from math import * def rotated_grid_transform(grid_in, option, SP_coor): lon = grid_in[0] lat = ...

### PostGis: Calculating distance in different methods, What's the difference?

If you're happy with the characteristics of your projection, you should just use ST_Distance(geometry, geometry). In your example you seem to be in UTM, which is a pretty good projection, so why not? ...
• 19.9k

### Understanding the s2 library (geometry on the sphere, cells and Hilbert curve) for finding points nearby

The S2 Geometry library is complex, but for your needs you can use a partial implementation, as some Javascript port. You can use NodeJS installing the s2-geometry package (e. g. by npm install s2-...
• 2,304

### Algorithm for offsetting a latitude/longitude by some amount of meters

I created a simple custom map on Google Maps that illustrates the estimation algorithm mentioned by the accepted answer (1/111111 == one meter). Feel free to see and play with it here: https://drive....
• 141

### Creating buffer circle x kilometers from point using Python?

By using linspace method, from numpy python module, you can use following more concise code: import numpy as np bufferLength = 100 # 0.1 km polygonSides = 360 x = 915884 y = 5042490 angles = np....
• 30.1k

### Oblate ellipsoids and latitude

To calculate the geodetic latitude of a point, we draw a line that passes through the point and is also perpendicular to the surface of the ellipsoid (called a Normal), and evaluate the angle it ...
• 3,846
Accepted

### Converting the local coordinates to GPS (lat, long)

Python would be so slow at this, I would use C++. Read your XYZ file using a normal ifstream then use strtok to break apart the single line into tokens and make the string tokens into double. You ...
• 25.6k

### Algorithm for offsetting a latitude/longitude by some amount of meters

It might make sense to project the point first. You could make something like this pseudo-code: falt_coordinate = latlon_to_utm(original_koordinate) new_flat_coordinate = flat_coordinate + (x,y) ...
• 550

### Manually transforming rotated lat/lon to regular lat/lon?

I recommend using gdal. One of the main geodata libraries, which is used under the hood of every other geoprocessing tool. Given you have a model run like *evspsbl_EUR-11_ICHEC-EC-...
• 251

### Calculating a point Lat/Lon from another Lat/Lon point angle

Point P1 is irrelevant, if it's a circle r will always be the same, this together with the bearing theta and the origin point O are what matters. To find theta, simply trig your way from your provided ...
• 3,171

### Algorithm for offsetting a latitude/longitude by some amount of meters

Here is python code for whuber's answer from math import cos, radians def meters_to_lat_lon_displacement(m, origin_latitude): lat = m/111111 lon = m/(111111 * cos(radians(origin_latitude))) ...
• 1,857

### Finding point in country furthest from boundary?

I think Voronoi polygons are the best approach. I enclose a Matlab function that does this quite efficiently. As input I use a set of border coordinates, x and y, including enclaves (i.e. Lesotho). ...
Accepted

### Oblate ellipsoids and latitude

There's no single "right answer" (to where the yellow dot goes). It all depends on what you want to preserve as you deform the ellipsoid. Let's start with the continents drawn on the reference ...
• 3,281

### Area between two longitudes?

I found an answer to my own question. I have just been frantically searching with the wrong point of view. It is just a wedge from a sphere. So you can use this: https://en.wikipedia.org/wiki/...
• 59

### Plotting a hyperbola, or, solving spherical triangles

I see several options: have a look at the decca application of the dutch navy https://www.defensie.nl/downloads/applicaties/2018/04/25/decca-setup Check if your coordinates of the transmitters does ...
• 1,170
Accepted

### How to calculate straight line distance from spherical distance

Thanks to trigonometric functions we know that where is your spherical distance, is the earth radius in km, and stands for "euclidian". Since the earth is only approximately spherical, you should ...
• 350
Accepted

### Find lat/long of Point 2 a given distance from Point 1

I don't really know R very well, but what you're describing reminded me of the transformTranslate function from TurfJS. Essentially you pass it coodrinates, a distance and an angular direction, and it ...
• 389
Accepted

### How can I compute global triangulation from longitude/latitude coordinates?

You want to find the three intersection points of three pairs of great circles given a point and a bearing. Formulae for great circle intersections are given here: http://www.movable-type.co.uk/...
• 65.4k
Accepted

### Distance of a Lat long from a Polyline

I think you have been fooled by CRS. Indeed, the lat/lng system kind of twists the forms. If you mathematically look at what you are trying to do, you can plot the points you give on a graph with ...
• 192

### Calculating third coordinate on earth given two points and their distances to third point EPSG:4326 (WGS84)

Note that in your example, it is no solution because the two points are distanced by 30 kilometers. Here a solution with pyproj for manage projection from EPSG: 4326 WGS84 to EPSG: 3857 Pseudo-...
• 15.8k
Accepted

### What is the area of my shapes?

All geometric operations that GeoPandas performs depends on Shapely package. Shapely performs all operations in the x-y plane. That means Shapely doesn't care if a shape is located at equator or at a ...
• 77.3k

• 14.6k
Accepted

### Calculate the distance between two points on a sphere (earth) going through the earth?

First, calculate the great circle distance, G, using your GIS or spherical trigonometry (or look for various questions on this site). Then calculate the angular distance, α = G / R. (R is globe radius....
• 8,981

### Different area values in aggregate function

The expression works correctly if applied on the layer itself (e.g. Field calculator or labels) - but not if you use it in another context, where you don't work on a layer - like your use case, where ...
• 73.4k
Accepted

### Interchangeability between ellipsoidal CRS, and spherical CRS with the authalic radius of the same ellipsoid?

Specifically for the distance between points, H3 calculates the distance with the haversine formula. Wikipedia states that this distance: "[...] cannot be guaranteed correct to better than 0.5%.&...
• 14.6k
1 vote
Accepted

### Calculate vx, vy and vz components from Lat,Lon, height and Time

The best way to go would be to find the Earth-centered XYZ coordinates of your 2 points with these formulas, then rotate them to find the ENU coordinates (East, North, Up, corresponding to your local ...
• 3,846

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