[[tags: egg]] == geo-utils Geographic Utilities [[toc:]] == Documentation API for constructing and manipulating geographic data. === Argument Conventions === Usage (require-extension geopoint) === Argument Conventions ; {{GP}} : {{geopoint}}. ; {{LAT}} : latitude {{real}}. ; {{LON}} : longitude {{real}}. === make-geopoint (make-geopoint LAT LON) => geopoint === geopoint? (geopoint? OBJ) => boolean === check-geopoint (check-geopoint LOC OBJ [VARNAM]) => geopoint === error-geopoint (error-geopoint LOC OBJ [VARNAM]) === geopoint-latitude (geopoint-latitude GP) => real === geopoint-longitude (geopoint-longitude GP) => real === geopoint-strictly-above (geopoint-strictly-above GP1 GP2) => boolean === geopoint-above (geopoint-above GP1 GP2) => boolean === geopoint-strictly-below (geopoint-strictly-below GP1 GP2) => boolean === geopoint-below (geopoint-below GP1 GP2) => boolean === geopoint-strictly-left (geopoint-strictly-left GP1 GP2) => boolean === geopoint-left (geopoint-left GP1 GP2) => boolean === geopoint-strictly-right (geopoint-strictly-right GP1 GP2) => boolean === geopoint-right (geopoint-right GP1 GP2) => boolean === geopoint= (geopoint= GP1 GP2) => boolean === geopoint< (geopoint< GP1 GP2) => boolean === geopoint> (geopoint> GP1 GP2) => boolean === geopoint<= (geopoint<= GP1 GP2) => boolean === geopoint>= (geopoint>= GP1 GP2) => boolean === Usage (require-extension geobox) === Argument Conventions ; {{GB}} : {{geobox}}. === make-geobox (make-geobox GP-MIN GP-MAX) => geobox === geobox? (geobox? OBJ) => boolean === check-geobox (check-geobox LOC OBJ [VARNAM]) => geobox === error-geobox (error-geobox LOC OBJ [VARNAM]) === geobox-minimum (geobox-minimum GB) => geopoint === geobox-maximum (geobox-maximum GB) => geopoint === geobox= (geobox= GB1 GB2) => boolean === geobox< (geobox< GB1 GB2) => boolean === geobox> (geobox> GB1 GB2) => boolean === geobox<= (geobox<= GB1 GB2) => boolean === geobox>= (geobox>= GB1 GB2) => boolean === geopoint-within-box (geopoint-within-box GP GB) => boolean === Usage (require-extension geopolygon) === Argument Conventions ; {{GPOLY}} : {{geopolygon}}. === make-geopolygon (make-geopolygon GP-COLL) => geopolygon {{GP-COLL}} is {{list}} or {{vector}} of {{geopoint}}. === geopolygon? (geopolygon? OBJ) => boolean === check-geopolygon (check-geopolygon LOC OBJ [VARNAM]) => geopolygon === error-geopolygon (error-geopolygon LOC OBJ [VARNAM]) === geopolygon (geopolygon GP...) => geopolygon === geopolygon-closed? (geopolygon-closed? GPOLY) => boolean Polygon has the same initial and final {{geopoint}}. === geopolygon-open? (geopolygon-open? GPOLY) => boolean Polygon does not have the same initial and final {{geopoint}}. === geopolygon-bounding-box (geopolygon-bounding-box GPOLY) => geobox === Usage (require-extension geopoint-utils) === geopoint-in-closed-polygon? (geopoint-in-closed-polygon? GP GPOLY) => boolean Treats an open geopolygon as closed. === Usage (require-extension geo-utils) === earth-flattening earth-flattening === earth-radius-miles earth-radius-miles === earth-radius-kilometers earth-radius-kilometers === pythagorean-distance (pythagorean-distance LAT1 LON1 LAT2 LON2) => real === pythagorean-distance* (pythagorean-distance* LAT1 LON1 LAT2 LON2) => real === spherical-surface-distance (spherical-surface-distance LAT1 LON1 LAT2 LON2 (R EARTH-RADIUS-MILES)) => real === great-circle-distance (great-circle-distance LAT1 LON1 LAT2 LON2 (R EARTH-RADIUS-MILES)) => real === great-circle-distance-radians (great-circle-distance-radians LAT1 LON1 LAT2 LON2 (R EARTH-RADIUS-MILES)) => real === approximate-ellipsoid-distance (approximate-ellipsoid-distance LAT1 LON1 LAT2 LON2 (R EARTH-RADIUS-MILES)) => real === great-circle-azimuth (great-circle-azimuth LAT1 LON1 LAT2 LON2 [PREC 5]) => real === great-circle-position (great-circle-position LAT LON DIS AZI (R EARTH-RADIUS-MILES)) => real === Usage (require-extension geo-dms) === Argument Conventions ; {{D}} : degrees {{real}}. ; {{M}} : minutes {{real}}. ; {{S}} : seconds {{real}}. ; {{LAT?}} : latitude? {{boolean}}. ; {{PAD}} : padding between elements {{string}}. === degree-minute-second-text (degree-minute-second-text [DMS-TEXT]) => (list-of string) {{DMS-TEXT}} is a 3 element {{list}} of {{string}} of the form {{( )}}. === dms->degree (dms->degree D M S) => real === degree->dms (degree->dms DEG) => (values D M S) Returns the degree+minutes+seconds for the degrees {{DEG}} {{real}}. === dms->string (dms->string D M S [LAT? [LEADING-DIR? [PAD ""]]]) => string ; {{LEADING-DIR?}} : compass direction is prefix? === dms->string* (dms->string* D M S [PAD ""]) => string === string-dms->degree (string-dms->degree STR [LAT?]) => real Returns the degrees for string form of dms {{STR}}. == Bugs & Limitations * Probably some. == Notes * Incomplete in testing and functionality. Insufficient in design. == Author [[/users/kon-lovett|Kon Lovett]] == Version history ; 0.1.0 : Hello == License Copyright (C) 2017 Kon Lovett. All rights reserved. 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 ASIS, 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.