Main Page   Class Hierarchy   Compound List   File List   Compound Members  

Projections.h

00001 //
00002 // Projections.h
00003 //
00004 // Copyright (c) 2001 Virtual Terrain Project
00005 // Free for all uses, see license.txt for details.
00006 //
00007 // Derived from public-domain USGS software.
00008 //
00009 
00010 #ifndef PROJECTIONSH
00011 #define PROJECTIONSH
00012 
00013 //
00014 // Enumeration of the Datum types
00015 //
00016 // This list of Datums was originally from the USGS "ProjectionLib" library
00017 // and provides a more concise way to represent a Datum than the string
00018 // values used by OGRSpatialReference.
00019 //
00020 enum DATUM { ADINDAN = 0, ARC1950, ARC1960, AUSTRALIAN_GEODETIC_1966,
00021              AUSTRALIAN_GEODETIC_1984, CAMP_AREA_ASTRO, CAPE,
00022              EUROPEAN_DATUM_1950, EUROPEAN_DATUM_1979, GEODETIC_DATUM_1949,
00023              HONG_KONG_1963, HU_TZU_SHAN, INDIAN, NAD27, NAD83, 
00024              OLD_HAWAIIAN_MEAN, OMAN, ORDNANCE_SURVEY_1936, PUERTO_RICO, 
00025              PULKOVO_1942, PROVISIONAL_S_AMERICAN_1956, TOKYO, WGS_72, WGS_84, 
00026              UNKNOWN_DATUM = -1, NO_DATUM = -2, DEFAULT_DATUM = -3 };
00027 
00028 #include "ogr_spatialref.h"
00029 
00031 
00038 class vtProjection : public OGRSpatialReference
00039 {
00040 public:
00041     vtProjection();
00042 
00043     // Assignment
00044     vtProjection &vtProjection::operator=(vtProjection &ref);
00045 
00046     // Equality
00047     bool operator==(vtProjection &ref);
00048 
00049     bool  IsUTM();
00050     void  SetUTMZone(int iZone);
00051     int   GetUTMZone();
00052     void  SetDatum(DATUM datum);
00053     DATUM GetDatum();
00054 
00055     void    SetProjectionSimple(int proj_type, int iUTMZone, DATUM eDatum);
00056     void    SetSpatialReference(OGRSpatialReference *pRef);
00057 
00058     const char *GetProjectionName();
00059     const char *GetProjectionNameShort();
00060 
00061 protected:
00062     DATUM   m_Datum;
00063 };
00064 
00065 struct StatePlaneInfo
00066 {
00067     char *name;
00068     int number;
00069     DATUM datum;
00070     int usgs_code;
00071 };
00072 
00074 
00075 // Some class names are just too long!
00076 #define OCT OGRCoordinateTransformation
00077 
00079 // Helper functions
00080 
00081 const char *datumToString(DATUM d);
00082 StatePlaneInfo *GetStatePlaneTable();
00083 int GetNumStatePlanes();
00084 void CreateSimilarGeographicProjection(vtProjection &source, vtProjection &geo);
00085 
00087 
00088 #endif  // PROJECTIONSH

Generated at Fri Aug 17 14:40:42 2001 for vtdata library by doxygen1.2.4 written by Dimitri van Heesch, © 1997-2000