Skip site navigation (1)Skip section navigation (2)

FreeBSD Manual Pages

  
 
  

home | help
geoLnArr(3)		     Geography C functions		   geoLnArr(3)

NAME
       GeoLnArr,  GeoLnArrCreate, GeoLnArrSetDescr, GeoLnArrSetAlloc, GeoLnAr-
       rAddLine, GeoLnArrPutLine, GeoLnArrContainGeoPt,	GeoLnArrGetDescr,  Ge-
       oLnArrGetInfo, GeoLnArrGetLine, GeoLnArrFree, GeoLnArrDestroy, -	manage
       GeoLnArr	objects, which are containers for GeoLn	objects.

SYNOPSIS
       #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);

DESCRIPTION
       These functions create, manipulate, and access geolinearrays, which are
       arrays of geolines.  Geolines are arrays	of geographic points.  See ge-
       oLn(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 de-
       scriptor	is a text string with no required format which	normally  con-
       tains 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  automati-
       cally  increases	 geoLnArr's  allocation	if necessary.  GeoLnArrAddLine
       returns true if successful, otherwise it	returns	false,	leaving	 geoL-
       nArr 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	subse-
       quently modify or delete	geoLn.	GeoLnArrPutLine	is faster and more ef-
       ficient	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 maxi-
       mum latitude for	all lines in Angle units, latMin is the	minimum	longi-
       tude 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 in-
       formation 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.

SEE ALSO
       geoLn, geography

KEYWORDS
       GeoLnArr, geolinearray, geography, container

AUTHOR
       Gordon Carrie (user0@tkgeomap.org)

Geography			       2			   geoLnArr(3)

NAME | SYNOPSIS | DESCRIPTION | SEE ALSO | KEYWORDS | AUTHOR

Want to link to this manual page? Use this URL:
<https://www.freebsd.org/cgi/man.cgi?query=geoLnArr&sektion=3&manpath=FreeBSD+12.0-RELEASE+and+Ports>

home | help