BasicGeoLib_v100

hh hh at hyperhh.de
Thu Sep 12 16:16:33 EDT 2019


Some specialists may be interested in the following, please report if you have any problem with the stack.

BasicGeoLib is a collection of very basic functions for using geoPoints.

The points have to be in the format: longitude,latitude in that order,
as decimal numbers, as in GeoJSON, NOT in Google.
That is the first item (longitude) is a decimal in range -180 to 180,
the second item (latitude) is a decimal in range -90 to 90.
And the third item is, if needed, a time in seconds (not an elevation
value).

Credits: Two core functions are based on the js-lib
## https://github.com/manuelbieh/geolib (MIT licensed)
and ported to LiveCode.

Supported functions (all in group "geoAction", rightClick an action
button to edit the script):

* getDistance(point1,point2)
* getSpeed(point1,startSecs,point2,endSecs)
* isPointWithinRadius(centerPoint,radius,listOfPoints)
* orderByDistance(toPoint,fromList)
* getDistanceFromLine(point1,point2,fromList)
* getBoundsAndLoc(linesOfPoints)
* getPathLength(linesOfPoints)
* sexagesimalToDecimal(linesOfPoints)
* decimalToSexagesimal(linesOfPoints)

I found no time to prepare the stack as library, please just copy the
functions you need or make your own library.





More information about the use-livecode mailing list