Umasoft
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Groups Pages
Classes | Macros | Enumerations | Functions | Variables
Projections.h File Reference
#include "ogr_spatialref.h"
#include "MathTypes.h"

Go to the source code of this file.

Classes

class  vtProjection
 
struct  StatePlaneInfo
 
class  Geodesic
 
struct  EPSGDatum
 
class  GDALInitResult
 
class  GDALWrapper
 

Macros

#define EARTH_RADIUS   6378000.0f
 
#define METERS_PER_LATITUDE   111317.1f
 
#define OCT   OGRCoordinateTransformation
 
#define EPSG_DATUM_OLD_HAWAIIAN   6135
 
#define EPSG_DATUM_PUERTO_RICO   6139
 
#define EPSG_DATUM_NAD27   6267
 
#define EPSG_DATUM_NAD83   6269
 
#define EPSG_DATUM_WGS72   6322
 
#define EPSG_DATUM_WGS84   6326
 
#define DEFAULT_LOCATION_GDAL_DATA   "/usr/local/share/gdal/"
 
#define DEFAULT_LOCATION_PROJ_LIB   "/usr/local/share/proj/"
 
#define DEFAULT_LOCATION_PROJSO   "/usr/local/lib/"
 

Enumerations

enum  LinearUnits {
  LU_DEGREES, LU_METERS, LU_FEET_INT, LU_FEET_US,
  LU_UNITEDGE, LU_UNKNOWN
}
 

Functions

const char * DatumToString (int d)
 
const char * DatumToStringShort (int d)
 
void SetupEPSGDatums ()
 
StatePlaneInfoGetStatePlaneTable ()
 
int GetNumStatePlanes ()
 
void CreateSimilarGeographicProjection (const vtProjection &source, vtProjection &geo)
 
OCT * CreateConversionIgnoringDatum (const vtProjection *pSource, vtProjection *pTarget)
 
OCT * CreateCoordTransform (const vtProjection *pSource, const vtProjection *pTarget, bool bLog=false)
 
double EstimateDegreesToMeters (double latitude)
 
double GetMetersPerUnit (LinearUnits lu)
 
const char * GetLinearUnitName (LinearUnits lu)
 
double MetersPerLongitude (double latitude)
 
bool ReadAssociatedWorldFile (const char *filename_base, double params[6])
 

Variables

vtArray< EPSGDatumg_EPSGDatums
 
GDALWrapper g_GDALWrapper
 

Function Documentation

OCT* CreateConversionIgnoringDatum ( const vtProjection pSource,
vtProjection pTarget 
)

Create a conversion between projections, making the assumption that the Datum of the target is the same as the Datum of the source.

OCT* CreateCoordTransform ( const vtProjection pSource,
const vtProjection pTarget,
bool  bLog 
)

Use this function instead of OGRCreateCoordinateTransformation to create a transformation between two vtProjections. Not only does it get around the 'const' issue with the arguments to the OGR function, but it also has a handy logging option, and can deal with any additional projections that vtProjection adds to OGRSpatialReference.

void CreateSimilarGeographicProjection ( const vtProjection source,
vtProjection geo 
)

Given a non-geographic projection, produce a geographic projection which has the same datum/ellipsoid values.

const char* DatumToString ( int  d)

Convert an a Datum Code to a string of the Datum Name.

const char* DatumToStringShort ( int  d)

Convert a Datum Code to a (short) string of the Datum Name.

double EstimateDegreesToMeters ( double  latitude)

Determine an approximate conversion from degrees of longitude to meters, given a latitude in degrees.

const char* GetLinearUnitName ( LinearUnits  lu)

Return a string describing the units.

double GetMetersPerUnit ( LinearUnits  lu)

Return the number of meters for a given type of linear units

StatePlaneInfo* GetStatePlaneTable ( )

Provides access to the State Plane Table

double MetersPerLongitude ( double  latitude)

Return number of meters per degree of longitude, at a given latitude.

bool ReadAssociatedWorldFile ( const char *  filename_base,
double  params[6] 
)

Read the contents of a world file. You can pass any filename, and it will look for the corresponding world file.

void SetupEPSGDatums ( )

Setup the global array of EPSG Datums, accessible as g_EPSGDatums.