GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
geoLnArr(3) Geography C functions geoLnArr(3)

See the file man.macros.

GeoLnArr, GeoLnArrCreate, GeoLnArrSetDescr, GeoLnArrSetAlloc, GeoLnArrAddLine, GeoLnArrPutLine, GeoLnArrContainGeoPt, GeoLnArrGetDescr, GeoLnArrGetInfo, GeoLnArrGetLine, GeoLnArrFree, GeoLnArrDestroy, - manage GeoLnArr objects, which are containers for GeoLn objects.

#include <geoLines.h>
GeoLnArr GeoLnArrCreate(unsigned nLinesMax);
void GeoLnArrSetAlloc(GeoLnArr geoLnArr, unsigned nLinesMax);
void GeoLnArrFree(GeoLnArr geoLnArr);
void GeoLnArrDestroy(GeoLnArr geoLnArr);
void GeoLnArrSetDescr(GeoLnArr geoLnArr, CONST char *descr);
int GeoLnArrAddLine(GeoLn geoLn, GeoLnArr geoLnArr);
int GeoLnArrPutLine(GeoLn geoLn, GeoLnArr geoLnArr);
int GeoLnArrContainGeoPt(GeoPt geoPt, GeoLnArr geoLnArr);
char *GeoLnArrGetDescr(GeoLnArr geoLnArr);
struct GeoLnArrInfo GeoLnArrGetInfo(GeoLnArr lnArr);
GeoLn GeoLnArrGetLine(GeoLnArr geoLnArr, unsigned n);

These functions create, manipulate, and access geolinearrays, which are arrays of geolines. Geolines are arrays of geographic points. See geoLn(3) and geography(3) for information on geolines and geographic points. Geolinearrays are represented as objects of type GeoLnArr.

GeoLnArrCreate creates and initializes a geolinearray with storage for up to nLinesMax geolines. It returns a new geolinearray, or NULL if it fails. When no longer needed, the array should be destroyed with a call to GeoLnArrDestroy.

GeoLnArrSetAlloc sets the internal allocation for geoLnArr so that it can hold up to nLinesMax geolines.

GeoLnArrFree frees internal storage in geoLnArr.

GeoLnArrDestroy frees internal storage in geoLnArr and frees geoLnArr.

GeoLnArrSetDescr sets the descriptor for geoLnArr to descr. The descriptor is a text string with no required format which normally contains human-readable information about the geolinearray.

GeoLnArrGetDescr returns the descriptor for geoLnArr. The return value should not be modified by the caller.

GeoLnArrAddLine copies geoLn onto the end of geoLnArr. It automatically increases geoLnArr's allocation if necessary. GeoLnArrAddLine returns true if successful, otherwise it returns false, leaving geoLnArr untouched.

GeoLnArrPutLine behaves similarly to GeoLnArrAddLine, except that it transfers geoLn onto the end of geoLnArr, instead of making a copy. geoLn becomes the property of geoLnArr. The user should not subsequently modify or delete geoLn. GeoLnArrPutLine is faster and more efficient with memory and GeoLnArrAddLine. GeoLnArrPutLine returns true if successful, otherwise it returns false, leaving geoLnArr untouched.

GeoLnArrContainGeoPt returns true if any geoline in geoLnArr contains geoPt, as determined by GeoLnContainPt (see geoLn(3)).

GeoLnArrGetInfo returns a structure of form: struct GeoLnArrInfo { unsigned nLines; /* Number of lines */ unsigned nPts; /* Number of points for all lines */ unsigned nMax; /* Number of points in longest line */ Angle latMax; /* Max longitude for all lines */ Angle lonMax; /* Max latitude for all lines */ Angle latMin; /* Min longitude for all lines */ Angle lonMin; /* Min latitude for all lines */ }; in which nLines is the number of lines in geoLnArr, nPts is the number of points for all lines, nMax is the number of points in longest line, latMax is the maximum longitude for all lines in Angle units, lonMax is the maximum latitude for all lines in Angle units, latMin is the minimum longitude for all lines in Angle units, and lonMin is the minimum latitude for all lines in Angle units. See the geography (3) man page for information on Angle units.

GeoLnArrGetLine returns the geoline with index n from geoLnArr. The first geoline in a geolinearray has index 0. It returns NULL if n is out of bounds.

geoLn, geography

GeoLnArr, geolinearray, geography, container

Gordon Carrie (user0@tkgeomap.org)
2 Geography

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.