#include "gadt_basic.h"
#include "gadt_rect.h"
#include "gadt_circle.h"
#include "gadt_trig.h"
#include "gadt_point.h"
#include "gadt_segment.h"
#include "gadt_arc.h"
#include "gadt_polygon.h"
//#include "gadt_raster.h"
#include "gadt_time.h"
#include "gtseries.h"

/*----------------------------------------------------------------------
LIBRARY 
        GFC

OVERVIEW

         <CENTER>  Geographic Foundation Class (GFC) Library (Version 0.5) </CENTER>
	 <CENTER>              Liujian Qian  				     </CENTER>
	 <CENTER>                Sept. 1997   				     </CENTER>


        GFC, or Geographic Foundation Class library, is a
	set of C++ classes defining basic geographic data types, including
	points, lines, rectangles, circles, polylines, rings, (holely) polygons, 
	rasters, and other atomic data types such as integer, real, varchar. There is also
	an array ADT whose elements can be any of the above ADTs. GFC also features 
	abstractions of timestamps and time series which are useful in capturing the 
	dynamics of spatiotemporal data. 
	
	An extensive set of geographic data processing algorithms have been 
	implemented as methods belonging to individual ADTs. Furthermore, the
	"virtual method" mechanism of C++ is hevily used to simplify the code
	implementing common spatial operators such as "intersects", "covers",
	"is-inside", "distance", "area", "mbr (minimum bounding rectangle)"
	and so forth. 

	Additionaly each ADT also has methods to import data from a user supplied
	ASCII string or to export the data into such a string, which can
	then be trasnfered in a platform-independent way between different
	systems. 
	
	To help GIS programmers take advantage of existing standard database 
	management systems and the spatiotemporal data processing functions in GFC,
	an interface is provided so that spatiotemporal objects can be
	easily stored/restored into/from underlying databases (or files.)
	This is achieved by a pair of  pack()/unpack() methods overloaded for each
	GFC ADT, which packs/unpacks all the data members that are deemed 
	important into a stream of binary in-memory data. A class named DataPipe is 
	specificaly designed to provide flexible management and access of such 
	dynamic binary stream data.
		
	The overal picture of geographic data flowing between DB storage and
	a running application process, both aware of GFC, is described below. 
	Suppose an application 
	wants to store several objects of different ADTs into the data
	base. What it does is to create a data pipe, then pumps all the objects
	into the pipe, one after another, in a form like below:
	<pre>   
	GPoint   obj1; 
	GPolygon obj2;
	GRect	 obj3
	GRaster  obj4;
	DataPipe pipe1;

        // ... do something with obj1-4 here ...
	pipe1 << obj1 << obj2 <<< obj3 << obj4; 

	Note that the overloaded operators "<<" and corresponding
	">>" for DataPipe are just a wrap-up of ADTs' pack()/unpack()
	methods.

	Now  pipe1 contains the serialized (packed) data of all 4 objects.
	The application then ask the DBMS to store the whole chunk of data
	contained in the pipe (suppose the DBMS supports BLOB or similar 
	data types; it doesn't matter if it is just a general file):
	
	DB.storeData(pipe1.ptr(), pipe1.size());
	
	At some later time the application can retrieve the same chunk of
	data out of the database:

	pipe2.recycle();
	DB.fetchData(pipe2);
	
	it can then unpack  the data stream into individual ADT objects
	for further processing:
	pipe2 >> obj1 >> obj2 >> obj3 >> obj4;

	</pre>

	Finaly, GFC also has a set of auxiliary classes such as ArcView
	shapefile reader and data compression class (GFC uses the ZLIB
	library for raster data compression. ZLIB is a general purpose 
	compressing tool copyright Jean-lop Gailly and Mark Adler).

ORGANIZATION

       The organization of the GFC library is very simple. <b> GADT </b> is the
       base class for all the spatiotemporal ADTs and related classes.  
       Each derived ADT reimplements the common methods as defined  in <b>GADT</b>. It
       also implements ADT-specific methods to process the data of its concern.
       Most of the ADT classes begin with capital letter 'G'. The class GTI 
       provides run-time type information for ADTs, such as their string name and
       class size etc. To add a new ADT, one just need to inherit the GADT and
       add new entries in the GTI class.
       
       Application or system programmer can directly use these ADTs and utility
       classes; or they can derive from them and add/overload methods.
       
       GFC is best used as a set of extended data types to a standard dbms (either
       relational, object-relational or object-oriented databases). GFC may also
       be used in a standalone application if only the spatiotemporal data processing
       functions are needed (aka no permanent storage required). 
       
TODO

       GFC is still an infant. Many things the autor wish to see here haven't been
       included. Among others, the top items in the wish list are here:
       <ul>
       <li>   More ADTS, particularly TINs and Networks; 
       <li>   A generic (or universal) map-projection class; 
       <li>   Some spatial indexing class (A generic RTree class will be included soon); 
       <li>   More data format coversion classes (to import/export  HDF, DLG, TIGER, DXF,
           VRML and some commercial GIS formats); 
       <li>   More alogirthms, both of topology and statistics;
       <li>   More examples and documentation.
       </ul>
 


----------------------------------------------------------------------*/

/*
PLATFORMS
        
       GFC is developed on a PC running Linux (2.0), but is known to work on Sun
       Solaris platforms. Since it uses very little (virtually none) platform-specific
       features,  it should be portable to other platforms including Windows 95/NT
       without difficulty. 


COPYRIGHT

       GFC is authored by Liujian Qian and is under the GNU General Public License
       which allows its source code to be used/redistributed free of charge. See the 
       file COPYRIGHT acompanying the package for more details. 

ACKNOWLEDGEMENTS
       
       The author thanks Professor Donna Peuquet and other members of the Tempest
       project (and the related Apoala project), for the benifitial disscusions 
       ranging from algorithms, spatial analysis, GIS implementations to
       computer vision and science fictions.

SAMPLE CODE SEGMENTS
	
*/

	

Documentation generated by lqian@lqian-sun on Wed Jul 14 09:36:10 EDT 1999