OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimTransMercatorProjection.h>
Public Member Functions | |
ossimTransMercatorProjection (const ossimEllipsoid &ellipsoid=ossimEllipsoid(6378137, 6356752.3142), const ossimGpt &origin=ossimGpt()) | |
ossimTransMercatorProjection (const ossimEllipsoid &ellipsoid, const ossimGpt &origin, double falseEasting, double falseNorthing, double scaleFactor) | |
~ossimTransMercatorProjection () | |
virtual ossimObject * | dup () const |
virtual ossimGpt | inverse (const ossimDpt &eastingNorthing) const |
Will take a point in meters and convert it to ground. More... | |
virtual ossimDpt | forward (const ossimGpt &latLon) const |
All map projections will convert the world coordinate to an easting northing (Meters). More... | |
virtual void | update () |
void | setFalseEasting (double falseEasting) |
void | setFalseNorthing (double falseNorthing) |
void | setScaleFactor (double scaleFactor) |
void | setFalseEastingNorthing (double falseEasting, double falseNorthing) |
void | setParameters (double falseEasting, double falseNorthing, double scaleFactor) |
void | setDefaults () |
double | getFalseEasting () const |
double | getFalseNorthing () const |
double | getScaleFactor () const |
virtual bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
virtual bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
virtual std::ostream & | print (std::ostream &out) const |
virtual bool | operator== (const ossimProjection &projection) const |
Returns TRUE if principal parameters are within epsilon tolerance. More... | |
![]() | |
ossimMapProjection (const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt()) | |
ossimMapProjection (const ossimMapProjection &src) | |
virtual ossimGpt | origin () const |
virtual ossimDpt | worldToLineSample (const ossimGpt &worldPoint) const |
virtual void | worldToLineSample (const ossimGpt &worldPoint, ossimDpt &lineSample) const |
virtual ossimGpt | lineSampleToWorld (const ossimDpt &projectedPoint) const |
virtual void | lineSampleToWorld (const ossimDpt &projectedPoint, ossimGpt &gpt) const |
virtual void | lineSampleHeightToWorld (const ossimDpt &lineSampPt, const double &heightAboveEllipsoid, ossimGpt &worldPt) const |
This is the pure virtual that projects the image point to the given elevation above ellipsoid, thereby bypassing reference to a DEM. More... | |
virtual void | lineSampleToEastingNorthing (const ossimDpt &liineSample, ossimDpt &eastingNorthing) const |
virtual void | eastingNorthingToLineSample (const ossimDpt &eastingNorthing, ossimDpt &lineSample) const |
virtual void | eastingNorthingToWorld (const ossimDpt &eastingNorthing, ossimGpt &worldPt) const |
virtual double | getStandardParallel1 () const |
Derived classes should implement as needed. More... | |
virtual double | getStandardParallel2 () const |
Derived classes should implement as needed. More... | |
virtual void | setPcsCode (ossim_uint32 pcsCode) |
virtual ossim_uint32 | getPcsCode () const |
Returns the EPSG PCS code or 32767 if the projection is a custom (non-EPSG) projection. More... | |
virtual ossimString | getProjectionName () const |
Returns the projection name. More... | |
virtual double | getA () const |
ACCESS METHODS: More... | |
virtual double | getB () const |
virtual double | getF () const |
virtual ossimDpt | getMetersPerPixel () const |
virtual const ossimDpt & | getDecimalDegreesPerPixel () const |
Returns decimal degrees per pixel as an ossimDpt with "x" representing longitude and "y" representing latitude. More... | |
virtual const ossimDpt & | getUlEastingNorthing () const |
virtual const ossimGpt & | getUlGpt () const |
virtual const ossimDatum * | getDatum () const |
const ossimEllipsoid & | getEllipsoid () const |
const ossimGpt & | getOrigin () const |
virtual bool | isGeographic () const |
virtual void | applyScale (const ossimDpt &scale, bool recenterTiePoint) |
Applies scale to theDeltaLonPerPixel, theDeltaLatPerPixel and theMetersPerPixel data members (eg: theDeltaLonPerPixel *= scale.x). More... | |
virtual void | setEllipsoid (const ossimEllipsoid &ellipsoid) |
SET METHODS: More... | |
virtual void | setAB (double a, double b) |
virtual void | setDatum (const ossimDatum *datum) |
Sets theDatum to datum. More... | |
virtual void | setOrigin (const ossimGpt &origin) |
Sets theOrigin to origin. More... | |
virtual void | setMetersPerPixel (const ossimDpt &gsd) |
virtual void | setDecimalDegreesPerPixel (const ossimDpt &gsd) |
virtual void | setUlTiePoints (const ossimGpt &gpt) |
virtual void | setUlTiePoints (const ossimDpt &eastingNorthing) |
virtual void | setUlEastingNorthing (const ossimDpt &ulEastingNorthing) |
virtual void | setUlGpt (const ossimGpt &ulGpt) |
virtual void | assign (const ossimProjection &aProjection) |
virtual void | computeDegreesPerPixel () |
Computes the approximate resolution in degrees/pixel. More... | |
virtual void | computeMetersPerPixel () |
This will go from the ground point and give you an approximate meters per pixel. More... | |
void | setMatrix (double rotation, const ossimDpt &scale, const ossimDpt &translation) |
void | setMatrixScale (const ossimDpt &scale) |
void | setMatrixRotation (double rotation) |
void | setMatrixTranslation (const ossimDpt &translation) |
void | snapTiePointTo (ossim_float64 multiple, ossimUnitType unitType) |
Utility method to snap the tie point to some multiple. More... | |
void | snapTiePointToOrigin () |
void | setElevationLookupFlag (bool flag) |
bool | getElevationLookupFlag () const |
ossimUnitType | getModelTransformUnitType () const |
void | setModelTransformUnitType (ossimUnitType unit) |
bool | hasModelTransform () const |
virtual bool | isAffectedByElevation () const |
Implementation of pure virtual ossimProjection::isAffectedByElevation method. More... | |
void | setProjectionUnits (ossimUnitType units) |
ossimUnitType | getProjectionUnits () const |
OSSIM considers all map projection coordinates (including false eastings and northings) to be in meters. More... | |
virtual bool | isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const |
![]() | |
ossimProjection () | |
virtual | ~ossimProjection () |
virtual void | getRoundTripError (const ossimDpt &imagePoint, ossimDpt &errorResult) const |
virtual void | getRoundTripError (const ossimGpt &groundPoint, ossimDpt &errorResult) const |
virtual void | getGroundClipPoints (ossimGeoPolygon &gpts) const |
virtual bool | operator!= (const ossimProjection &projection) const |
![]() | |
ossimObject () | |
virtual | ~ossimObject () |
virtual ossimString | getShortName () const |
virtual ossimString | getLongName () const |
virtual ossimString | getDescription () const |
virtual ossimString | getClassName () const |
virtual RTTItypeid | getType () const |
virtual bool | canCastTo (ossimObject *obj) const |
virtual bool | canCastTo (const RTTItypeid &id) const |
virtual bool | canCastTo (const ossimString &parentClassName) const |
virtual void | accept (ossimVisitor &visitor) |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
![]() | |
ossimErrorStatusInterface () | |
virtual | ~ossimErrorStatusInterface () |
virtual ossimErrorCode | getErrorStatus () const |
virtual ossimString | getErrorStatusString () const |
virtual void | setErrorStatus (ossimErrorCode error_status) const |
virtual void | setErrorStatus () const |
virtual void | clearErrorStatus () const |
bool | hasError () const |
Protected Member Functions | |
long | Set_Transverse_Mercator_Parameters (double a, double f, double Origin_Latitude, double Central_Meridian, double False_Easting, double False_Northing, double Scale_Factor) |
void | Get_Transverse_Mercator_Parameters (double *a, double *f, double *Origin_Latitude, double *Central_Meridian, double *False_Easting, double *False_Northing, double *Scale_Factor) const |
long | Convert_Geodetic_To_Transverse_Mercator (double Latitude, double Longitude, double *Easting, double *Northing) const |
long | Convert_Transverse_Mercator_To_Geodetic (double Easting, double Northing, double *Latitude, double *Longitude) const |
![]() | |
virtual | ~ossimMapProjection () |
void | updateFromTransform () |
![]() | |
virtual | ~ossimReferenced () |
Definition at line 18 of file ossimTransMercatorProjection.h.
ossimTransMercatorProjection::ossimTransMercatorProjection | ( | const ossimEllipsoid & | ellipsoid = ossimEllipsoid(6378137, 6356752.3142) , |
const ossimGpt & | origin = ossimGpt() |
||
) |
Definition at line 53 of file ossimTransMercatorProjection.cpp.
References update().
ossimTransMercatorProjection::ossimTransMercatorProjection | ( | const ossimEllipsoid & | ellipsoid, |
const ossimGpt & | origin, | ||
double | falseEasting, | ||
double | falseNorthing, | ||
double | scaleFactor | ||
) |
Definition at line 76 of file ossimTransMercatorProjection.cpp.
References update().
|
inline |
Definition at line 28 of file ossimTransMercatorProjection.h.
|
protected |
The function Convert_Geodetic_To_Transverse_Mercator converts geodetic (latitude and longitude) coordinates to Transverse Mercator projection (easting and northing) coordinates, according to the current ellipsoid and Transverse Mercator projection coordinates. If any errors occur, the error code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is returned.
Latitude : Latitude in radians (input) Longitude : Longitude in radians (input) Easting : Easting/X in meters (output) Northing : Northing/Y in meters (output)
Definition at line 392 of file ossimTransMercatorProjection.cpp.
References M_PI, SPHSN, SPHTMD, TranMerc_ebs, TranMerc_False_Easting, TranMerc_False_Northing, TRANMERC_NO_ERROR, TranMerc_Origin_Lat, TranMerc_Origin_Long, TranMerc_Scale_Factor, and TWO_PI.
Referenced by forward(), and Set_Transverse_Mercator_Parameters().
|
protected |
The function Convert_Transverse_Mercator_To_Geodetic converts Transverse Mercator projection (easting and northing) coordinates to geodetic (latitude and longitude) coordinates, according to the current ellipsoid and Transverse Mercator projection parameters. If any errors occur, the error code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is returned.
Easting : Easting/X in meters (input) Northing : Northing/Y in meters (input) Latitude : Latitude in radians (output) Longitude : Longitude in radians (output)
Definition at line 547 of file ossimTransMercatorProjection.cpp.
References M_PI, RAD_PER_DEG, SPHSN, SPHSR, SPHTMD, TranMerc_ebs, TranMerc_False_Easting, TranMerc_False_Northing, TRANMERC_NO_ERROR, TranMerc_Origin_Lat, TranMerc_Origin_Long, TranMerc_Scale_Factor, and TWO_PI.
Referenced by inverse().
|
inlinevirtual |
Implements ossimProjection.
Definition at line 30 of file ossimTransMercatorProjection.h.
All map projections will convert the world coordinate to an easting northing (Meters).
Implements ossimMapProjection.
Definition at line 182 of file ossimTransMercatorProjection.cpp.
References ossimGpt::changeDatum(), ossimDatum::code(), Convert_Geodetic_To_Transverse_Mercator(), ossimGpt::datum(), ossimGpt::latr(), ossimGpt::lonr(), and ossimMapProjection::theDatum.
|
protected |
The function Get_Transverse_Mercator_Parameters returns the current ellipsoid and Transverse Mercator projection parameters.
a : Semi-major axis of ellipsoid, in meters (output) f : Flattening of ellipsoid (output) Origin_Latitude : Latitude in radians at the origin of the (output) projection Central_Meridian : Longitude in radians at the center of the (output) projection False_Easting : Easting/X at the center of the projection (output) False_Northing : Northing/Y at the center of the projection (output) Scale_Factor : Projection scale factor (output)
Definition at line 355 of file ossimTransMercatorProjection.cpp.
References TranMerc_a, TranMerc_f, TranMerc_False_Easting, TranMerc_False_Northing, TranMerc_Origin_Lat, TranMerc_Origin_Long, and TranMerc_Scale_Factor.
|
inlinevirtual |
Reimplemented from ossimMapProjection.
Definition at line 64 of file ossimTransMercatorProjection.h.
|
inlinevirtual |
Reimplemented from ossimMapProjection.
Definition at line 65 of file ossimTransMercatorProjection.h.
|
inline |
Definition at line 66 of file ossimTransMercatorProjection.h.
Referenced by ossimStatePlaneProjectionInfo::matchesProjection(), and ossimGeoTiff::parseProjection().
Will take a point in meters and convert it to ground.
Implements ossimMapProjection.
Definition at line 169 of file ossimTransMercatorProjection.cpp.
References Convert_Transverse_Mercator_To_Geodetic(), DEG_PER_RAD, ossimMapProjection::theDatum, ossimDpt::x, and ossimDpt::y.
|
virtual |
Method to the load (recreate) the state of an object from a keyword list. Return true if ok or false on error.
Reimplemented from ossimMapProjection.
Definition at line 214 of file ossimTransMercatorProjection.cpp.
References ossimKeywordlist::find(), ossimMapProjection::loadState(), ossimKeywordNames::SCALE_FACTOR_KW, setDefaults(), STATIC_TYPE_NAME, ossimMapProjection::theFalseEastingNorthing, ossimString::toDouble(), TranMerc_False_Easting, TranMerc_False_Northing, TranMerc_Scale_Factor, ossimKeywordNames::TYPE_KW, update(), ossimDpt::x, and ossimDpt::y.
|
virtual |
Returns TRUE if principal parameters are within epsilon tolerance.
Reimplemented from ossimMapProjection.
Definition at line 722 of file ossimTransMercatorProjection.cpp.
References ossim::almostEqual(), and TranMerc_Scale_Factor.
|
virtual |
Prints data members to stream. Returns stream&.
Reimplemented from ossimMapProjection.
Definition at line 710 of file ossimTransMercatorProjection.cpp.
References ossimMapProjection::print(), ossimKeywordNames::SCALE_FACTOR_KW, and TranMerc_Scale_Factor.
|
virtual |
Method to save the state of an object to a keyword list. Return true if ok or false on error.
Reimplemented from ossimMapProjection.
Definition at line 204 of file ossimTransMercatorProjection.cpp.
References ossimKeywordlist::add(), ossimMapProjection::saveState(), ossimKeywordNames::SCALE_FACTOR_KW, and TranMerc_Scale_Factor.
|
protected |
The function Set_Tranverse_Mercator_Parameters receives the ellipsoid parameters and Tranverse Mercator projection parameters as inputs, and sets the corresponding state variables. If any errors occur, the error code(s) are returned by the function, otherwise TRANMERC_NO_ERROR is returned.
a : Semi-major axis of ellipsoid, in meters (input) f : Flattening of ellipsoid (input) Origin_Latitude : Latitude in radians at the origin of the (input) projection Central_Meridian : Longitude in radians at the center of the (input) projection False_Easting : Easting/X at the center of the projection (input) False_Northing : Northing/Y at the center of the projection (input) Scale_Factor : Projection scale factor (input)
Definition at line 248 of file ossimTransMercatorProjection.cpp.
References Convert_Geodetic_To_Transverse_Mercator(), M_PI, MAX_DELTA_LONG, MAX_LAT, TranMerc_a, TranMerc_ap, TranMerc_bp, TranMerc_cp, TranMerc_Delta_Easting, TranMerc_Delta_Northing, TranMerc_dp, TranMerc_ebs, TranMerc_ep, TranMerc_es, TranMerc_f, TranMerc_False_Easting, TranMerc_False_Northing, TRANMERC_NO_ERROR, TranMerc_Origin_Lat, TranMerc_Origin_Long, TranMerc_Scale_Factor, and TWO_PI.
Referenced by update().
void ossimTransMercatorProjection::setDefaults | ( | ) |
Definition at line 160 of file ossimTransMercatorProjection.cpp.
References TranMerc_Delta_Easting, TranMerc_Delta_Northing, TranMerc_False_Easting, TranMerc_False_Northing, and TranMerc_Scale_Factor.
Referenced by loadState().
void ossimTransMercatorProjection::setFalseEasting | ( | double | falseEasting | ) |
SetFalseEasting. The value is in meters. Update is then called so we can pre-compute paramters
Definition at line 118 of file ossimTransMercatorProjection.cpp.
References TranMerc_False_Easting, and update().
void ossimTransMercatorProjection::setFalseEastingNorthing | ( | double | falseEasting, |
double | falseNorthing | ||
) |
Sets both false easting and northing values. The values are expected to be in meters. Update is then called so we can pre-compute paramters
Definition at line 133 of file ossimTransMercatorProjection.cpp.
References TranMerc_False_Easting, TranMerc_False_Northing, and update().
void ossimTransMercatorProjection::setFalseNorthing | ( | double | falseNorthing | ) |
SetFalseNorthing. The value is in meters. Update is then called so we can pre-compute paramters
Definition at line 126 of file ossimTransMercatorProjection.cpp.
References TranMerc_False_Northing, and update().
Referenced by ossimEpsgProjectionFactory::createProjFromAutoCode().
void ossimTransMercatorProjection::setParameters | ( | double | falseEasting, |
double | falseNorthing, | ||
double | scaleFactor | ||
) |
Definition at line 149 of file ossimTransMercatorProjection.cpp.
References TranMerc_False_Easting, TranMerc_False_Northing, TranMerc_Scale_Factor, and update().
void ossimTransMercatorProjection::setScaleFactor | ( | double | scaleFactor | ) |
Definition at line 142 of file ossimTransMercatorProjection.cpp.
References TranMerc_Scale_Factor, and update().
Referenced by ossimEpsgProjectionFactory::createProjFromAutoCode(), and ossimWktProjectionFactory::doTransverseMercator().
|
virtual |
Reimplemented from ossimMapProjection.
Definition at line 102 of file ossimTransMercatorProjection.cpp.
References ossimEllipsoid::getA(), ossimEllipsoid::getFlattening(), ossimGpt::latr(), ossimGpt::lonr(), Set_Transverse_Mercator_Parameters(), ossimMapProjection::theEllipsoid, ossimMapProjection::theFalseEastingNorthing, ossimMapProjection::theOrigin, TranMerc_False_Easting, TranMerc_False_Northing, TranMerc_Scale_Factor, ossimMapProjection::update(), ossimDpt::x, and ossimDpt::y.
Referenced by ossimEpsgProjectionFactory::createProjFromAutoCode(), loadState(), ossimTransMercatorProjection(), setFalseEasting(), setFalseEastingNorthing(), setFalseNorthing(), setParameters(), and setScaleFactor().
|
protected |
Definition at line 94 of file ossimTransMercatorProjection.h.
Referenced by Get_Transverse_Mercator_Parameters(), and Set_Transverse_Mercator_Parameters().
|
protected |
Definition at line 107 of file ossimTransMercatorProjection.h.
Referenced by Set_Transverse_Mercator_Parameters().
|
protected |
Definition at line 108 of file ossimTransMercatorProjection.h.
Referenced by Set_Transverse_Mercator_Parameters().
|
protected |
Definition at line 109 of file ossimTransMercatorProjection.h.
Referenced by Set_Transverse_Mercator_Parameters().
|
protected |
Definition at line 114 of file ossimTransMercatorProjection.h.
Referenced by Set_Transverse_Mercator_Parameters(), and setDefaults().
|
protected |
Definition at line 115 of file ossimTransMercatorProjection.h.
Referenced by Set_Transverse_Mercator_Parameters(), and setDefaults().
|
protected |
Definition at line 110 of file ossimTransMercatorProjection.h.
Referenced by Set_Transverse_Mercator_Parameters().
|
protected |
Definition at line 97 of file ossimTransMercatorProjection.h.
Referenced by Convert_Geodetic_To_Transverse_Mercator(), Convert_Transverse_Mercator_To_Geodetic(), and Set_Transverse_Mercator_Parameters().
|
protected |
Definition at line 111 of file ossimTransMercatorProjection.h.
Referenced by Set_Transverse_Mercator_Parameters().
|
protected |
Definition at line 96 of file ossimTransMercatorProjection.h.
Referenced by Set_Transverse_Mercator_Parameters().
|
protected |
Definition at line 95 of file ossimTransMercatorProjection.h.
Referenced by Get_Transverse_Mercator_Parameters(), and Set_Transverse_Mercator_Parameters().
|
protected |
Definition at line 103 of file ossimTransMercatorProjection.h.
Referenced by Convert_Geodetic_To_Transverse_Mercator(), Convert_Transverse_Mercator_To_Geodetic(), Get_Transverse_Mercator_Parameters(), loadState(), Set_Transverse_Mercator_Parameters(), setDefaults(), setFalseEasting(), setFalseEastingNorthing(), setParameters(), and update().
|
protected |
Definition at line 102 of file ossimTransMercatorProjection.h.
Referenced by Convert_Geodetic_To_Transverse_Mercator(), Convert_Transverse_Mercator_To_Geodetic(), Get_Transverse_Mercator_Parameters(), loadState(), Set_Transverse_Mercator_Parameters(), setDefaults(), setFalseEastingNorthing(), setFalseNorthing(), setParameters(), and update().
|
protected |
Definition at line 100 of file ossimTransMercatorProjection.h.
Referenced by Convert_Geodetic_To_Transverse_Mercator(), Convert_Transverse_Mercator_To_Geodetic(), Get_Transverse_Mercator_Parameters(), and Set_Transverse_Mercator_Parameters().
|
protected |
Definition at line 101 of file ossimTransMercatorProjection.h.
Referenced by Convert_Geodetic_To_Transverse_Mercator(), Convert_Transverse_Mercator_To_Geodetic(), Get_Transverse_Mercator_Parameters(), and Set_Transverse_Mercator_Parameters().
|
protected |
Definition at line 104 of file ossimTransMercatorProjection.h.
Referenced by Convert_Geodetic_To_Transverse_Mercator(), Convert_Transverse_Mercator_To_Geodetic(), Get_Transverse_Mercator_Parameters(), loadState(), operator==(), print(), saveState(), Set_Transverse_Mercator_Parameters(), setDefaults(), setParameters(), setScaleFactor(), and update().