geodeasy
https://github.com/grizzlei/geodeasy
Geodeasy is an open source toolkit for a set of basic and complicated geodetic computations. You can use its online tools, its public API or you can directly include its source code to your project. If you have any improvements, new features or if you’ve found any bugs or errors, feel free to submit an issue or a pull request on project’s github repository. The project is open to contributions.
Geodeasy online tools:
Destination calculation on ellipsoid
Great circle distance calculation on ellipsoid
Geographic to cartesian (earth-centered, earth-fixed) on ellipsoid
Cartesian to geographic (earth-centered, earth-fixed) on ellipsoid
Universal Transverse Mercator to geographic on ellipsoid
Geographic to Universal Transverse Mercator on ellipsoid
Transverse Mercator to geographic on ellipsoid
Geographic to Transverse Mercator on ellipsoid
API documentation and examples
A typical GET request to Geodeasy APIs:
A typical response body from Geodeasy APIs:
{
"payload": {
"latitude": 35.22672767,
"longitude": 41.17457877,
"azimuth": 22.02942516
},
"error": {
"code": 0,
"what": "GEODEASY_NO_ERROR"
},
"warnings": []
}
If something goes wrong, a descriptive warning or a pair of error code and text will be returned.
Try out Geodeasy public REST API:
[Try] /api/v1/destination.php
Synopsis: Find latitude, longitude and the azimuth at the destination point on ellipsoid from given first point coordinates, azimuth and distance.
Parameters: latitude (°), longitude (°), azimuth (°), distance (m), ellipsoid parameters a and b.
Returns: latitude (°), longitude (°) and azimuth (°) at destination point.
[Try] /api/v1/great_circle_distance.php
Synopsis: Find the distance between two points on ellipsoid.
Parameters: ellipsoidal coordinates of first and second points (latitude1, longitude1, latitude2, longitude2), ellipsoid parameters a and b.
Returns: azimuth (°) at the first point, reverse azimuth (reverse_azimuth) (°) at the second point and the distance (m).
[Try] /api/v1/geographic_to_xyz.php
Synopsis: Convert ellipsoidal coordinates of a point to x, y and z (ECEF) coordinates.
Parameters: latitude (°), longitude (°) and ellipsoidal height of the point, ellipsoid parameters a and b.
Returns: x (m), y (m), z (m) of the point.
[Try] /api/v1/xyz_to_geographic.php
Synopsis: Convert cartesian coordinates to ellipsoidal coordinates; latitude, longitude and height.
Parameters: x (m), y (m), z (m) of the point and ellipsoid parameters a and b.
Returns: latitude (°), longitude (°) and ellipsoidal height of the given point.
[Try] /api/v1/geographic_to_utm.php
Synopsis: Convert ellipsoidal coordinates of a point to Universal Transverse Mercator (UTM) projection coordinates.
Parameters: latitude (°), longitude (°) and ellipsoid parameters a and b.
Returns: easting (m), northing (m), utm_zone and hemisphere.
[Try] /api/v1/utm_to_geographic.php
Synopsis: Convert Universal Transverse Mercator (UTM) projection coordinates to latitude, longitude on a given ellipsoid.
Parameters: easting (m), northing (m), UTM zone (utm_zone), hemisphere and ellipsoid parameters a and b.
Returns: latitude, longitude of the point.
[Try] /api/v1/geographic_to_tm.php
Synopsis: Convert ellipsoidal coordinates to Transverse Mercator projection coordinates.
Parameters: latitude (°) and longitude (°) of the point, origin latitude (lat0) (°), central meridian (lon0) (°), scale factor (k0) and ellipsoid parameters a and b.
Returns: easting (m), northing (m) and hemisphere of the point.
[Try] /api/v1/tm_to_geographic.php
Synopsis: Convert Transverse Mercator projection coordinates to ellipsoidal coordinates.
Parameters: easting (m), northing (m), hemisphere, origin latitude (lat0) (°), central meridian (lon0) (°), scale factor (k0) and ellipsoid parameters a and b.
Returns: latitude (°) and longitude (°) of the point.
[Try] /api/v1/geographic_to_lcc.php
Synopsis: Convert ellipsoidal coordinates to Lambert Conformal Conic (LCC) projection coordinates.
Parameters: latitude (°) and longitude (°) of the point, first standard parallel (lat1) (°), second standard parallel (lat2) (°), origin latitude (lat0) (°), central meridian (lon0) (°) and ellipsoid parameters a and b.
Returns: easting (m) and northing (m) of the point.
[Try] /api/v1/lcc_to_geographic.php
Source & License
You can find Geodeasy source code here: github.com/grizzlei/geodeasy
MIT License
Copyright (c) 2022 Hasan Karaman
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the “Software”), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED “AS IS”, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
This is a licence-free software, it can be used by anyone who try to build a better world.
Leave a Reply