chickadee » geo-utils

Outdated egg!

This is an egg for CHICKEN 4, the unsupported old release. You're almost certainly looking for 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 egg index. Otherwise, please consider porting this egg to the current version of CHICKEN.

geo-utils

Geographic Utilities

TOC »

Documentation

API for constructing and manipulating geographic data.

Module geopoint

Usage

(require-extension geopoint)

Argument Conventions

GP
geopoint.
LAT
latitude real.
LON
longitude real.

make-geopoint

make-geopoint LAT LONprocedure

geopoint?

geopoint? OBJprocedure

check-geopoint

check-geopoint LOC OBJ #!optional VARNAMprocedure

error-geopoint

error-geopoint LOC OBJ #!optional VARNAMprocedure

geopoint-latitude

geopoint-latitude GPprocedure

geopoint-longitude

geopoint-longitude GPprocedure

geopoint-strictly-above?

geopoint-strictly-above? GP1 GP2procedure

geopoint-above?

geopoint-above? GP1 GP2procedure

geopoint-strictly-below?

geopoint-strictly-below? GP1 GP2procedure

geopoint-below?

geopoint-below? GP1 GP2procedure

geopoint-strictly-left?

geopoint-strictly-left? GP1 GP2procedure

geopoint-left?

geopoint-left? GP1 GP2procedure

geopoint-strictly-right?

geopoint-strictly-right? GP1 GP2procedure

geopoint-right?

geopoint-right? GP1 GP2procedure

geopoint=

geopoint= GP1 GP2procedure

geopoint<

geopoint< GP1 GP2procedure

geopoint>

geopoint> GP1 GP2procedure

geopoint<=

geopoint<= GP1 GP2procedure

geopoint>=

geopoint>= GP1 GP2procedure

Module geobox

Usage

(require-extension geobox)

Argument Conventions

GB
geobox.

make-geobox

make-geobox GP-MIN GP-MAXprocedure

geobox?

geobox? OBJprocedure

check-geobox

check-geobox LOC OBJ #!optional VARNAMprocedure

error-geobox

error-geobox LOC OBJ #!optional VARNAMprocedure

geobox-minimum

geobox-minimum GBprocedure

geobox-maximum

geobox-maximum GBprocedure

geobox=

geobox= GB1 GB2procedure

geobox<

geobox< GB1 GB2procedure

geobox>

geobox> GB1 GB2procedure

geobox<=

geobox<= GB1 GB2procedure

geobox>=

geobox>= GB1 GB2procedure

geopoint-within-box

geopoint-within-box GP GBprocedure

Module geopolygon

Usage

(require-extension geopolygon)

Argument Conventions

GPOLY
geopolygon.

make-geopolygon

make-geopolygon GP ...procedure

GP is a geopoint.

make-geopolygon GPSprocedure

GPS is (or (list-of geopoint) (vector-of geopoint)).

geopolygon?

geopolygon? OBJprocedure

check-geopolygon

check-geopolygon LOC OBJ #!optional VARNAMprocedure

error-geopolygon

error-geopolygon LOC OBJ #!optional VARNAMprocedure

geopolygon

geopolygon GP...procedure

geopolygon-closed?

geopolygon-closed? GPOLYprocedure

Polygon has the same initial and final geopoint.

geopolygon-open?

geopolygon-open? GPOLYprocedure

Polygon does not have the same initial and final geopoint.

geopolygon-bounding-box

geopolygon-bounding-box GPOLYprocedure

Module geopoint-utils

Usage

(require-extension geopoint-utils)

geopoint-in-closed-polygon?

(geopoint-in-closed-polygon? GP GPOLY [INTERSECTS? intersects?-pnp]) => booleanprocedure

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

intersects?-pnp PI PJ LAT LONprocedure

intersects?-pip

intersects?-pip PI PJ LAT LONprocedure

Module geo-utils

Usage

(require-extension geo-utils)

pythagorean-distance

pythagorean-distance LAT1 LON1 LAT2 LON2procedure

pythagorean-distance*

pythagorean-distance* LAT1 LON1 LAT2 LON2procedure

spherical-surface-distance

(spherical-surface-distance LAT1 LON1 LAT2 LON2 (R EARTH-RADIUS-KILOMETERS)) => realprocedure

great-circle-distance

(great-circle-distance LAT1 LON1 LAT2 LON2 (R EARTH-RADIUS-KILOMETERS)) => realprocedure

great-circle-distance-radians

(great-circle-distance-radians LAT1 LON1 LAT2 LON2 (R EARTH-RADIUS-KILOMETERS)) => realprocedure

approximate-ellipsoid-distance

(approximate-ellipsoid-distance LAT1 LON1 LAT2 LON2 (R EARTH-RADIUS-KILOMETERS) (F EARTH-FLATTENING)) => realprocedure

great-circle-azimuth

(great-circle-azimuth LAT1 LON1 LAT2 LON2 [PREC 5]) => realprocedure

great-circle-position

(great-circle-position LAT LON DIS AZI (R EARTH-RADIUS-KILOMETERS)) => (values latitude longitude)procedure

Module geo-dms

Usage

(require-extension geo-dms)

Argument Conventions

D
degrees real.
M
minutes real.
S
seconds real.
DEG
degreesreal.
LAT?
latitude? boolean.
PAD
padding between elements string.
LEADING-DIR?
compass direction is prefix?

degree-minute-second-text

degree-minute-second-text #!optional DMS-TEXTprocedure

DMS-TEXT is a 3 element list of string of the form (<degrees suffix> <minutes suffix> <seconds suffix>).

dms->degree

dms->degree D M Sprocedure

degree->dms

degree->dms DEGprocedure

Returns the degree+minutes+seconds for the degrees DEG.

dms->string

(dms->string D M S [LAT? [LEADING-DIR? [PAD ""]]]) => stringprocedure

Example: 122°45'10"W

dms->string*

(dms->string* D M S [PAD ""]) => stringprocedure

Example: 122°45'10"

string-dms->degree

string-dms->degree STR #!optional LAT?procedure

Returns the degrees for string form of dms STR.

string->degree

string->degree STR #!optional LAT?procedure

Synonym of string-dms->degree.

degree->string

(degree->string DEG [LAT? [LEADING-DIR? [PAD ""]]]) => stringprocedure

Returns the dms-string for the degrees DEG.

Module globe

Usage

(require-extension geo-globe)

make-globe

make-globe RADIUS FLATTENINGprocedure

globe?

globe? OBJprocedure

check-globe

check-globe LOC OBJ #!optional VARNAMprocedure

error-globe

error-globe LOC OBJ #!optional VARNAMprocedure

globe-radius-kilometers

globe-radius-kilometers GLOBEprocedure

globe-flattening-factor

globe-flattening-factor GLOBEprocedure

spherical-surface-distance

spherical-surface-distance GLOBE GP1 GP2procedure

great-circle-distance

great-circle-distance GLOBE GP1 GP2procedure

great-circle-distance-radians

great-circle-distance-radians GLOBE GP1 GP2procedure

approximate-ellipsoid-distance

approximate-ellipsoid-distance GLOBE GP1 GP2procedure

great-circle-azimuth

(great-circle-azimuth GP1 GP2 [PRECISION 5]) => numberprocedure

great-circle-position

great-circle-position GLOBE GP DISTANCE AZIMUTHprocedure

Module earth

Usage

(require-extension geo-earth)

*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

make-earthprocedure

Bugs & Limitations

Notes

Requirements

miscmacros moremacros numbers mathh vector-lib check-errors

setup-helper test

Author

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.

Contents »