Wiki
Download
Manual
Eggs
API
Tests
Bugs
show
edit
history
You can edit this page using
wiki syntax
for markup.
Article contents:
== Outdated egg! This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for [[/eggref/5/geo-utils|the CHICKEN 5 version of this egg]], if it exists. If it does not exist, there may be equivalent functionality provided by another egg; have a look at the [[https://wiki.call-cc.org/chicken-projects/egg-index-5.html|egg index]]. Otherwise, please consider porting this egg to the current version of CHICKEN. [[tags: egg]] == geo-utils Geographic Utilities [[toc:]] == Documentation API for constructing and manipulating geographic data. === Module geopoint ==== Usage <enscript language=scheme> (require-extension geopoint) </enscript> ==== Argument Conventions ; {{GP}} : {{geopoint}}. ; {{LAT}} : latitude {{real}}. ; {{LON}} : longitude {{real}}. ==== make-geopoint <procedure>(make-geopoint LAT LON) => geopoint</procedure> ==== geopoint? <procedure>(geopoint? OBJ) => boolean</procedure> ==== check-geopoint <procedure>(check-geopoint LOC OBJ [VARNAM]) => geopoint</procedure> ==== error-geopoint <procedure>(error-geopoint LOC OBJ [VARNAM])</procedure> ==== geopoint-latitude <procedure>(geopoint-latitude GP) => real</procedure> ==== geopoint-longitude <procedure>(geopoint-longitude GP) => real</procedure> ==== geopoint-strictly-above? <procedure>(geopoint-strictly-above? GP1 GP2) => boolean</procedure> ==== geopoint-above? <procedure>(geopoint-above? GP1 GP2) => boolean</procedure> ==== geopoint-strictly-below? <procedure>(geopoint-strictly-below? GP1 GP2) => boolean</procedure> ==== geopoint-below? <procedure>(geopoint-below? GP1 GP2) => boolean</procedure> ==== geopoint-strictly-left? <procedure>(geopoint-strictly-left? GP1 GP2) => boolean</procedure> ==== geopoint-left? <procedure>(geopoint-left? GP1 GP2) => boolean</procedure> ==== geopoint-strictly-right? <procedure>(geopoint-strictly-right? GP1 GP2) => boolean</procedure> ==== geopoint-right? <procedure>(geopoint-right? GP1 GP2) => boolean</procedure> ==== geopoint= <procedure>(geopoint= GP1 GP2) => boolean</procedure> ==== geopoint< <procedure>(geopoint< GP1 GP2) => boolean</procedure> ==== geopoint> <procedure>(geopoint> GP1 GP2) => boolean</procedure> ==== geopoint<= <procedure>(geopoint<= GP1 GP2) => boolean</procedure> ==== geopoint>= <procedure>(geopoint>= GP1 GP2) => boolean</procedure> === Module geobox ==== Usage <enscript language=scheme> (require-extension geobox) </enscript> ==== Argument Conventions ; {{GB}} : {{geobox}}. ==== make-geobox <procedure>(make-geobox GP-MIN GP-MAX) => geobox</procedure> ==== geobox? <procedure>(geobox? OBJ) => boolean</procedure> ==== check-geobox <procedure>(check-geobox LOC OBJ [VARNAM]) => geobox</procedure> ==== error-geobox <procedure>(error-geobox LOC OBJ [VARNAM])</procedure> ==== geobox-minimum <procedure>(geobox-minimum GB) => geopoint</procedure> ==== geobox-maximum <procedure>(geobox-maximum GB) => geopoint</procedure> ==== geobox= <procedure>(geobox= GB1 GB2) => boolean</procedure> ==== geobox< <procedure>(geobox< GB1 GB2) => boolean</procedure> ==== geobox> <procedure>(geobox> GB1 GB2) => boolean</procedure> ==== geobox<= <procedure>(geobox<= GB1 GB2) => boolean</procedure> ==== geobox>= <procedure>(geobox>= GB1 GB2) => boolean</procedure> ==== geopoint-within-box <procedure>(geopoint-within-box GP GB) => boolean</procedure> === Module geopolygon ==== Usage <enscript language=scheme> (require-extension geopolygon) </enscript> ==== Argument Conventions ; {{GPOLY}} : {{geopolygon}}. ==== make-geopolygon <procedure>(make-geopolygon GP ...) => geopolygon</procedure> {{GP}} is a {{geopoint}}. <procedure>(make-geopolygon GPS) => geopolygon</procedure> {{GPS}} is {{(or (list-of geopoint) (vector-of geopoint))}}. ==== geopolygon? <procedure>(geopolygon? OBJ) => boolean</procedure> ==== check-geopolygon <procedure>(check-geopolygon LOC OBJ [VARNAM]) => geopolygon</procedure> ==== error-geopolygon <procedure>(error-geopolygon LOC OBJ [VARNAM])</procedure> ==== geopolygon <procedure>(geopolygon GP...) => geopolygon</procedure> ==== geopolygon-closed? <procedure>(geopolygon-closed? GPOLY) => boolean</procedure> Polygon has the same initial and final {{geopoint}}. ==== geopolygon-open? <procedure>(geopolygon-open? GPOLY) => boolean</procedure> Polygon does not have the same initial and final {{geopoint}}. ==== geopolygon-bounding-box <procedure>(geopolygon-bounding-box GPOLY) => geobox</procedure> === Module geopoint-utils ==== Usage <enscript language=scheme> (require-extension geopoint-utils) </enscript> ==== geopoint-in-closed-polygon? <procedure>(geopoint-in-closed-polygon? GP GPOLY [INTERSECTS? intersects?-pnp]) => boolean</procedure> Is the {{(: GP geopoint)}} in the {{(: GPOLY (or (vector-of geopoint) (list-of geopoint)))}}? {{INTERSECTS?}} is a {{(procedure ((: PI geopoint) (: PJ geopoint) (: LAT real) (: LON real)) => boolean)}} testing for ray intersection. Treats an open geopolygon as closed. ==== intersects?-pnp <procedure>(intersects?-pnp PI PJ LAT LON) => boolean</procedure> ==== intersects?-pip <procedure>(intersects?-pip PI PJ LAT LON) => boolean</procedure> === Module geo-utils ==== Usage <enscript language=scheme> (require-extension geo-utils) </enscript> ==== pythagorean-distance <procedure>(pythagorean-distance LAT1 LON1 LAT2 LON2) => real</procedure> ==== pythagorean-distance* <procedure>(pythagorean-distance* LAT1 LON1 LAT2 LON2) => real</procedure> ==== spherical-surface-distance <procedure>(spherical-surface-distance LAT1 LON1 LAT2 LON2 (R EARTH-RADIUS-KILOMETERS)) => real</procedure> ==== great-circle-distance <procedure>(great-circle-distance LAT1 LON1 LAT2 LON2 (R EARTH-RADIUS-KILOMETERS)) => real</procedure> ==== great-circle-distance-radians <procedure>(great-circle-distance-radians LAT1 LON1 LAT2 LON2 (R EARTH-RADIUS-KILOMETERS)) => real</procedure> ==== approximate-ellipsoid-distance <procedure>(approximate-ellipsoid-distance LAT1 LON1 LAT2 LON2 (R EARTH-RADIUS-KILOMETERS) (F EARTH-FLATTENING)) => real</procedure> ==== great-circle-azimuth <procedure>(great-circle-azimuth LAT1 LON1 LAT2 LON2 [PREC 5]) => real</procedure> ==== great-circle-position <procedure>(great-circle-position LAT LON DIS AZI (R EARTH-RADIUS-KILOMETERS)) => (values latitude longitude)</procedure> === Module geo-dms ==== Usage <enscript language=scheme> (require-extension geo-dms) </enscript> ==== Argument Conventions ; {{D}} : degrees {{real}}. ; {{M}} : minutes {{real}}. ; {{S}} : seconds {{real}}. ; {{DEG}} : degrees{{real}}. ; {{LAT?}} : latitude? {{boolean}}. ; {{PAD}} : padding between elements {{string}}. ; {{LEADING-DIR?}} : compass direction is prefix? ==== degree-minute-second-text <procedure>(degree-minute-second-text [DMS-TEXT]) => (list-of string)</procedure> {{DMS-TEXT}} is a 3 element {{list}} of {{string}} of the form {{(<degrees suffix> <minutes suffix> <seconds suffix>)}}. ==== dms->degree <procedure>(dms->degree D M S) => real</procedure> ==== degree->dms <procedure>(degree->dms DEG) => (values D M S)</procedure> Returns the degree+minutes+seconds for the degrees {{DEG}}. ==== dms->string <procedure>(dms->string D M S [LAT? [LEADING-DIR? [PAD ""]]]) => string</procedure> Example: 122°45'10"W ==== dms->string* <procedure>(dms->string* D M S [PAD ""]) => string</procedure> Example: 122°45'10" ==== string-dms->degree <procedure>(string-dms->degree STR [LAT?]) => real</procedure> Returns the degrees for string form of dms {{STR}}. ==== string->degree <procedure>(string->degree STR [LAT?]) => real</procedure> Synonym of {{string-dms->degree}}. ==== degree->string <procedure>(degree->string DEG [LAT? [LEADING-DIR? [PAD ""]]]) => string</procedure> Returns the dms-string for the degrees {{DEG}}. === Module globe ==== Usage <enscript language=scheme> (require-extension geo-globe) </enscript> ==== make-globe <procedure>(make-globe RADIUS FLATTENING) => globe</procedure> ==== globe? <procedure>(globe? OBJ) => boolean</procedure> ==== check-globe <procedure>(check-globe LOC OBJ [VARNAM]) => globe</procedure> ==== error-globe <procedure>(error-globe LOC OBJ [VARNAM])</procedure> ==== globe-radius-kilometers <procedure>(globe-radius-kilometers GLOBE) => number</procedure> ==== globe-flattening-factor <procedure>(globe-flattening-factor GLOBE) => number</procedure> ==== spherical-surface-distance <procedure>(spherical-surface-distance GLOBE GP1 GP2) => number</procedure> ==== great-circle-distance <procedure>(great-circle-distance GLOBE GP1 GP2) => number</procedure> ==== great-circle-distance-radians <procedure>(great-circle-distance-radians GLOBE GP1 GP2) => number</procedure> ==== approximate-ellipsoid-distance <procedure>(approximate-ellipsoid-distance GLOBE GP1 GP2) => number</procedure> ==== great-circle-azimuth <procedure>(great-circle-azimuth GP1 GP2 [PRECISION 5]) => number</procedure> ==== great-circle-position <procedure>(great-circle-position GLOBE GP DISTANCE AZIMUTH) => geopoint</procedure> === Module earth ==== Usage <enscript language=scheme> (require-extension geo-earth) </enscript> ==== *earth-flattening* <variable>*earth-flattening* => real</variable> ==== *earth-radius-miles* <variable>*earth-radius-miles* => real</variable> ==== *earth-radius-kilometers* <variable>*earth-radius-kilometers* => real</variable> ==== make-earth <procedure>(make-earth) => globe</procedure> == Bugs & Limitations * Probably some. == Notes * The relational predicates are rather useless. * Incomplete. == Requirements [[miscmacros]] [[moremacros]] [[numbers]] [[mathh]] [[vector-lib]] [[check-errors]] [[setup-helper]] [[test]] == Author [[/users/kon-lovett|Kon Lovett]] == Version history ; 0.5.0 : Add {{earth}}. ; 0.4.0 : SI default. Add {{globe}}. ; 0.3.2 : Uses numbers. ; 0.3.1 : Uses test. ; 0.3.0 : . ; 0.2.0 : . ; 0.1.1 : . ; 0.1.0 : Hello == License Copyright (C) 2017-2018 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.
Description of your changes:
I would like to authenticate
Authentication
Username:
Password:
Spam control
What do you get when you add 5 to 8?