OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
ossimMapProjection Class Referenceabstract

#include <ossimMapProjection.h>

Inheritance diagram for ossimMapProjection:
ossimProjection ossimObject ossimErrorStatusInterface ossimReferenced ossimAlbersProjection ossimAzimEquDistProjection ossimBngProjection ossimBonneProjection ossimCadrgProjection ossimCassiniProjection ossimCylEquAreaProjection ossimEckert4Projection ossimEckert6Projection ossimEquDistCylProjection ossimGnomonicProjection ossimGoogleProjection ossimLambertConformalConicProjection ossimLlxyProjection ossimMercatorProjection ossimMillerProjection ossimMollweidProjection ossimNewZealandMapGridProjection ossimObliqueMercatorProjection ossimOrthoGraphicProjection ossimPolarStereoProjection ossimPolyconicProjection ossimSinusoidalProjection ossimSpaceObliqueMercatorProjection ossimStereographicProjection ossimTransCylEquAreaProjection ossimTransMercatorProjection ossimUpsProjection ossimUtmProjection ossimVanDerGrintenProjection

Public Member Functions

 ossimMapProjection (const ossimEllipsoid &ellipsoid=ossimEllipsoid(), const ossimGpt &origin=ossimGpt())
 
 ossimMapProjection (const ossimMapProjection &src)
 
virtual ossimGpt origin () const
 
virtual ossimDpt forward (const ossimGpt &worldPoint) const =0
 All map projections will convert the world coordinate to an easting northing (Meters). More...
 
virtual ossimGpt inverse (const ossimDpt &projectedPoint) const =0
 Will take a point in meters and convert it to ground. More...
 
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 getFalseEasting () const
 
virtual double getFalseNorthing () 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 update ()
 
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 ossimDptgetDecimalDegreesPerPixel () const
 Returns decimal degrees per pixel as an ossimDpt with "x" representing longitude and "y" representing latitude. More...
 
virtual const ossimDptgetUlEastingNorthing () const
 
virtual const ossimGptgetUlGpt () const
 
virtual const ossimDatumgetDatum () const
 
const ossimEllipsoidgetEllipsoid () const
 
const ossimGptgetOrigin () 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 bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 Method to save the state of an object to a keyword list. More...
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 Method to the load (recreate) the state of an object from a keyword list. More...
 
virtual std::ostream & print (std::ostream &out) const
 Prints data members to stream. More...
 
virtual bool operator== (const ossimProjection &projection) const
 Compares this to arg projection and returns TRUE if the same. More...
 
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
 
- Public Member Functions inherited from ossimProjection
 ossimProjection ()
 
virtual ~ossimProjection ()
 
virtual ossimObjectdup () const =0
 
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
 
- Public Member Functions inherited from ossimObject
 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)
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (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
 
- Public Member Functions inherited from ossimErrorStatusInterface
 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

virtual ~ossimMapProjection ()
 
void updateFromTransform ()
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 

Protected Attributes

ossimEllipsoid theEllipsoid
 This method verifies that the projection parameters match the current pcs code. More...
 
ossimGpt theOrigin
 
const ossimDatumtheDatum
 This is only set if we want to have built in datum shifting. More...
 
ossimDpt theMetersPerPixel
 Holds the number of meters per pixel. More...
 
ossimDpt theDegreesPerPixel
 Hold the decimal degrees per pixel. More...
 
ossimGpt theUlGpt
 Hold tie point in decimal degrees. More...
 
ossimDpt theUlEastingNorthing
 Hold tie point as easting northing. More...
 
ossimDpt theFalseEastingNorthing
 Hold the false easting northing. More...
 
ossim_uint32 thePcsCode
 Projection Coordinate System(PCS) code. More...
 
bool theElevationLookupFlag
 
ossimMatrix4x4 theModelTransform
 
ossimMatrix4x4 theInverseModelTransform
 
ossimUnitType theModelTransformUnitType
 
ossimUnitType theProjectionUnits
 Linear units of the projection as indicated in the projection's specification: More...
 
- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 

Detailed Description

Definition at line 31 of file ossimMapProjection.h.

Constructor & Destructor Documentation

◆ ossimMapProjection() [1/2]

ossimMapProjection::ossimMapProjection ( const ossimEllipsoid ellipsoid = ossimEllipsoid(),
const ossimGpt origin = ossimGpt() 
)

Definition at line 40 of file ossimMapProjection.cpp.

References ossimDpt::makeNan(), theDegreesPerPixel, theMetersPerPixel, theOrigin, theUlEastingNorthing, and theUlGpt.

42  :theEllipsoid(ellipsoid),
44  theDatum(origin.datum()), // force no shifting
45  theUlGpt(0, 0),
48  thePcsCode(0),
54 {
59 }
ossimMatrix4x4 theModelTransform
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
ossimGpt theUlGpt
Hold tie point in decimal degrees.
ossimMatrix4x4 theInverseModelTransform
const ossimDatum * datum() const
datum().
Definition: ossimGpt.h:196
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
ossimUnitType theModelTransformUnitType
virtual ossimGpt origin() const
ossimUnitType theProjectionUnits
Linear units of the projection as indicated in the projection&#39;s specification:
ossim_uint32 thePcsCode
Projection Coordinate System(PCS) code.
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.
ossimDpt theFalseEastingNorthing
Hold the false easting northing.
void makeNan()
Definition: ossimDpt.h:65
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ ossimMapProjection() [2/2]

ossimMapProjection::ossimMapProjection ( const ossimMapProjection src)

Definition at line 61 of file ossimMapProjection.cpp.

62  : ossimProjection(src),
64  theOrigin(src.theOrigin),
65  theDatum(src.theDatum),
68  theUlGpt(src.theUlGpt),
77 {
78 }
ossimMatrix4x4 theModelTransform
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
ossimGpt theUlGpt
Hold tie point in decimal degrees.
ossimMatrix4x4 theInverseModelTransform
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
ossimUnitType theModelTransformUnitType
ossimUnitType theProjectionUnits
Linear units of the projection as indicated in the projection&#39;s specification:
ossim_uint32 thePcsCode
Projection Coordinate System(PCS) code.
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.
ossimDpt theFalseEastingNorthing
Hold the false easting northing.
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ ~ossimMapProjection()

ossimMapProjection::~ossimMapProjection ( )
protectedvirtual

Definition at line 80 of file ossimMapProjection.cpp.

81 {
82 }

Member Function Documentation

◆ applyScale()

void ossimMapProjection::applyScale ( const ossimDpt scale,
bool  recenterTiePoint 
)
virtual

Applies scale to theDeltaLonPerPixel, theDeltaLatPerPixel and theMetersPerPixel data members (eg: theDeltaLonPerPixel *= scale.x).

Parameters
scaleMultiplier to be applied to theDeltaLonPerPixel, theDeltaLatPerPixel and theMetersPerPixel
recenterTiePointIf true the will adjust the tie point by shifting the original tie to the upper left corner, applying scale, then shifting back by half of either the new theDeltaLat/lon or theMetersPerPixel depending on if projection isGeographic.

Definition at line 340 of file ossimMapProjection.cpp.

References ossimMatrix4x4::getData(), getUlEastingNorthing(), getUlGpt(), ossimMatrix4x4::i(), isGeographic(), ossimDpt::lat, ossimGpt::lat, ossimDpt::lon, ossimGpt::lon, OSSIM_UNIT_UNKNOWN, setUlTiePoints(), theDegreesPerPixel, theInverseModelTransform, theMetersPerPixel, theModelTransform, theModelTransformUnitType, updateFromTransform(), ossimDpt::x, and ossimDpt::y.

Referenced by ossimImageGeometry::applyScale(), ossimGpkgWriter::applyScaleToProjection(), ossimIgen::initThumbnailProjection(), ossimRLevelFilter::updateGeometry(), and ossimScaleFilter::updateGeometry().

342 {
343  ossimDpt mapTieDpt;
344  ossimGpt mapTieGpt;
345  if (recenterTiePoint)
346  {
347  if (isGeographic())
348  {
349  mapTieGpt = getUlGpt();
350  mapTieGpt.lat += theDegreesPerPixel.lat/2.0;
351  mapTieGpt.lon -= theDegreesPerPixel.lon/2.0;
352  }
353  else
354  {
355  mapTieDpt = getUlEastingNorthing();
356  mapTieDpt.x -= theMetersPerPixel.x/2.0;
357  mapTieDpt.y += theMetersPerPixel.y/2.0;
358  }
359  }
360 
361  theDegreesPerPixel.x *= scale.x;
362  theDegreesPerPixel.y *= scale.y;
363  theMetersPerPixel.x *= scale.x;
364  theMetersPerPixel.y *= scale.y;
365 
366  if ( recenterTiePoint )
367  {
368  if (isGeographic())
369  {
370  mapTieGpt.lat -= theDegreesPerPixel.lat/2.0;
371  mapTieGpt.lon += theDegreesPerPixel.lon/2.0;
372  setUlTiePoints(mapTieGpt);
373  }
374  else
375  {
376  mapTieDpt.x += theMetersPerPixel.x/2.0;
377  mapTieDpt.y -= theMetersPerPixel.y/2.0;
378  setUlTiePoints(mapTieDpt);
379  }
380  }
381 
383  {
384  theModelTransform.getData()[0][0] = theModelTransform.getData()[0][0]*scale.x;
385  theModelTransform.getData()[1][1] = theModelTransform.getData()[1][1]*scale.y;
386 
389 
391  }
392 }
ossimMatrix4x4 theModelTransform
const NEWMAT::Matrix & getData() const
ossimMatrix4x4 & i()
double y
Definition: ossimDpt.h:165
virtual bool isGeographic() const
ossimMatrix4x4 theInverseModelTransform
double lat
Definition: ossimDpt.h:165
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
ossimUnitType theModelTransformUnitType
ossim_float64 lon
Definition: ossimGpt.h:266
double lon
Definition: ossimDpt.h:164
virtual const ossimGpt & getUlGpt() const
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
double x
Definition: ossimDpt.h:164
virtual void setUlTiePoints(const ossimGpt &gpt)
ossim_float64 lat
Definition: ossimGpt.h:265
virtual const ossimDpt & getUlEastingNorthing() const

◆ assign()

void ossimMapProjection::assign ( const ossimProjection aProjection)
virtual

Definition at line 214 of file ossimMapProjection.cpp.

References loadState(), and ossimProjection::saveState().

215 {
216  if(&aProjection!=this)
217  {
218  ossimKeywordlist kwl;
219 
220  aProjection.saveState(kwl);
221  loadState(kwl);
222  }
223 }
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
Represents serializable keyword/value map.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const

◆ computeDegreesPerPixel()

void ossimMapProjection::computeDegreesPerPixel ( )
virtual

Computes the approximate resolution in degrees/pixel.

Definition at line 1427 of file ossimMapProjection.cpp.

References forward(), inverse(), ossimDpt::lat, ossimGpt::latd(), ossimDpt::lon, ossimGpt::lond(), theDegreesPerPixel, theMetersPerPixel, theOrigin, ossimDpt::x, and ossimDpt::y.

Referenced by ossimLlxyProjection::loadState(), ossimLlxyProjection::setMetersPerPixel(), setMetersPerPixel(), update(), and updateFromTransform().

1428 {
1429  ossimDpt eastNorthGround = forward(theOrigin);
1430  ossimDpt rightEastNorth = eastNorthGround;
1431  ossimDpt downEastNorth = eastNorthGround;
1432  rightEastNorth.x += theMetersPerPixel.x;
1433  downEastNorth.y -= theMetersPerPixel.y;
1434 
1435  ossimGpt rightGpt = inverse(rightEastNorth);
1436  ossimGpt downGpt = inverse(downEastNorth);
1437 
1438  // use euclidean distance to get length along the horizontal (lon)
1439  // and vertical (lat) directions
1440  //
1441  double tempDeltaLat = rightGpt.latd() - theOrigin.latd();
1442  double tempDeltaLon = rightGpt.lond() - theOrigin.lond();
1443  theDegreesPerPixel.lon = sqrt(tempDeltaLat*tempDeltaLat + tempDeltaLon*tempDeltaLon);
1444 
1445  tempDeltaLat = downGpt.latd() - theOrigin.latd();
1446  tempDeltaLon = downGpt.lond() - theOrigin.lond();
1447  theDegreesPerPixel.lat = sqrt(tempDeltaLat*tempDeltaLat + tempDeltaLon*tempDeltaLon);
1448 }
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
double y
Definition: ossimDpt.h:165
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
virtual ossimGpt inverse(const ossimDpt &projectedPoint) const =0
Will take a point in meters and convert it to ground.
double lat
Definition: ossimDpt.h:165
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
double lon
Definition: ossimDpt.h:164
virtual ossimDpt forward(const ossimGpt &worldPoint) const =0
All map projections will convert the world coordinate to an easting northing (Meters).
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
double x
Definition: ossimDpt.h:164

◆ computeMetersPerPixel()

void ossimMapProjection::computeMetersPerPixel ( )
virtual

This will go from the ground point and give you an approximate meters per pixel.

the Delta Lat and delta lon will be in degrees.

Definition at line 1454 of file ossimMapProjection.cpp.

References forward(), ossimDpt::lat, ossimGpt::latd(), ossimDpt::lon, ossimGpt::lond(), ossimGpt::metersPerDegree(), theDegreesPerPixel, theMetersPerPixel, theOrigin, ossimDpt::x, and ossimDpt::y.

Referenced by ossimLlxyProjection::loadState(), ossimLlxyProjection::ossimLlxyProjection(), setDecimalDegreesPerPixel(), update(), and updateFromTransform().

1455 {
1456 //#define USE_OSSIMGPT_METERS_PER_DEGREE
1457 #ifdef USE_OSSIMGPT_METERS_PER_DEGREE
1458  ossimDpt metersPerDegree (theOrigin.metersPerDegree());
1459  theMetersPerPixel.x = metersPerDegree.x * theDegreesPerPixel.lon;
1460  theMetersPerPixel.y = metersPerDegree.y * theDegreesPerPixel.lat;
1461 #else
1462  ossimGpt right=theOrigin;
1463  ossimGpt down=theOrigin;
1464 
1467 
1468  ossimDpt centerMeters = forward(theOrigin);
1469  ossimDpt rightMeters = forward(right);
1470  ossimDpt downMeters = forward(down);
1471 
1472  theMetersPerPixel.x = (rightMeters - centerMeters).length();
1473  theMetersPerPixel.y = (downMeters - centerMeters).length();
1474 #endif
1475 }
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
double y
Definition: ossimDpt.h:165
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
double lat
Definition: ossimDpt.h:165
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
double lon
Definition: ossimDpt.h:164
virtual ossimDpt forward(const ossimGpt &worldPoint) const =0
All map projections will convert the world coordinate to an easting northing (Meters).
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
double x
Definition: ossimDpt.h:164
ossimDpt metersPerDegree() const
Definition: ossimGpt.cpp:498

◆ eastingNorthingToLineSample()

void ossimMapProjection::eastingNorthingToLineSample ( const ossimDpt eastingNorthing,
ossimDpt lineSample 
) const
virtual

Definition at line 751 of file ossimMapProjection.cpp.

References ossimDpt::hasNans(), ossimDpt::isNan(), ossimDpt::makeNan(), theMetersPerPixel, theUlEastingNorthing, ossimDpt::x, and ossimDpt::y.

Referenced by ossimMapCompositionSource::addMeterGridLabels(), ossimMapCompositionSource::addMeterGridLines(), ossimMapCompositionSource::addMeterGridReseaux(), eastingNorthingToWorld(), and ossimEastingNorthingCutter::transformVertices().

753 {
754  if(eastingNorthing.hasNans())
755  {
756  lineSample.makeNan();
757  return;
758  }
759  // check the final result to make sure there were no
760  // problems.
761  //
762  if(!eastingNorthing.isNan())
763  {
764  lineSample.x = (eastingNorthing.x - theUlEastingNorthing.x)/theMetersPerPixel.x;
765 
766  // We must remember that the Northing is negative since the positive
767  // axis for an image is assumed to go down since it's image space.
768  lineSample.y = (-(eastingNorthing.y-theUlEastingNorthing.y))/theMetersPerPixel.y;
769  }
770 }
double y
Definition: ossimDpt.h:165
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
bool isNan() const
Definition: ossimDpt.h:72
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
bool hasNans() const
Definition: ossimDpt.h:67
double x
Definition: ossimDpt.h:164
void makeNan()
Definition: ossimDpt.h:65

◆ eastingNorthingToWorld()

void ossimMapProjection::eastingNorthingToWorld ( const ossimDpt eastingNorthing,
ossimGpt worldPt 
) const
virtual

Definition at line 738 of file ossimMapProjection.cpp.

References eastingNorthingToLineSample(), and lineSampleToWorld().

740 {
741  ossimDpt lineSample;
742  eastingNorthingToLineSample(eastingNorthing, lineSample);
743  lineSampleToWorld(lineSample, worldPt);
744 }
virtual ossimGpt lineSampleToWorld(const ossimDpt &projectedPoint) const
virtual void eastingNorthingToLineSample(const ossimDpt &eastingNorthing, ossimDpt &lineSample) const

◆ forward()

virtual ossimDpt ossimMapProjection::forward ( const ossimGpt worldPoint) const
pure virtual

◆ getA()

double ossimMapProjection::getA ( ) const
virtual

ACCESS METHODS:

Definition at line 119 of file ossimMapProjection.cpp.

References ossimEllipsoid::getA(), and theEllipsoid.

120 {
121  return theEllipsoid.getA();
122 }
const double & getA() const
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.

◆ getB()

double ossimMapProjection::getB ( ) const
virtual

Definition at line 124 of file ossimMapProjection.cpp.

References ossimEllipsoid::getB(), and theEllipsoid.

125 {
126  return theEllipsoid.getB();
127 }
const double & getB() const
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.

◆ getDatum()

const ossimDatum * ossimMapProjection::getDatum ( ) const
virtual

◆ getDecimalDegreesPerPixel()

const ossimDpt & ossimMapProjection::getDecimalDegreesPerPixel ( ) const
virtual

◆ getElevationLookupFlag()

bool ossimMapProjection::getElevationLookupFlag ( ) const

Definition at line 1694 of file ossimMapProjection.cpp.

References theElevationLookupFlag.

1695 {
1696  return theElevationLookupFlag;
1697 }

◆ getEllipsoid()

const ossimEllipsoid& ossimMapProjection::getEllipsoid ( ) const
inline

Definition at line 130 of file ossimMapProjection.h.

130 { return theEllipsoid; }
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.

◆ getF()

double ossimMapProjection::getF ( ) const
virtual

Definition at line 129 of file ossimMapProjection.cpp.

References ossimEllipsoid::getFlattening(), and theEllipsoid.

130 {
131  return theEllipsoid.getFlattening();
132 }
const double & getFlattening() const
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.

◆ getFalseEasting()

double ossimMapProjection::getFalseEasting ( ) const
virtual

◆ getFalseNorthing()

double ossimMapProjection::getFalseNorthing ( ) const
virtual

◆ getMetersPerPixel()

ossimDpt ossimMapProjection::getMetersPerPixel ( ) const
virtual

◆ getModelTransformUnitType()

ossimUnitType ossimMapProjection::getModelTransformUnitType ( ) const
inline

Definition at line 255 of file ossimMapProjection.h.

256  {
258  }
ossimUnitType theModelTransformUnitType

◆ getOrigin()

const ossimGpt & ossimMapProjection::getOrigin ( ) const

◆ getPcsCode()

ossim_uint32 ossimMapProjection::getPcsCode ( ) const
virtual

Returns the EPSG PCS code or 32767 if the projection is a custom (non-EPSG) projection.

Reimplemented in ossimUtmProjection.

Definition at line 94 of file ossimMapProjection.cpp.

References ossimEpsgProjectionDatabase::findProjectionCode(), ossimEpsgProjectionDatabase::instance(), and thePcsCode.

Referenced by ossimGpkgWriter::addLevels(), ossimPdfWriter::getEpsgCode(), ossimTiffInfo::getPcsCode(), ossimGpkgWriter::getProjectionDimensionsInMeters(), ossimGpkgSpatialRefSysRecord::init(), ossimGmlSupportData::initialize(), ossimGpkgWriter::initializeProjectionRect(), ossimGeoTiff::parseProjection(), saveState(), ossimGdalWriter::writeProjectionInfo(), ossimGeoTiff::writeTags(), and ossimWriter::writeTiffTags().

95 {
96  // The PCS code is not always set when the projection is instantiated with explicit parameters,
97  // since the code is only necessary when looking up those parameters in a database. However, it
98  // is still necessary to recognize when an explicit projection coincides with an EPSG-specified
99  // projection, and assign our PCS code to match it. So let's take this opportunity now to make
100  // sure the PCS code is properly initialized.
101  if (thePcsCode == 0)
102  {
104  if (thePcsCode == 0)
105  thePcsCode = 32767; // user-defined (non-EPSG) projection
106  }
107 
108  if (thePcsCode == 32767)
109  return 0; // 32767 only used internally. To the rest of OSSIM, the PCS=0 is undefined
110 
111  return thePcsCode;
112 }
ossim_uint32 findProjectionCode(const ossimString &projection_name) const
Given a projection name, assigns the group (e.g., "EPSG") and code of the projection.
static ossimEpsgProjectionDatabase * instance()
Instantiates singleton instance of this class:
ossim_uint32 thePcsCode
Projection Coordinate System(PCS) code.

◆ getProjectionName()

ossimString ossimMapProjection::getProjectionName ( ) const
virtual

Returns the projection name.

Reimplemented in ossimCadrgProjection.

Definition at line 114 of file ossimMapProjection.cpp.

References ossimObject::getClassName().

Referenced by ossimGeoTiff::parseProjection(), ossimMapProjectionInfo::print(), and ossimGdalWriter::writeProjectionInfo().

115 {
116  return getClassName();
117 }
virtual ossimString getClassName() const
Definition: ossimObject.cpp:64

◆ getProjectionUnits()

ossimUnitType ossimMapProjection::getProjectionUnits ( ) const
inline

OSSIM considers all map projection coordinates (including false eastings and northings) to be in meters.

However, some standard projection specifications (cf EPSG spec) indicate coordinates in feet (US and Intl). Since the methods forward() and inverse() always deal in meters, the user of this projection may need to convert their map coordinates to meters prior to calling inverse() (and after calling forward() if the coordinates need to be in the original unit. This class keeps track of the original units so that a user can query and convert the map point coordinates to meters as needed.

Definition at line 286 of file ossimMapProjection.h.

Referenced by ossimPointCloudGeometry::convertPos(), ossimGeoTiff::getPcsUnitType(), and ossimTiffWriter::getPcsUnitType().

286 { return theProjectionUnits; }
ossimUnitType theProjectionUnits
Linear units of the projection as indicated in the projection&#39;s specification:

◆ getStandardParallel1()

double ossimMapProjection::getStandardParallel1 ( ) const
virtual

Derived classes should implement as needed.

This implementation returns 0.0.

Returns
The first standard parallel.

Reimplemented in ossimAlbersProjection, and ossimLambertConformalConicProjection.

Definition at line 1587 of file ossimMapProjection.cpp.

Referenced by ossimGeoTiff::parseProjection().

1588 {
1589  return 0.0;
1590 }

◆ getStandardParallel2()

double ossimMapProjection::getStandardParallel2 ( ) const
virtual

Derived classes should implement as needed.

This implementation returns 0.0.

Returns
The second standard parallel.

Reimplemented in ossimAlbersProjection, and ossimLambertConformalConicProjection.

Definition at line 1592 of file ossimMapProjection.cpp.

Referenced by ossimGeoTiff::parseProjection().

1593 {
1594  return 0.0;
1595 }

◆ getUlEastingNorthing()

const ossimDpt & ossimMapProjection::getUlEastingNorthing ( ) const
virtual

Definition at line 144 of file ossimMapProjection.cpp.

References theUlEastingNorthing.

Referenced by applyScale().

145 {
146  return theUlEastingNorthing;
147 }
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.

◆ getUlGpt()

const ossimGpt & ossimMapProjection::getUlGpt ( ) const
virtual

Definition at line 149 of file ossimMapProjection.cpp.

References theUlGpt.

Referenced by ossimNitfWriterBase::addGeolobTag(), applyScale(), and ossimGdalOgrVectorAnnotation::verifyViewParams().

150 {
151  return theUlGpt;
152 }
ossimGpt theUlGpt
Hold tie point in decimal degrees.

◆ hasModelTransform()

bool ossimMapProjection::hasModelTransform ( ) const
inline

Definition at line 263 of file ossimMapProjection.h.

References OSSIM_UNIT_UNKNOWN.

Referenced by operator==(), update(), and updateFromTransform().

264  {
266  }
ossimUnitType theModelTransformUnitType

◆ inverse()

virtual ossimGpt ossimMapProjection::inverse ( const ossimDpt projectedPoint) const
pure virtual

◆ isAffectedByElevation()

virtual bool ossimMapProjection::isAffectedByElevation ( ) const
inlinevirtual

Implementation of pure virtual ossimProjection::isAffectedByElevation method.

Returns
false.

Implements ossimProjection.

Definition at line 273 of file ossimMapProjection.h.

273 { return false; }

◆ isEqualTo()

bool ossimMapProjection::isEqualTo ( const ossimObject obj,
ossimCompareType  compareType = OSSIM_COMPARE_FULL 
) const
virtual

Reimplemented from ossimProjection.

Definition at line 1537 of file ossimMapProjection.cpp.

References ossimDatum::isEqualTo(), ossimProjection::isEqualTo(), ossimDpt::isEqualTo(), ossimEllipsoid::isEqualTo(), ossimMatrix4x4::isEqualTo(), ossimGpt::isEqualTo(), OSSIM_COMPARE_FULL, theDatum, theDegreesPerPixel, theElevationLookupFlag, theEllipsoid, theFalseEastingNorthing, theInverseModelTransform, theMetersPerPixel, theModelTransform, theModelTransformUnitType, theOrigin, thePcsCode, theProjectionUnits, theUlEastingNorthing, and theUlGpt.

1538 {
1539  const ossimMapProjection* mapProj = dynamic_cast<const ossimMapProjection*>(&obj);
1540  bool result = mapProj&&ossimProjection::isEqualTo(obj, compareType);
1541 
1542  if(result)
1543  {
1544  result = (theEllipsoid.isEqualTo(mapProj->theEllipsoid, compareType)&&
1545  theOrigin.isEqualTo(mapProj->theOrigin, compareType)&&
1546  theMetersPerPixel.isEqualTo(mapProj->theMetersPerPixel, compareType)&&
1547  theDegreesPerPixel.isEqualTo(mapProj->theDegreesPerPixel, compareType)&&
1548  theUlGpt.isEqualTo(mapProj->theUlGpt, compareType)&&
1549  theUlEastingNorthing.isEqualTo(mapProj->theUlEastingNorthing, compareType)&&
1551  (thePcsCode == mapProj->thePcsCode)&&
1557  (theProjectionUnits == mapProj->theProjectionUnits));
1558 
1559  if(result)
1560  {
1561  if(compareType == OSSIM_COMPARE_FULL)
1562  {
1563  if(theDatum&&mapProj->theDatum)
1564  {
1565  result = theDatum->isEqualTo(*mapProj->theDatum, compareType);
1566  }
1567  }
1568  else
1569  {
1570  result = (theDatum==mapProj->theDatum);
1571  }
1572  }
1573  }
1574  return result;
1575 }
ossimMatrix4x4 theModelTransform
bool isEqualTo(const ossimDpt &rhs, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
Definition: ossimDpt.cpp:153
virtual bool isEqualTo(const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
Definition: ossimDatum.cpp:179
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
ossimGpt theUlGpt
Hold tie point in decimal degrees.
ossimMatrix4x4 theInverseModelTransform
virtual bool isEqualTo(const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
virtual bool isEqualTo(const ossimEllipsoid &rhs, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
ossimUnitType theModelTransformUnitType
bool isEqualTo(const ossimGpt &rhs, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
Definition: ossimGpt.cpp:366
ossimUnitType theProjectionUnits
Linear units of the projection as indicated in the projection&#39;s specification:
ossim_uint32 thePcsCode
Projection Coordinate System(PCS) code.
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
bool isEqualTo(const ossimMatrix4x4 &rhs, ossimCompareType compareType=OSSIM_COMPARE_FULL) const
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.
ossimDpt theFalseEastingNorthing
Hold the false easting northing.
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ isGeographic()

bool ossimMapProjection::isGeographic ( ) const
virtual

Reimplemented in ossimEquDistCylProjection, and ossimLlxyProjection.

Definition at line 164 of file ossimMapProjection.cpp.

Referenced by ossimNitfWriterBase::addGeolobTag(), applyScale(), ossimGeoPdfReader::computeBoundingRect(), ossimGmlSupportData::configureGmljp2V2(), ossimTilingRect::getConvertedDistance(), ossimTiling::getConvertedTilingDistance(), ossimTiling::getDeltaPerPixel(), ossimMapProjectionInfo::getGeom(), ossimMG4LidarReader::getGeoProjection(), ossimGpkgWriter::getGsd(), ossimLasReader::getImageGeometry(), ossimPdfWriter::getLgiDictCtm(), ossimPdfWriter::getLgiDictProjectionType(), ossimGpkgTileEntry::getNewMapProjection(), ossimGpkgWriter::getNewOutputProjection(), ossimTilingRect::getPaddingSize(), ossimFgdcXmlDoc::getProjection(), ossimImageGeometry::getTiePoint(), ossimGpkgWriter::getZoomLevels(), ossimTilingRect::initializeBase(), ossimAuxXmlSupportData::initializeProjection(), ossimGpkgWriter::initializeRect(), ossimLasReader::initProjection(), ossimLasReader::initUnits(), ossimTiledElevationDatabase::isCompatible(), lineSampleHeightToWorld(), ossimTilingRect::next(), ossimTiling::next(), operator==(), ossimPointCloudGeometry::ossimPointCloudGeometry(), ossimGeoTiff::parseProjection(), ossimTilingPoly::parseShpFile(), print(), saveState(), ossimLasReader::setGsd(), ossimGpkgWriter::setProjectionTie(), snapTiePointTo(), snapTiePointToOrigin(), update(), ossimTiling::validate(), ossimGdalOgrVectorAnnotation::verifyViewParams(), worldToLineSample(), ossimFgdcFileWriter::writeFile(), ossimGdalWriter::writeProjectionInfo(), ossimGeoTiff::writeTags(), and ossimWriter::writeTiffTags().

165 {
166  return false;
167 }

◆ lineSampleHeightToWorld()

void ossimMapProjection::lineSampleHeightToWorld ( const ossimDpt lineSampPt,
const double &  heightAboveEllipsoid,
ossimGpt worldPt 
) const
virtual

This is the pure virtual that projects the image point to the given elevation above ellipsoid, thereby bypassing reference to a DEM.

Useful for projections that are sensitive to elevation.

Implements ossimProjection.

Reimplemented in ossimEquDistCylProjection.

Definition at line 565 of file ossimMapProjection.cpp.

References ossimGpt::clampLat(), ossimGpt::clampLon(), ossimGpt::datum(), ossimMatrix4x4::getData(), ossimElevManager::getHeightAboveEllipsoid(), ossimUnitConversionTool::getValue(), ossimDpt::hasNans(), ossimGpt::hgt, ossimElevManager::instance(), inverse(), isGeographic(), ossimGpt::isLatNan(), ossimGpt::isLonNan(), ossimDpt::lat, ossimGpt::latd(), ossimDpt::line, ossimDpt::lon, ossimGpt::lond(), ossimGpt::makeNan(), OSSIM_DEGREES, OSSIM_METERS, OSSIM_MINUTES, OSSIM_RADIANS, OSSIM_SECONDS, OSSIM_UNIT_UNKNOWN, ossimDpt::samp, ossimUnitConversionTool::setValue(), theDatum, theDegreesPerPixel, theElevationLookupFlag, theMetersPerPixel, theModelTransform, theModelTransformUnitType, theUlEastingNorthing, theUlGpt, ossimDpt::x, and ossimDpt::y.

Referenced by ossimEquDistCylProjection::lineSampleHeightToWorld(), ossimAdjMapModel::lineSampleHeightToWorld(), and lineSampleToWorld().

568 {
569  // make sure that the passed in lineSample is good and
570  // check to make sure our easting northing is good so
571  // we can compute the line sample.
572  if(lineSample.hasNans())
573  {
574  gpt.makeNan();
575  return;
576  }
578  {
579  const NEWMAT::Matrix& m = theModelTransform.getData();
580  // map transforms can only be 2-D for now so we will look at
581  // the first 2 rows only
582  ossimDpt modelPoint(m[0][0]*lineSample.x + m[0][1]*lineSample.y + m[0][3],
583  m[1][0]*lineSample.x + m[1][1]*lineSample.y + m[1][3]);
585  {
586  case OSSIM_DEGREES:
587  {
588  gpt.latd(modelPoint.lat);
589  gpt.lond(modelPoint.lon);
590  gpt.datum(theDatum);
591  return;
592  }
593  case OSSIM_MINUTES:
594  case OSSIM_SECONDS:
595  case OSSIM_RADIANS:
596  {
598  ut.setValue(modelPoint.x, theModelTransformUnitType);
599  modelPoint.x = ut.getValue(OSSIM_DEGREES);
600  ut.setValue(modelPoint.y, theModelTransformUnitType);
601  modelPoint.y = ut.getValue(OSSIM_DEGREES);
602  gpt.latd(modelPoint.lat);
603  gpt.lond(modelPoint.lon);
604  gpt.datum(theDatum);
605  return;
606  }
607  default:
608  {
610  ut.setValue(modelPoint.x, theModelTransformUnitType);
611  modelPoint.x = ut.getValue(OSSIM_METERS);
612  ut.setValue(modelPoint.y, theModelTransformUnitType);
613  modelPoint.y = ut.getValue(OSSIM_METERS);
614  gpt = inverse(modelPoint);
615  break;
616  }
617  }
618  gpt.datum(theDatum);
619  }
620  else if(isGeographic())
621  {
622  double lat = theUlGpt.latd() - (lineSample.line * theDegreesPerPixel.y);
623  double lon = theUlGpt.lond() + (lineSample.samp * theDegreesPerPixel.x);
624 
625  gpt.latd(lat);
626  gpt.lond(lon);
627  gpt.hgt = hgtEllipsoid;
628  }
629  else
630  {
632  {
633  gpt.makeNan();
634  return;
635  }
636  ossimDpt eastingNorthing;
637 
638  eastingNorthing = (theUlEastingNorthing);
639 
640  eastingNorthing.x += (lineSample.x*theMetersPerPixel.x);
641 
642  //
643  // Note: the Northing is positive up. In image space
644  // the positive axis is down so we must multiply by
645  // -1
646  //
647  eastingNorthing.y += (-lineSample.y*theMetersPerPixel.y);
648 
649 
650  //
651  // now invert the meters into a ground point.
652  //
653  gpt = inverse(eastingNorthing);
654  gpt.datum(theDatum);
655 
656  if(gpt.isLatNan() && gpt.isLonNan())
657  {
658  gpt.makeNan();
659  }
660  else
661  {
662  gpt.clampLat(-90, 90);
663  gpt.clampLon(-180, 180);
664 
665  // Finally assign the specified height:
666  gpt.hgt = hgtEllipsoid;
667  }
668  }
670  {
672  }
673 }
ossimMatrix4x4 theModelTransform
const NEWMAT::Matrix & getData() const
double getValue(ossimUnitType unitType=OSSIM_METERS) const
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
void setValue(double value, ossimUnitType unitType=OSSIM_METERS)
double y
Definition: ossimDpt.h:165
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
virtual bool isGeographic() const
static ossimElevManager * instance()
METHOD: instance() Implements singelton pattern.
ossimGpt theUlGpt
Hold tie point in decimal degrees.
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
virtual ossimGpt inverse(const ossimDpt &projectedPoint) const =0
Will take a point in meters and convert it to ground.
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
ossimUnitType theModelTransformUnitType
virtual double getHeightAboveEllipsoid(const ossimGpt &gpt)
bool hasNans() const
Definition: ossimDpt.h:67
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
double x
Definition: ossimDpt.h:164
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ lineSampleToEastingNorthing()

void ossimMapProjection::lineSampleToEastingNorthing ( const ossimDpt liineSample,
ossimDpt eastingNorthing 
) const
virtual

Definition at line 700 of file ossimMapProjection.cpp.

References ossimDpt::hasNans(), ossimDpt::makeNan(), theMetersPerPixel, theUlEastingNorthing, ossimDpt::x, and ossimDpt::y.

Referenced by ossimMapCompositionSource::addMeterGridLabels(), ossimMapCompositionSource::addMeterGridLines(), ossimMapCompositionSource::addMeterGridReseaux(), ossimImageGeometry::getTiePoint(), ossimMapProjectionInfo::initializeMembers(), ossimGpkgWriter::initializeRect(), ossimGdalWriter::writeProjectionInfo(), and ossimWriter::writeTiffTags().

702 {
703  // make sure that the passed in lineSample is good and
704  // check to make sure our easting northing is good so
705  // we can compute the line sample.
706  //
707  if(lineSample.hasNans()||theUlEastingNorthing.hasNans())
708  {
709  eastingNorthing.makeNan();
710  return;
711  }
712  ossimDpt deltaPoint = lineSample;
713 
714  eastingNorthing.x = theUlEastingNorthing.x + deltaPoint.x*theMetersPerPixel.x;
715  eastingNorthing.y = theUlEastingNorthing.y + (-deltaPoint.y)*theMetersPerPixel.y ;
716 
717  // eastingNorthing.x += (lineSample.x*theMetersPerPixel.x);
718 
719  // Note: the Northing is positive up. In image space
720  // the positive axis is down so we must multiply by
721  // -1
722  // eastingNorthing.y += (-lineSample.y*theMetersPerPixel.y);
723 }
double y
Definition: ossimDpt.h:165
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
bool hasNans() const
Definition: ossimDpt.h:67
double x
Definition: ossimDpt.h:164
void makeNan()
Definition: ossimDpt.h:65

◆ lineSampleToWorld() [1/2]

ossimGpt ossimMapProjection::lineSampleToWorld ( const ossimDpt projectedPoint) const
virtual

◆ lineSampleToWorld() [2/2]

void ossimMapProjection::lineSampleToWorld ( const ossimDpt lineSampPt,
ossimGpt worldPt 
) const
virtual

METHOD: lineSampleToWorld() Performs the inverse projection from line, sample to ground (world):

Implements ossimProjection.

Reimplemented in ossimLlxyProjection, and ossimCadrgProjection.

Definition at line 682 of file ossimMapProjection.cpp.

References lineSampleHeightToWorld(), and ossim::nan().

684 {
685  double elev = ossim::nan();
686 
687 // if(theElevationLookupFlag)
688 // {
689 // elev = ossimElevManager::instance()->getHeightAboveEllipsoid(worldPt);
690 // }
691 
692  lineSampleHeightToWorld(lineSampPt, elev, worldPt);
693 
694 }
double nan()
Method to return ieee floating point double precision NAN.
Definition: ossimCommon.h:135
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...

◆ loadState()

bool ossimMapProjection::loadState ( const ossimKeywordlist kwl,
const char *  prefix = 0 
)
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 ossimProjection.

Reimplemented in ossimAlbersProjection, ossimLambertConformalConicProjection, ossimEquDistCylProjection, ossimLlxyProjection, ossimObliqueMercatorProjection, ossimMercatorProjection, ossimAzimEquDistProjection, ossimTransCylEquAreaProjection, ossimTransMercatorProjection, ossimCylEquAreaProjection, ossimEckert6Projection, ossimSinusoidalProjection, ossimEckert4Projection, ossimVanDerGrintenProjection, ossimBonneProjection, ossimMollweidProjection, ossimOrthoGraphicProjection, ossimCassiniProjection, ossimMillerProjection, ossimPolyconicProjection, ossimGnomonicProjection, ossimStereographicProjection, ossimPolarStereoProjection, ossimUtmProjection, ossimNewZealandMapGridProjection, ossimSpaceObliqueMercatorProjection, ossimCadrgProjection, ossimUpsProjection, ossimBngProjection, and ossimGoogleProjection.

Definition at line 923 of file ossimMapProjection.cpp.

References ossimKeywordNames::CENTRAL_MERIDIAN_KW, ossimDatumFactoryRegistry::create(), ossimGpt::datum(), ossimKeywordNames::ELEVATION_LOOKUP_FLAG_KW, ossimDatum::ellipsoid(), ossimKeywordlist::find(), ossimUnitConversionTool::getValue(), ossimUnitTypeLut::instance(), ossimDatumFactoryRegistry::instance(), ossimDatumFactory::instance(), ossimGpt::latd(), ossimProjection::loadState(), ossimEllipsoid::loadState(), ossimGpt::lond(), ossimDpt::makeNan(), ossimKeywordNames::ORIGIN_LATITUDE_KW, OSSIM_DEGREES, OSSIM_FEET, OSSIM_METERS, OSSIM_US_SURVEY_FEET, ossimKeywordNames::PCS_CODE_KW, ossimKeywordNames::PIXEL_SCALE_UNITS_KW, ossimKeywordNames::PIXEL_SCALE_XY_KW, ossimUnitConversionTool::setValue(), theDatum, theDegreesPerPixel, theElevationLookupFlag, theEllipsoid, theMetersPerPixel, theOrigin, thePcsCode, theUlGpt, ossimString::toBool(), ossimDpt::toPoint(), ossimString::toUInt32(), ossimDatumFactory::wgs84(), ossimDpt::x, and ossimDpt::y.

Referenced by assign(), ossimGoogleProjection::loadState(), ossimBngProjection::loadState(), ossimUpsProjection::loadState(), ossimNewZealandMapGridProjection::loadState(), ossimUtmProjection::loadState(), ossimPolarStereoProjection::loadState(), ossimGnomonicProjection::loadState(), ossimStereographicProjection::loadState(), ossimCassiniProjection::loadState(), ossimPolyconicProjection::loadState(), ossimMillerProjection::loadState(), ossimMollweidProjection::loadState(), ossimOrthoGraphicProjection::loadState(), ossimBonneProjection::loadState(), ossimEckert4Projection::loadState(), ossimVanDerGrintenProjection::loadState(), ossimEckert6Projection::loadState(), ossimSinusoidalProjection::loadState(), ossimCylEquAreaProjection::loadState(), ossimTransMercatorProjection::loadState(), ossimTransCylEquAreaProjection::loadState(), ossimAzimEquDistProjection::loadState(), ossimMercatorProjection::loadState(), ossimObliqueMercatorProjection::loadState(), ossimLlxyProjection::loadState(), ossimLambertConformalConicProjection::loadState(), and ossimAlbersProjection::loadState().

924 {
925  ossimProjection::loadState(kwl, prefix);
926 
927  const char* elevLookupFlag = kwl.find(prefix, ossimKeywordNames::ELEVATION_LOOKUP_FLAG_KW);
928  if(elevLookupFlag)
929  {
930  theElevationLookupFlag = ossimString(elevLookupFlag).toBool();
931  }
932  // Get the ellipsoid.
933  theEllipsoid.loadState(kwl, prefix);
934 
935  const char *lookup;
936 
937  // Get the Projection Coordinate System (assumed from EPSG database).
938  // NOTE: the code is read here for saving in this object only.
939  // The code is not verified until a call to getPcs() is called. If ONLY this code
940  // had been provided, then the EPSG projection factory would populate a new instance of the
941  // corresponding map projection and have it saveState for constructing again later in the
942  // conventional fashion here
943  thePcsCode = 0;
944  lookup = kwl.find(prefix, ossimKeywordNames::PCS_CODE_KW);
945  if(lookup)
946  thePcsCode = ossimString(lookup).toUInt32(); // EPSG PROJECTION CODE
947 
948  // The datum can be specified in 2 ways: either via OSSIM/geotrans alpha-codes or EPSG code.
949  // Last resort use WGS 84 (consider throwing an exception to catch any bad datums):
951  if (theDatum == NULL)
952  {
954  }
955 
956  // Set all ossimGpt-type members to use this datum:
959 
960  // Fetch the ellipsoid from the datum:
961  const ossimEllipsoid* ellipse = theDatum->ellipsoid();
962  if(ellipse)
963  theEllipsoid = *ellipse;
964 
965  // Get the latitude of the origin.
966  lookup = kwl.find(prefix, ossimKeywordNames::ORIGIN_LATITUDE_KW);
967  if (lookup)
968  {
969  theOrigin.latd(ossimString(lookup).toFloat64());
970  }
971  // else ???
972 
973  // Get the central meridian.
974  lookup = kwl.find(prefix, ossimKeywordNames::CENTRAL_MERIDIAN_KW);
975  if (lookup)
976  {
977  theOrigin.lond(ossimString(lookup).toFloat64());
978  }
979  // else ???
980 
981 
982  // Get the pixel scale.
985  lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_SCALE_UNITS_KW);
986  if (lookup)
987  {
988  ossimUnitType units =
990  getEntryNumber(lookup));
991 
992  lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_SCALE_XY_KW);
993  if (lookup)
994  {
995  ossimDpt scale;
996  scale.toPoint(std::string(lookup));
997 
998  switch (units)
999  {
1000  case OSSIM_METERS:
1001  {
1002  theMetersPerPixel = scale;
1003  break;
1004  }
1005  case OSSIM_DEGREES:
1006  {
1007  theDegreesPerPixel.x = scale.x;
1008  theDegreesPerPixel.y = scale.y;
1009  break;
1010  }
1011  case OSSIM_FEET:
1012  case OSSIM_US_SURVEY_FEET:
1013  {
1015  ut.setValue(scale.x, units);
1017  ut.setValue(scale.y, units);
1019  break;
1020  }
1021  default:
1022  {
1023  if(traceDebug())
1024  {
1025  // Unhandled unit type!
1027  << "ossimMapProjection::loadState WARNING!"
1028  << "Unhandled unit type for "
1031  getEntryString(units).c_str() )
1032  << endl;
1033  }
1034  break;
1035  }
1036  } // End of switch (units)
1037 
1038  } // End of if (PIXEL_SCALE_XY)
1039 
1040  } // End of if (PIXEL_SCALE_UNITS)
1041  else
1042  {
1043  // BACKWARDS COMPATIBILITY LOOKUPS...
1044  lookup = kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_X_KW);
1045  if(lookup)
1046  {
1047  theMetersPerPixel.x = fabs(ossimString(lookup).toFloat64());
1048  }
1049 
1050  lookup = kwl.find(prefix, ossimKeywordNames::METERS_PER_PIXEL_Y_KW);
1051  if(lookup)
1052  {
1053  theMetersPerPixel.y = fabs(ossimString(lookup).toFloat64());
1054  }
1055 
1056  lookup = kwl.find(prefix,
1058  if(lookup)
1059  {
1060  theDegreesPerPixel.y = fabs(ossimString(lookup).toFloat64());
1061  }
1062 
1063  lookup = kwl.find(prefix,
1065  if(lookup)
1066  {
1067  theDegreesPerPixel.x = fabs(ossimString(lookup).toFloat64());
1068  }
1069  }
1070 
1071  // Get the tie point.
1072  theUlGpt.makeNan();
1073 
1074  // Since this won't be picked up from keywords set to 0 to keep nan out.
1075  theUlGpt.hgt = 0.0;
1076 
1078  lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_UNITS_KW);
1079  if (lookup)
1080  {
1081  ossimUnitType units = static_cast<ossimUnitType>(ossimUnitTypeLut::instance()->
1082  getEntryNumber(lookup));
1083 
1084  lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_XY_KW);
1085  if (lookup)
1086  {
1087  ossimDpt tie;
1088  tie.toPoint(std::string(lookup));
1089 
1090  switch (units)
1091  {
1092  case OSSIM_METERS:
1093  {
1094  theUlEastingNorthing = tie;
1095  break;
1096  }
1097  case OSSIM_DEGREES:
1098  {
1099  theUlGpt.lond(tie.x);
1100  theUlGpt.latd(tie.y);
1101  break;
1102  }
1103  case OSSIM_FEET:
1104  case OSSIM_US_SURVEY_FEET:
1105  {
1107  ut.setValue(tie.x, units);
1109  ut.setValue(tie.y, units);
1111  break;
1112  }
1113  default:
1114  {
1115  if(traceDebug())
1116  {
1117  // Unhandled unit type!
1119  << "ossimMapProjection::loadState WARNING!"
1120  << "Unhandled unit type for "
1123  getEntryString(units).c_str() )
1124  << endl;
1125  }
1126  break;
1127  }
1128  } // End of switch (units)
1129 
1130  } // End of if (TIE_POINT_XY)
1131 
1132  } // End of if (TIE_POINT_UNITS)
1133  else
1134  {
1135  // BACKWARDS COMPATIBILITY LOOKUPS...
1136  lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_EASTING_KW);
1137  if(lookup)
1138  {
1140  }
1141 
1142  lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_NORTHING_KW);
1143  if(lookup)
1144  {
1146  }
1147 
1148  lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LAT_KW);
1149  if (lookup)
1150  {
1151  theUlGpt.latd(ossimString(lookup).toFloat64());
1152  }
1153 
1154  lookup = kwl.find(prefix, ossimKeywordNames::TIE_POINT_LON_KW);
1155  if (lookup)
1156  {
1157  theUlGpt.lond(ossimString(lookup).toFloat64());
1158  }
1159  }
1160 
1161  // Get the false easting northing.
1162  theFalseEastingNorthing.x = 0.0;
1163  theFalseEastingNorthing.y = 0.0;
1164  ossimUnitType en_units = OSSIM_METERS;
1166  if (lookup)
1167  {
1168  en_units = static_cast<ossimUnitType>(ossimUnitTypeLut::instance()->getEntryNumber(lookup));
1169  }
1170 
1171  lookup = kwl.find(prefix, ossimKeywordNames::FALSE_EASTING_NORTHING_KW);
1172  if (lookup)
1173  {
1174  ossimDpt eastingNorthing;
1175  eastingNorthing.toPoint(std::string(lookup));
1176 
1177  switch (en_units)
1178  {
1179  case OSSIM_METERS:
1180  {
1181  theFalseEastingNorthing = eastingNorthing;
1182  break;
1183  }
1184  case OSSIM_FEET:
1185  case OSSIM_US_SURVEY_FEET:
1186  {
1188  ut.setValue(eastingNorthing.x, en_units);
1190  ut.setValue(eastingNorthing.y, en_units);
1192  break;
1193  }
1194  default:
1195  {
1196  if(traceDebug())
1197  {
1198  // Unhandled unit type!
1200  << "ossimMapProjection::loadState WARNING! Unhandled unit type for "
1202  << (ossimUnitTypeLut::instance()->getEntryString(en_units).c_str())
1203  << endl;
1204  }
1205  break;
1206  }
1207  } // End of switch (units)
1208  } // End of if (FALSE_EASTING_NORTHING_KW)
1209  else
1210  {
1211  // BACKWARDS COMPATIBILITY LOOKUPS...
1212  lookup = kwl.find(prefix, ossimKeywordNames::FALSE_EASTING_KW);
1213  if(lookup)
1214  {
1216  }
1217 
1218  lookup = kwl.find(prefix, ossimKeywordNames::FALSE_NORTHING_KW);
1219  if(lookup)
1220  {
1222  }
1223  }
1224 
1225 // if((theDegreesPerPixel.x!=OSSIM_DBL_NAN)&&
1226 // (theDegreesPerPixel.y!=OSSIM_DBL_NAN)&&
1227 // theMetersPerPixel.hasNans())
1228 // {
1229 // theMetersPerPixel = theOrigin.metersPerDegree();
1230 // theMetersPerPixel.x *= theDegreesPerPixel.x;
1231 // theMetersPerPixel.y *= theDegreesPerPixel.y;
1232 // }
1233 
1234  lookup = kwl.find(prefix, ossimKeywordNames::PIXEL_TYPE_KW);
1235  if (lookup)
1236  {
1237  ossimString pixelType = lookup;
1238  pixelType=pixelType.trim();
1239  if(pixelType!="")
1240  {
1241  pixelType.downcase();
1242  if(pixelType.contains("area"))
1243  {
1244  if( theMetersPerPixel.hasNans() == false)
1245  {
1247  {
1250  }
1251  }
1252  if(theDegreesPerPixel.hasNans() == false)
1253  {
1256  }
1257  }
1258  }
1259  }
1260 
1261  // We preserve the units of the originally created projection (typically from EPSG proj factory)
1262  // in case user needs map coordinates in those units (versus default meters)
1263  lookup = kwl.find(prefix, ossimKeywordNames::ORIGINAL_MAP_UNITS_KW);
1264  if (lookup)
1265  {
1267  getEntryNumber(lookup));
1268  }
1269 
1271  const char* modelTransform = kwl.find(prefix, ossimKeywordNames::IMAGE_MODEL_TRANSFORM_MATRIX_KW);
1272  const char* modelTransformUnit = kwl.find(prefix, ossimKeywordNames::IMAGE_MODEL_TRANSFORM_UNIT_KW);
1273  if(modelTransform&&modelTransformUnit) // row ordered 4x4 matrix. Should be 16 values
1274  {
1275 
1276  NEWMAT::Matrix& m = theModelTransform.getData();
1277  istringstream in(modelTransform);
1278  ossim_uint32 row, col;
1279  ossimString value;
1280  for(row = 0; row < 4; ++row)
1281  {
1282  for(col = 0; col < 4; ++col)
1283  {
1284  in >> value;
1285  m[row][col] = value.toDouble();
1286  }
1287  }
1288  // make sure these have the identity and all unused are 0.0
1289  m[2][2] = 1.0;
1290  m[2][0] = 0.0;
1291  m[2][1] = 0.0;
1292  m[2][3] = 0.0;
1293  m[3][3] = 1.0;
1294  m[3][2] = 0.0;
1295  m[3][1] = 0.0;
1296  m[3][0] = 0.0;
1297 
1298  if(!in.fail())
1299  {
1300  try
1301  {
1305  getEntryNumber(modelTransformUnit));
1306  }
1307  catch(...)
1308  {
1310  }
1311  }
1312  }
1313 
1314  //---
1315  // Set the datum of the origin and tie point.
1316  // Use method that does NOT perform a shift.
1317  //---
1318  if(theDatum)
1319  {
1322  }
1323 
1324  if(theMetersPerPixel.hasNans() &&
1326  {
1327  ossimDpt mpd = ossimGpt().metersPerDegree();
1328  if(isGeographic())
1329  {
1330  theDegreesPerPixel.lat = 1.0/mpd.y;
1331  theDegreesPerPixel.lon = 1.0/mpd.y;
1332  }
1333  else
1334  {
1335  theMetersPerPixel.x = 1.0;
1336  theMetersPerPixel.y = 1.0;
1337  }
1338  }
1339 
1340  //---
1341  // Final sanity check:
1342  //---
1343  if ( theOrigin.hasNans() )
1344  {
1346  {
1347  const NEWMAT::Matrix& m = theModelTransform.getData();
1348  theOrigin.lon = m[0][3];
1349  theOrigin.lat = m[1][3];
1350  }
1351  else
1352  {
1354  << __FILE__ << ": " << __LINE__
1355  << "\nossimMapProjection::loadState ERROR: Origin is not set!"
1356  << std::endl;
1357  }
1358  }
1359 
1360  return true;
1361 }
ossimMatrix4x4 theModelTransform
const NEWMAT::Matrix & getData() const
static const char * DECIMAL_DEGREES_PER_PIXEL_LAT
double getValue(ossimUnitType unitType=OSSIM_METERS) const
ossimMatrix4x4 & i()
static const char * FALSE_EASTING_NORTHING_UNITS_KW
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
static const char * CENTRAL_MERIDIAN_KW
ossimUnitType
bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
static ossimDatumFactoryRegistry * instance()
instance method
const char * find(const char *key) const
virtual ossimString getEntryString(ossim_int32 entry_number) const
static const char * ORIGINAL_MAP_UNITS_KW
static const char * IMAGE_MODEL_TRANSFORM_MATRIX_KW
void setValue(double value, ossimUnitType unitType=OSSIM_METERS)
double y
Definition: ossimDpt.h:165
bool contains(char aChar) const
Definition: ossimString.h:58
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
void makeNan()
Definition: ossimGpt.h:130
static const char * TIE_POINT_LON_KW
virtual bool isGeographic() const
virtual ossim_int32 getEntryNumber(const char *entry_string, bool case_insensitive=true) const
ossim_float64 hgt
Height in meters above the ellipsiod.
Definition: ossimGpt.h:274
ossim_uint32 toUInt32() const
ossimGpt theUlGpt
Hold tie point in decimal degrees.
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
static const char * METERS_PER_PIXEL_Y_KW
ossimMatrix4x4 theInverseModelTransform
const ossimDatum * datum() const
datum().
Definition: ossimGpt.h:196
static const char * PIXEL_SCALE_XY_KW
static const char * ELEVATION_LOOKUP_FLAG_KW
static const char * TIE_POINT_NORTHING_KW
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
double lat
Definition: ossimDpt.h:165
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
ossimUnitType theModelTransformUnitType
static const char * TIE_POINT_XY_KW
ossim_float64 lon
Definition: ossimGpt.h:266
static const char * TIE_POINT_EASTING_KW
static const char * FALSE_NORTHING_KW
bool toBool() const
String to numeric methods.
unsigned int ossim_uint32
virtual const ossimDatum * create(const ossimString &code) const
create method
ossimString trim(const ossimString &valueToTrim=ossimString(" \\)) const
this will strip lead and trailing character passed in.
void toPoint(const std::string &s)
Initializes this point from string.
Definition: ossimDpt.cpp:192
virtual const ossimEllipsoid * ellipsoid() const
Definition: ossimDatum.h:60
double toDouble() const
ossim_float64 toFloat64() const
static ossimDatumFactory * instance()
static const char * FALSE_EASTING_KW
static const char * DECIMAL_DEGREES_PER_PIXEL_LON
static const char * IMAGE_MODEL_TRANSFORM_UNIT_KW
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
static const char * FALSE_EASTING_NORTHING_KW
ossimUnitType theProjectionUnits
Linear units of the projection as indicated in the projection&#39;s specification:
bool hasNans() const
Definition: ossimDpt.h:67
double lon
Definition: ossimDpt.h:164
static const char * ORIGIN_LATITUDE_KW
ossim_uint32 thePcsCode
Projection Coordinate System(PCS) code.
static const char * PCS_CODE_KW
bool hasNans() const
Definition: ossimGpt.h:135
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
static const char * PIXEL_TYPE_KW
double x
Definition: ossimDpt.h:164
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
ossimDpt metersPerDegree() const
Definition: ossimGpt.cpp:498
ossim_float64 lat
Definition: ossimGpt.h:265
static const char * TIE_POINT_LAT_KW
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.
const ossimDatum * wgs84() const
std::basic_istringstream< char > istringstream
Class for char input memory streams.
Definition: ossimIosFwd.h:32
ossimDpt theFalseEastingNorthing
Hold the false easting northing.
static ossimUnitTypeLut * instance()
Returns the static instance of an ossimUnitTypeLut object.
static const char * METERS_PER_PIXEL_X_KW
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
void makeNan()
Definition: ossimDpt.h:65
static const char * PIXEL_SCALE_UNITS_KW
static const char * TIE_POINT_UNITS_KW
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ operator==()

bool ossimMapProjection::operator== ( const ossimProjection projection) const
virtual

Compares this to arg projection and returns TRUE if the same.

NOTE: As currently implemented in OSSIM, map projections also contain image geometry information like tiepoint and scale. This operator is only concerned with the map specification and ignores image geometry differences.

Implements ossimProjection.

Reimplemented in ossimLambertConformalConicProjection, ossimAlbersProjection, ossimLlxyProjection, ossimObliqueMercatorProjection, ossimMercatorProjection, ossimTransMercatorProjection, ossimUtmProjection, ossimTransCylEquAreaProjection, ossimSinusoidalProjection, ossimVanDerGrintenProjection, ossimBonneProjection, ossimMollweidProjection, ossimSpaceObliqueMercatorProjection, ossimCadrgProjection, ossimUpsProjection, and ossimGoogleProjection.

Definition at line 1484 of file ossimMapProjection.cpp.

References ossimObject::getClassName(), ossimMatrix4x4::getData(), hasModelTransform(), isGeographic(), OSSIM_UNIT_UNKNOWN, theDatum, theDegreesPerPixel, theFalseEastingNorthing, theMetersPerPixel, theModelTransform, theOrigin, thePcsCode, theProjectionUnits, theUlEastingNorthing, and theUlGpt.

Referenced by ossimUtmProjection::operator==().

1485 {
1486  // Verify that derived types match:
1487  if (getClassName() != projection.getClassName())
1488  return false;
1489 
1490  // If both PCS codes are non-zero, that's all we need to check:
1491  const ossimMapProjection* mapProj = dynamic_cast<const ossimMapProjection*>(&projection);
1492  if (thePcsCode && mapProj->thePcsCode && (thePcsCode != 32767) &&
1493  (thePcsCode == mapProj->thePcsCode) )
1494  {
1495  return true;
1496  }
1497 
1498  if ( *theDatum != *(mapProj->theDatum) )
1499  return false;
1500 
1501  if (theOrigin != mapProj->theOrigin)
1502  return false;
1503 
1505  return false;
1506 
1507 #if 0
1508  THIS SECTION IGNORED SINCE IT DEALS WITH IMAGE GEOMETRY, NOT MAP PROJECTION
1509  if (isGeographic())
1510  {
1511  if ((theDegreesPerPixel != mapProj->theDegreesPerPixel) ||
1512  (theUlGpt != mapProj->theUlGpt))
1513  return false;
1514  }
1515  else
1516  {
1517  if ((theMetersPerPixel != mapProj->theMetersPerPixel) ||
1519  return false;
1520  }
1521 #endif
1522 
1523  // Units must match:
1525  (mapProj->theProjectionUnits != OSSIM_UNIT_UNKNOWN) &&
1526  (theProjectionUnits != mapProj->theProjectionUnits))
1527  return false;
1528 
1529  // Check transform if present and compare it also:
1530  if (hasModelTransform() && mapProj->hasModelTransform() &&
1532  return false;
1533 
1534  return true;
1535 }
ossimMatrix4x4 theModelTransform
const NEWMAT::Matrix & getData() const
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
virtual bool isGeographic() const
virtual ossimString getClassName() const
Definition: ossimObject.cpp:64
ossimGpt theUlGpt
Hold tie point in decimal degrees.
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
bool hasModelTransform() const
ossimUnitType theProjectionUnits
Linear units of the projection as indicated in the projection&#39;s specification:
ossim_uint32 thePcsCode
Projection Coordinate System(PCS) code.
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
ossimDpt theFalseEastingNorthing
Hold the false easting northing.
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ origin()

ossimGpt ossimMapProjection::origin ( ) const
virtual

◆ print()

std::ostream & ossimMapProjection::print ( std::ostream &  out) const
virtual

Prints data members to stream.

Returns stream&.

Reimplemented from ossimProjection.

Reimplemented in ossimLambertConformalConicProjection, ossimLlxyProjection, ossimTransMercatorProjection, and ossimUtmProjection.

Definition at line 1366 of file ossimMapProjection.cpp.

References ossimString::c_str(), ossimKeywordNames::CENTRAL_MERIDIAN_KW, ossimDatum::code(), ossimKeywordNames::DATUM_KW, ossimKeywordNames::FALSE_EASTING_NORTHING_KW, ossimKeywordNames::FALSE_EASTING_NORTHING_UNITS_KW, ossimEllipsoid::getA(), ossimEllipsoid::getB(), ossimObject::getClassName(), ossimLookUpTable::getEntryString(), ossimUnitTypeLut::instance(), isGeographic(), ossim::isnan(), ossimGpt::latd(), ossimGpt::lond(), ossimKeywordNames::MAJOR_AXIS_KW, ossimKeywordNames::METERS_PER_PIXEL_X_KW, ossimKeywordNames::METERS_PER_PIXEL_Y_KW, ossimKeywordNames::MINOR_AXIS_KW, ossimKeywordNames::ORIGIN_LATITUDE_KW, OSSIM_DEGREES, OSSIM_METERS, ossimKeywordNames::PCS_CODE_KW, ossimKeywordNames::PIXEL_SCALE_UNITS_KW, ossimKeywordNames::PIXEL_SCALE_XY_KW, ossimProjection::print(), theDatum, theDegreesPerPixel, theEllipsoid, theFalseEastingNorthing, theMetersPerPixel, theOrigin, thePcsCode, theUlEastingNorthing, theUlGpt, ossimKeywordNames::TIE_POINT_UNITS_KW, ossimKeywordNames::TIE_POINT_XY_KW, ossimDpt::toString(), ossimString::toString(), ossimKeywordNames::TYPE_KW, ossimDpt::x, and ossimDpt::y.

Referenced by ossimUtmProjection::print(), ossimTransMercatorProjection::print(), ossimLlxyProjection::print(), ossimTiling::print(), ossimLambertConformalConicProjection::print(), and ossimMapProjectionInfo::print().

1367 {
1368  const char MODULE[] = "ossimMapProjection::print";
1369 
1370  out << setiosflags(ios::fixed) << setprecision(15)
1371  << "\n// " << MODULE
1372  << "\n" << ossimKeywordNames::TYPE_KW << ": "
1373  << getClassName()
1374  << "\n" << ossimKeywordNames::MAJOR_AXIS_KW << ": "
1375  << theEllipsoid.getA()
1376  << "\n" << ossimKeywordNames::MINOR_AXIS_KW << ": "
1377  << theEllipsoid.getB()
1378  << "\n" << ossimKeywordNames::ORIGIN_LATITUDE_KW << ": "
1379  << theOrigin.latd()
1380  << "\n" << ossimKeywordNames::CENTRAL_MERIDIAN_KW << ": "
1381  << theOrigin.lond()
1382  << "\norigin: " << theOrigin
1383  << "\n" << ossimKeywordNames::DATUM_KW << ": "
1384  << (theDatum?theDatum->code().c_str():"unknown")
1385  << "\n" << ossimKeywordNames::METERS_PER_PIXEL_X_KW << ": "
1387  << "\n" << ossimKeywordNames::METERS_PER_PIXEL_Y_KW << ": "
1388  << ((ossim::isnan(theMetersPerPixel.y))?ossimString("nan"):ossimString::toString(theMetersPerPixel.y, 15))
1389  << "\n" << ossimKeywordNames::FALSE_EASTING_NORTHING_KW << ": "
1390  << theFalseEastingNorthing.toString().c_str()
1391  << "\n" << ossimKeywordNames::FALSE_EASTING_NORTHING_UNITS_KW << ": "
1392  << ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS)
1393  << "\n" << ossimKeywordNames::PCS_CODE_KW << ": " << thePcsCode;
1394 
1395  if(isGeographic())
1396  {
1397  out << "\n" << ossimKeywordNames::TIE_POINT_XY_KW << ": "
1399  << "\n" << ossimKeywordNames::TIE_POINT_UNITS_KW << ": "
1401  << "\n" << ossimKeywordNames::PIXEL_SCALE_XY_KW << ": "
1403  << "\n" << ossimKeywordNames::PIXEL_SCALE_UNITS_KW << ": "
1405  << std::endl;
1406  }
1407  else
1408  {
1409  out << "\n" << ossimKeywordNames::TIE_POINT_XY_KW << ": "
1411  << "\n" << ossimKeywordNames::TIE_POINT_UNITS_KW << ": "
1413  << "\n" << ossimKeywordNames::PIXEL_SCALE_XY_KW << ": "
1415  << "\n" << ossimKeywordNames::PIXEL_SCALE_UNITS_KW << ": "
1417  << std::endl;
1418  }
1419 
1420  return ossimProjection::print(out);
1421 }
ossim_uint32 x
static const char * MINOR_AXIS_KW
static const char * DATUM_KW
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
static const char * CENTRAL_MERIDIAN_KW
ossim_uint32 y
virtual ossimString getEntryString(ossim_int32 entry_number) const
virtual std::ostream & print(std::ostream &out) const
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
This code was derived from https://gist.github.com/mshockwave.
Definition: Barrier.h:8
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
virtual const ossimString & code() const
Definition: ossimDatum.h:57
virtual bool isGeographic() const
virtual ossimString getClassName() const
Definition: ossimObject.cpp:64
ossimGpt theUlGpt
Hold tie point in decimal degrees.
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
static const char * TYPE_KW
static const char * PIXEL_SCALE_XY_KW
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
static const char * TIE_POINT_XY_KW
static const char * MAJOR_AXIS_KW
const double & getA() const
static const char * ORIGIN_LATITUDE_KW
ossim_uint32 thePcsCode
Projection Coordinate System(PCS) code.
ossimString toString(ossim_uint32 precision=15) const
Definition: ossimDpt.cpp:160
const double & getB() const
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
double x
Definition: ossimDpt.h:164
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.
ossimDpt theFalseEastingNorthing
Hold the false easting northing.
static ossimUnitTypeLut * instance()
Returns the static instance of an ossimUnitTypeLut object.
static const char * METERS_PER_PIXEL_X_KW
static const char * PIXEL_SCALE_UNITS_KW
static const char * TIE_POINT_UNITS_KW
bool isnan(const float &v)
isnan Test for floating point Not A Number (NAN) value.
Definition: ossimCommon.h:91
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ saveState()

bool ossimMapProjection::saveState ( ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Method to save the state of an object to a keyword list.

Return true if ok or false on error.

Reimplemented from ossimProjection.

Reimplemented in ossimAlbersProjection, ossimLambertConformalConicProjection, ossimEquDistCylProjection, ossimLlxyProjection, ossimObliqueMercatorProjection, ossimMercatorProjection, ossimAzimEquDistProjection, ossimTransCylEquAreaProjection, ossimTransMercatorProjection, ossimCylEquAreaProjection, ossimEckert6Projection, ossimSinusoidalProjection, ossimEckert4Projection, ossimVanDerGrintenProjection, ossimBonneProjection, ossimMollweidProjection, ossimOrthoGraphicProjection, ossimCassiniProjection, ossimMillerProjection, ossimPolyconicProjection, ossimGnomonicProjection, ossimStereographicProjection, ossimPolarStereoProjection, ossimUtmProjection, ossimNewZealandMapGridProjection, ossimSpaceObliqueMercatorProjection, ossimCadrgProjection, ossimUpsProjection, ossimBngProjection, and ossimGoogleProjection.

Definition at line 811 of file ossimMapProjection.cpp.

References ossimKeywordlist::add(), ossimString::c_str(), ossimKeywordNames::CENTRAL_MERIDIAN_KW, ossimDatum::code(), ossimKeywordNames::DATUM_KW, ossimKeywordNames::ELEVATION_LOOKUP_FLAG_KW, ossimKeywordNames::FALSE_EASTING_NORTHING_KW, ossimKeywordNames::FALSE_EASTING_NORTHING_UNITS_KW, ossimMatrix4x4::getData(), getPcsCode(), ossimKeywordNames::IMAGE_MODEL_TRANSFORM_MATRIX_KW, ossimKeywordNames::IMAGE_MODEL_TRANSFORM_UNIT_KW, ossimUnitTypeLut::instance(), isGeographic(), ossimGpt::latd(), ossimGpt::lond(), ossimKeywordNames::ORIGIN_LATITUDE_KW, ossimKeywordNames::ORIGINAL_MAP_UNITS_KW, OSSIM_DEGREES, OSSIM_METERS, OSSIM_UNIT_UNKNOWN, ossimKeywordNames::PCS_CODE_KW, ossimKeywordNames::PIXEL_SCALE_UNITS_KW, ossimKeywordNames::PIXEL_SCALE_XY_KW, ossimProjection::saveState(), ossimEllipsoid::saveState(), ossimKeywordNames::SRS_NAME_KW, theDatum, theDegreesPerPixel, theElevationLookupFlag, theEllipsoid, theFalseEastingNorthing, theMetersPerPixel, theModelTransform, theModelTransformUnitType, theOrigin, theProjectionUnits, theUlEastingNorthing, theUlGpt, ossimKeywordNames::TIE_POINT_UNITS_KW, ossimKeywordNames::TIE_POINT_XY_KW, ossimDpt::toString(), and ossimString::toString().

Referenced by ossimMapProjectionInfo::getGeom(), ossimGoogleProjection::saveState(), ossimBngProjection::saveState(), ossimUpsProjection::saveState(), ossimMapViewController::saveState(), ossimNewZealandMapGridProjection::saveState(), ossimUtmProjection::saveState(), ossimPolarStereoProjection::saveState(), ossimStereographicProjection::saveState(), ossimGnomonicProjection::saveState(), ossimMillerProjection::saveState(), ossimCassiniProjection::saveState(), ossimPolyconicProjection::saveState(), ossimBonneProjection::saveState(), ossimMollweidProjection::saveState(), ossimOrthoGraphicProjection::saveState(), ossimVanDerGrintenProjection::saveState(), ossimEckert4Projection::saveState(), ossimEckert6Projection::saveState(), ossimSinusoidalProjection::saveState(), ossimAdjMapModel::saveState(), ossimCylEquAreaProjection::saveState(), ossimTransMercatorProjection::saveState(), ossimTransCylEquAreaProjection::saveState(), ossimAzimEquDistProjection::saveState(), ossimMercatorProjection::saveState(), ossimObliqueMercatorProjection::saveState(), ossimLlxyProjection::saveState(), ossimEquDistCylProjection::saveState(), ossimLambertConformalConicProjection::saveState(), ossimAlbersProjection::saveState(), ossimGdalWriter::writeProjectionInfo(), and ossimGeoTiff::writeTags().

812 {
813  ossimProjection::saveState(kwl, prefix);
814 
815  kwl.add(prefix,
817  theOrigin.latd(),
818  true);
819 
820  kwl.add(prefix,
822  theOrigin.lond(),
823  true);
824 
825  theEllipsoid.saveState(kwl, prefix);
826 
827  if(theDatum)
828  {
829  kwl.add(prefix,
831  theDatum->code(),
832  true);
833  }
834 
835  // Calling access method to give it an opportunity to update the code in case of param change:
836  ossim_uint32 code = getPcsCode();
837  if (code)
838  {
839  ossimString epsg_spec = ossimString("EPSG:") + ossimString::toString(code);
840  kwl.add(prefix, ossimKeywordNames::SRS_NAME_KW, epsg_spec, true);
841  }
842 
843  if(isGeographic())
844  {
845  kwl.add(prefix,
847  ossimDpt(theUlGpt).toString().c_str(),
848  true);
849  kwl.add(prefix,
851  ossimUnitTypeLut::instance()->getEntryString(OSSIM_DEGREES),
852  true);
853  kwl.add(prefix,
856  true);
857  kwl.add(prefix,
859  ossimUnitTypeLut::instance()->getEntryString(OSSIM_DEGREES),
860  true);
861  }
862  else
863  {
864  kwl.add(prefix,
867  true);
868  kwl.add(prefix,
870  ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS),
871  true);
872  kwl.add(prefix,
875  true);
876  kwl.add(prefix,
878  ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS),
879  true);
880  kwl.add(prefix,
883  true);
884  }
885 
886  kwl.add(prefix, ossimKeywordNames::PCS_CODE_KW, code, true);
890  ossimUnitTypeLut::instance()->getEntryString(OSSIM_METERS), true);
893 
895  {
896  const NEWMAT::Matrix& m = theModelTransform.getData();
897  ostringstream out;
898  ossim_uint32 row, col;
899  for(row = 0; row < 4; ++row)
900  {
901  for(col = 0; col < 4; ++col)
902  {
903  out << std::setprecision(20) << m[row][col] << " ";
904  }
905  }
906  kwl.add(prefix,
908  out.str().c_str(),
909  true);
910  kwl.add(prefix,
913  true);
914  }
915 
916  return true;
917 }
ossimMatrix4x4 theModelTransform
const NEWMAT::Matrix & getData() const
std::basic_ostringstream< char > ostringstream
Class for char output memory streams.
Definition: ossimIosFwd.h:35
static const char * DATUM_KW
static const char * FALSE_EASTING_NORTHING_UNITS_KW
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
static const char * CENTRAL_MERIDIAN_KW
virtual ossim_uint32 getPcsCode() const
Returns the EPSG PCS code or 32767 if the projection is a custom (non-EPSG) projection.
static const char * ORIGINAL_MAP_UNITS_KW
static const char * IMAGE_MODEL_TRANSFORM_MATRIX_KW
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
virtual const ossimString & code() const
Definition: ossimDatum.h:57
static ossimString toString(bool aValue)
Numeric to string methods.
virtual bool isGeographic() const
ossimGpt theUlGpt
Hold tie point in decimal degrees.
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
static const char * PIXEL_SCALE_XY_KW
static const char * ELEVATION_LOOKUP_FLAG_KW
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
ossimUnitType theModelTransformUnitType
static const char * TIE_POINT_XY_KW
unsigned int ossim_uint32
static const char * IMAGE_MODEL_TRANSFORM_UNIT_KW
static const char * FALSE_EASTING_NORTHING_KW
ossimUnitType theProjectionUnits
Linear units of the projection as indicated in the projection&#39;s specification:
static const char * ORIGIN_LATITUDE_KW
static const char * PCS_CODE_KW
ossimString toString(ossim_uint32 precision=15) const
Definition: ossimDpt.cpp:160
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.
ossimDpt theFalseEastingNorthing
Hold the false easting northing.
static ossimUnitTypeLut * instance()
Returns the static instance of an ossimUnitTypeLut object.
static const char * SRS_NAME_KW
static const char * PIXEL_SCALE_UNITS_KW
static const char * TIE_POINT_UNITS_KW
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ setAB()

void ossimMapProjection::setAB ( double  a,
double  b 
)
virtual

Definition at line 174 of file ossimMapProjection.cpp.

References ossimEllipsoid::setA(), ossimEllipsoid::setB(), theEllipsoid, and update().

175 {
177 }
void setB(double b)
void setA(double a)
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.

◆ setDatum()

void ossimMapProjection::setDatum ( const ossimDatum datum)
virtual

Sets theDatum to datum.

Sets theEllipsiod to datum's ellipsiod. Calls update().

Definition at line 179 of file ossimMapProjection.cpp.

References ossimGpt::changeDatum(), ossimDatum::ellipsoid(), theDatum, theEllipsoid, theOrigin, thePcsCode, theUlGpt, and update().

Referenced by ossimEpsgProjectionDatabase::createProjFromFormatARecord(), ossimEpsgProjectionDatabase::createProjFromUtmCode(), and ossimEpsgProjectionDatabase::findProjection().

180 {
181 
182  if (!datum || (*theDatum == *datum))
183  return;
184 
185  theDatum = datum;
187 
188  // Change the datum of the ossimGpt data members:
191 
192  update();
193 
194  // A change of datum usually implies a change of EPSG codes. Reset the PCS code. It will be
195  // reestablished as needed in the getPcsCode() method:
196  thePcsCode = 0;
197 }
ossimGpt theUlGpt
Hold tie point in decimal degrees.
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
Definition: ossimGpt.cpp:316
virtual const ossimEllipsoid * ellipsoid() const
Definition: ossimDatum.h:60
ossim_uint32 thePcsCode
Projection Coordinate System(PCS) code.
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ setDecimalDegreesPerPixel()

void ossimMapProjection::setDecimalDegreesPerPixel ( const ossimDpt gsd)
virtual

◆ setElevationLookupFlag()

void ossimMapProjection::setElevationLookupFlag ( bool  flag)

Definition at line 1689 of file ossimMapProjection.cpp.

References theElevationLookupFlag.

Referenced by ossimRangeDomeTileSource::initialize().

1690 {
1691  theElevationLookupFlag = flag;
1692 }

◆ setEllipsoid()

void ossimMapProjection::setEllipsoid ( const ossimEllipsoid ellipsoid)
virtual

SET METHODS:

Definition at line 169 of file ossimMapProjection.cpp.

References theEllipsoid, and update().

170 {
171  theEllipsoid = ellipsoid; update();
172 }
ossimEllipsoid theEllipsoid
This method verifies that the projection parameters match the current pcs code.

◆ setMatrix()

void ossimMapProjection::setMatrix ( double  rotation,
const ossimDpt scale,
const ossimDpt translation 
)

◆ setMatrixRotation()

void ossimMapProjection::setMatrixRotation ( double  rotation)

◆ setMatrixScale()

void ossimMapProjection::setMatrixScale ( const ossimDpt scale)

◆ setMatrixTranslation()

void ossimMapProjection::setMatrixTranslation ( const ossimDpt translation)

◆ setMetersPerPixel()

void ossimMapProjection::setMetersPerPixel ( const ossimDpt gsd)
virtual

Reimplemented in ossimLlxyProjection.

Definition at line 726 of file ossimMapProjection.cpp.

References computeDegreesPerPixel(), and theMetersPerPixel.

Referenced by ossimGeoPdfReader::computeBoundingRect(), ATP::AtpGenerator::constructChain(), ossimChipProcTool::getChip(), ossimMG4LidarReader::getGeoProjection(), ossimGpkgTileEntry::getNewMapProjection(), ossimGpkgWriter::getNewOutputProjection(), ossimFgdcXmlDoc::getProjection(), ossimRangeDomeTileSource::initialize(), ossimTilingRect::initializeBase(), ossimAuxXmlSupportData::initializeProjection(), ossimViewshedTool::initializeProjectionGsd(), ossimEquationUtil::initInputSources(), ossimLasReader::initProjection(), ossimPointCloudTool::loadPC(), newUtmView(), ossimTiling::next(), ossimVpfAnnotationSource::ossimVpfAnnotationSource(), ossimPointCloudTool::setGSD(), ossimPointCloudImageHandler::setGSD(), ossimLasReader::setGsd(), ossimLlxyProjection::setMetersPerPixel(), ossimEquDistCylProjection::setOrigin(), ossimOrthoImageMosaic::updateGeometry(), ossimApplanixUtmModel::updateModel(), and ossimGdalOgrVectorAnnotation::verifyViewParams().

727 {
728  theMetersPerPixel = resolution;
730 }
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
virtual void computeDegreesPerPixel()
Computes the approximate resolution in degrees/pixel.

◆ setModelTransformUnitType()

void ossimMapProjection::setModelTransformUnitType ( ossimUnitType  unit)
inline

Definition at line 259 of file ossimMapProjection.h.

260  {
262  }
ossimUnitType theModelTransformUnitType

◆ setOrigin()

void ossimMapProjection::setOrigin ( const ossimGpt origin)
virtual

Sets theOrigin to origin.

Sets theDatum to origin's datum. Sets theEllipsiod to datum's ellipsiod. Calls update().

Parameters
originThe projection origin.

Reimplemented in ossimEquDistCylProjection, and ossimUtmProjection.

Definition at line 199 of file ossimMapProjection.cpp.

References ossimGpt::changeDatum(), origin(), theDatum, theOrigin, and update().

Referenced by ossimEpsgProjectionFactory::createProjFromAutoCode(), ossimEpsgProjectionDatabase::createProjFromFormatARecord(), ossimRpfTocEntry::getImageGeometry(), ossimPointCloudImageHandler::getImageGeometry(), ossimChipperUtil::getNewGeoScaledProjection(), ossimRangeDomeTileSource::initialize(), ossimViewshedTool::initializeProjectionGsd(), ossimEquationUtil::initInputSources(), ossimUtmProjection::setOrigin(), and ossimEquDistCylProjection::setOrigin().

200 {
201  // Set the origin and since the origin has a datum which in turn has
202  // an ellipsoid, sync them up.
203  // NOTE: Or perhaps we need to change the datum of the input origin to that of theDatum? (OLK 05/11)
204  theOrigin = origin;
206 
207  update();
208 }
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
Definition: ossimGpt.cpp:316
virtual ossimGpt origin() const
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ setPcsCode()

void ossimMapProjection::setPcsCode ( ossim_uint32  pcsCode)
virtual

◆ setProjectionUnits()

void ossimMapProjection::setProjectionUnits ( ossimUnitType  units)
inline

Definition at line 275 of file ossimMapProjection.h.

Referenced by ossimEpsgProjectionDatabase::createProjFromFormatARecord().

275 { theProjectionUnits = units; }
ossimUnitType theProjectionUnits
Linear units of the projection as indicated in the projection&#39;s specification:

◆ setUlEastingNorthing()

void ossimMapProjection::setUlEastingNorthing ( const ossimDpt ulEastingNorthing)
virtual

Definition at line 789 of file ossimMapProjection.cpp.

References theUlEastingNorthing.

Referenced by ossimGeoPdfReader::computeBoundingRect(), setUlTiePoints(), and ossimOrthoImageMosaic::updateGeometry().

790 {
791  theUlEastingNorthing = ulEastingNorthing;
792 }
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.

◆ setUlGpt()

void ossimMapProjection::setUlGpt ( const ossimGpt ulGpt)
virtual

Definition at line 798 of file ossimMapProjection.cpp.

References ossimGpt::changeDatum(), ossimGpt::datum(), theDatum, and theUlGpt.

Referenced by ossimGdalOgrVectorAnnotation::computeDefaultView(), ossimKmlSuperOverlayReader::createDefaultProj(), ossimOgrVectorTileSource::createDefaultProj(), setUlTiePoints(), ossimOrthoImageMosaic::updateGeometry(), and ossimGdalOgrVectorAnnotation::verifyViewParams().

799 {
800  theUlGpt = ulGpt;
801 
802  // The ossimGpt data members need to use the same datum as this projection:
803  if (*theDatum != *(ulGpt.datum()))
805 }
ossimGpt theUlGpt
Hold tie point in decimal degrees.
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
Definition: ossimGpt.cpp:316
const ossimDatum * datum() const
datum().
Definition: ossimGpt.h:196
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

◆ setUlTiePoints() [1/2]

void ossimMapProjection::setUlTiePoints ( const ossimGpt gpt)
virtual

◆ setUlTiePoints() [2/2]

void ossimMapProjection::setUlTiePoints ( const ossimDpt eastingNorthing)
virtual

Definition at line 778 of file ossimMapProjection.cpp.

References inverse(), setUlEastingNorthing(), and setUlGpt().

779 {
780  setUlEastingNorthing(eastingNorthing);
781  setUlGpt(inverse(eastingNorthing));
782 }
virtual ossimGpt inverse(const ossimDpt &projectedPoint) const =0
Will take a point in meters and convert it to ground.
virtual void setUlGpt(const ossimGpt &ulGpt)
virtual void setUlEastingNorthing(const ossimDpt &ulEastingNorthing)

◆ snapTiePointTo()

void ossimMapProjection::snapTiePointTo ( ossim_float64  multiple,
ossimUnitType  unitType 
)

Utility method to snap the tie point to some multiple.

This is used to overcome inaccuracies in formats like NITF's rpc tag witch has a four digit decimal degree precision for the lat/lon offset.

Parameters
multipleValue to snap tie point to like 1.0.
unitTypeOSSIM_METERS or OSSIM_DEGREES.

EXAMPLE1: projection: ossimUtmProjection tie point is: 551634.88, 4492036.16 multiple: 1.0 unitType: OSSIM_METERS new tie point: 551635.00, 4492036.00

EXAMPLE2: projection: ossimEquDistCylProjection tie point is: -90.3246343 42.0297589 multiple: 0.0001 unitType: OSSIM_DEGREES new tie point: -90.3246 42.0298

Definition at line 1597 of file ossimMapProjection.cpp.

References forward(), ossimUnitConversionTool::getDegrees(), getFalseEasting(), getFalseNorthing(), ossimUnitConversionTool::getMeters(), inverse(), isGeographic(), ossimGpt::latd(), ossimGpt::lond(), OSSIM_DEGREES, OSSIM_METERS, ossimUnitConversionTool::setOrigin(), ossimUnitConversionTool::setValue(), theOrigin, theUlEastingNorthing, theUlGpt, ossimDpt::x, and ossimDpt::y.

1599 {
1600  ossim_float64 convertedMultiple = multiple;
1601 
1602  if (isGeographic() && (unitType != OSSIM_DEGREES) )
1603  {
1604  // Convert to degrees.
1605  ossimUnitConversionTool convertor;
1606  convertor.setOrigin(theOrigin);
1607  convertor.setValue(multiple, unitType);
1608  convertedMultiple = convertor.getDegrees();
1609  }
1610  else if ( !isGeographic() && (unitType != OSSIM_METERS) )
1611  {
1612  // Convert to meters.
1613  ossimUnitConversionTool convertor;
1614  convertor.setOrigin(theOrigin);
1615  convertor.setValue(multiple, unitType);
1616  convertedMultiple = convertor.getMeters();
1617  }
1618 
1619  // Convert the tie point.
1620  if (isGeographic())
1621  {
1622  // Snap the latitude.
1623  ossim_float64 d = theUlGpt.latd();
1624  d = ossim::round<int>(d / convertedMultiple) * convertedMultiple;
1625  theUlGpt.latd(d);
1626 
1627  // Snap the longitude.
1628  d = theUlGpt.lond();
1629  d = ossim::round<int>(d / convertedMultiple) * convertedMultiple;
1630  theUlGpt.lond(d);
1631 
1632  // Adjust the stored easting / northing.
1634  }
1635  else
1636  {
1637  // Snap the easting.
1639  d = ossim::round<int>(d / convertedMultiple) * convertedMultiple;
1641 
1642  // Snap the northing.
1644  d = ossim::round<int>(d / convertedMultiple) * convertedMultiple;
1646 
1647  // Adjust the stored upper left ground point.
1649  }
1650 }
virtual double getFalseNorthing() const
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
void setValue(double value, ossimUnitType unitType=OSSIM_METERS)
double y
Definition: ossimDpt.h:165
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
virtual bool isGeographic() const
ossimGpt theUlGpt
Hold tie point in decimal degrees.
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
virtual ossimGpt inverse(const ossimDpt &projectedPoint) const =0
Will take a point in meters and convert it to ground.
double ossim_float64
void setOrigin(const ossimGpt &gpt)
virtual ossimDpt forward(const ossimGpt &worldPoint) const =0
All map projections will convert the world coordinate to an easting northing (Meters).
virtual double getFalseEasting() const
double x
Definition: ossimDpt.h:164

◆ snapTiePointToOrigin()

void ossimMapProjection::snapTiePointToOrigin ( )

Definition at line 1652 of file ossimMapProjection.cpp.

References forward(), getFalseEasting(), getFalseNorthing(), inverse(), isGeographic(), ossimGpt::latd(), ossimGpt::lond(), origin(), theDegreesPerPixel, theMetersPerPixel, theUlEastingNorthing, theUlGpt, ossimDpt::x, and ossimDpt::y.

1653 {
1654  // Convert the tie point.
1655  if (isGeographic())
1656  {
1657  // Note the origin may not be 0.0, 0.0:
1658 
1659  // Snap the latitude.
1660  ossim_float64 d = theUlGpt.latd() - origin().latd();
1661  d = ossim::round<int>(d / theDegreesPerPixel.y) * theDegreesPerPixel.y;
1662  theUlGpt.latd(d + origin().latd());
1663 
1664  // Snap the longitude.
1665  d = theUlGpt.lond() - origin().lond();
1666  d = ossim::round<int>(d / theDegreesPerPixel.x) * theDegreesPerPixel.x;
1667  theUlGpt.lond(d + origin().lond());
1668 
1669  // Adjust the stored easting / northing.
1671  }
1672  else
1673  {
1674  // Snap the easting.
1676  d = ossim::round<int>(d / theMetersPerPixel.x) * theMetersPerPixel.x;
1678 
1679  // Snap the northing.
1681  d = ossim::round<int>(d / theMetersPerPixel.y) * theMetersPerPixel.y;
1683 
1684  // Adjust the stored upper left ground point.
1686  }
1687 }
virtual double getFalseNorthing() const
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
double y
Definition: ossimDpt.h:165
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
virtual bool isGeographic() const
ossimGpt theUlGpt
Hold tie point in decimal degrees.
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
virtual ossimGpt inverse(const ossimDpt &projectedPoint) const =0
Will take a point in meters and convert it to ground.
double ossim_float64
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
virtual ossimGpt origin() const
virtual ossimDpt forward(const ossimGpt &worldPoint) const =0
All map projections will convert the world coordinate to an easting northing (Meters).
virtual double getFalseEasting() const
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
double x
Definition: ossimDpt.h:164

◆ update()

void ossimMapProjection::update ( )
virtual

Reimplemented in ossimSpaceObliqueMercatorProjection, ossimAlbersProjection, ossimLambertConformalConicProjection, ossimEquDistCylProjection, ossimObliqueMercatorProjection, ossimAzimEquDistProjection, ossimOrthoGraphicProjection, ossimSinusoidalProjection, ossimCylEquAreaProjection, ossimMercatorProjection, ossimPolyconicProjection, ossimTransCylEquAreaProjection, ossimEckert4Projection, ossimMillerProjection, ossimMollweidProjection, ossimVanDerGrintenProjection, ossimGnomonicProjection, ossimPolarStereoProjection, ossimTransMercatorProjection, ossimUtmProjection, ossimBonneProjection, ossimCassiniProjection, ossimEckert6Projection, ossimStereographicProjection, ossimUpsProjection, ossimNewZealandMapGridProjection, ossimGoogleProjection, and ossimBngProjection.

Definition at line 229 of file ossimMapProjection.cpp.

References computeDegreesPerPixel(), computeMetersPerPixel(), forward(), hasModelTransform(), ossimDpt::hasNans(), ossimGpt::hasNans(), inverse(), isGeographic(), ossimDpt::lat, ossimDpt::lon, ossimGpt::metersPerDegree(), theDegreesPerPixel, theMetersPerPixel, theOrigin, theUlEastingNorthing, theUlGpt, updateFromTransform(), ossimDpt::x, and ossimDpt::y.

Referenced by setAB(), setDatum(), setEllipsoid(), setOrigin(), ossimBngProjection::update(), ossimGoogleProjection::update(), ossimNewZealandMapGridProjection::update(), ossimUpsProjection::update(), ossimEckert6Projection::update(), ossimBonneProjection::update(), ossimCassiniProjection::update(), ossimStereographicProjection::update(), ossimGnomonicProjection::update(), ossimPolarStereoProjection::update(), ossimTransMercatorProjection::update(), ossimUtmProjection::update(), ossimMollweidProjection::update(), ossimVanDerGrintenProjection::update(), ossimMillerProjection::update(), ossimEckert4Projection::update(), ossimMercatorProjection::update(), ossimTransCylEquAreaProjection::update(), ossimPolyconicProjection::update(), ossimCylEquAreaProjection::update(), ossimSinusoidalProjection::update(), ossimOrthoGraphicProjection::update(), ossimAzimEquDistProjection::update(), ossimObliqueMercatorProjection::update(), ossimEquDistCylProjection::update(), ossimLambertConformalConicProjection::update(), and ossimAlbersProjection::update().

230 {
231  // if the delta lat and lon per pixel is set then
232  // check to see if the meters were set.
233  //
234  if( hasModelTransform() )
235  {
237  }
238  else if( theDegreesPerPixel.hasNans() == false )
239  {
241  {
243  }
244  }
245  else if(!theMetersPerPixel.hasNans())
246  {
248  }
249  // compute the tie points if not already computed
250  //
251  // The tiepoint was specified either as easting/northing or lat/lon. Need to initialize the one
252  // that has not been assigned yet:
255  else if (theUlGpt.hasNans() && !theUlEastingNorthing.hasNans())
258  {
261  }
262  if(theMetersPerPixel.hasNans() &&
264  {
266  if(isGeographic())
267  {
268  theDegreesPerPixel.lat = 1.0/mpd.y;
269  theDegreesPerPixel.lon = 1.0/mpd.x;
271  }
272  else
273  {
274  theMetersPerPixel.x = 1.0;
275  theMetersPerPixel.y = 1.0;
277  }
278  }
279 }
virtual void computeMetersPerPixel()
This will go from the ground point and give you an approximate meters per pixel.
double y
Definition: ossimDpt.h:165
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
virtual bool isGeographic() const
ossimGpt theUlGpt
Hold tie point in decimal degrees.
virtual ossimGpt inverse(const ossimDpt &projectedPoint) const =0
Will take a point in meters and convert it to ground.
double lat
Definition: ossimDpt.h:165
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
bool hasModelTransform() const
bool hasNans() const
Definition: ossimDpt.h:67
double lon
Definition: ossimDpt.h:164
virtual ossimDpt forward(const ossimGpt &worldPoint) const =0
All map projections will convert the world coordinate to an easting northing (Meters).
bool hasNans() const
Definition: ossimGpt.h:135
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
double x
Definition: ossimDpt.h:164
ossimDpt metersPerDegree() const
Definition: ossimGpt.cpp:498
virtual void computeDegreesPerPixel()
Computes the approximate resolution in degrees/pixel.

◆ updateFromTransform()

void ossimMapProjection::updateFromTransform ( )
protected

Definition at line 281 of file ossimMapProjection.cpp.

References computeDegreesPerPixel(), computeMetersPerPixel(), ossimMatrix4x4::getData(), ossimUnitConversionTool::getValue(), hasModelTransform(), lineSampleToWorld(), OSSIM_DEGREES, OSSIM_METERS, OSSIM_MINUTES, OSSIM_RADIANS, OSSIM_SECONDS, ossimUnitConversionTool::setValue(), theDegreesPerPixel, theMetersPerPixel, theModelTransform, theModelTransformUnitType, theUlEastingNorthing, theUlGpt, ossimDpt::x, and ossimDpt::y.

Referenced by applyScale(), and update().

282 {
283  if ( hasModelTransform() )
284  {
285  const NEWMAT::Matrix& m = theModelTransform.getData();
286  ossimDpt ls1(0, 0);
287  ossimDpt ls2(1, 0);
288  ossimDpt ls3(0, 1);
289  ossimGpt wpt1;
290  ossimGpt wpt2;
291  lineSampleToWorld(ls1, wpt1);
292  ossimDpt mpt1(m[0][0]*ls1.x + m[0][1]*ls1.y + m[0][3],
293  m[1][0]*ls1.x + m[1][1]*ls1.y + m[1][3]);
294  ossimDpt mpt2(m[0][0]*ls2.x + m[0][1]*ls2.y + m[0][3],
295  m[1][0]*ls2.x + m[1][1]*ls2.y + m[1][3]);
296  ossimDpt mpt3(m[0][0]*ls3.x + m[0][1]*ls3.y + m[0][3],
297  m[1][0]*ls3.x + m[1][1]*ls3.y + m[1][3]);
298 
299  double len = 1.0;
300  double len2 = 1.0;
302  {
303  case OSSIM_DEGREES:
304  case OSSIM_MINUTES:
305  case OSSIM_SECONDS:
306  case OSSIM_RADIANS:
307  {
309  len = (mpt1-mpt2).length();
310  len2 = (mpt1-mpt3).length();
311  ut.setValue((len+len2)*.5, theModelTransformUnitType);
312  len = ut.getValue(OSSIM_DEGREES);
313  theDegreesPerPixel = ossimDpt(len, len);
314  theUlGpt = wpt1;
316  break;
317  }
318  default:
319  {
321  len = (mpt1-mpt2).length();
322  len2 = (mpt1-mpt3).length();
324  mpt1.x = ut.getValue(OSSIM_METERS);
326  mpt1.y = ut.getValue(OSSIM_METERS);
327  ut.setValue((len+len2)*.5, theModelTransformUnitType);
328  len = ut.getValue(OSSIM_METERS);
329  theMetersPerPixel = ossimDpt(len, len);
330  theUlEastingNorthing = mpt1;
332  break;
333  }
334  }
335  theUlGpt = wpt1;
336  }
337 
338 }
ossimMatrix4x4 theModelTransform
const NEWMAT::Matrix & getData() const
double getValue(ossimUnitType unitType=OSSIM_METERS) const
virtual void computeMetersPerPixel()
This will go from the ground point and give you an approximate meters per pixel.
void setValue(double value, ossimUnitType unitType=OSSIM_METERS)
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
ossimGpt theUlGpt
Hold tie point in decimal degrees.
virtual ossimGpt lineSampleToWorld(const ossimDpt &projectedPoint) const
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
bool hasModelTransform() const
ossimUnitType theModelTransformUnitType
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
virtual void computeDegreesPerPixel()
Computes the approximate resolution in degrees/pixel.

◆ worldToLineSample() [1/2]

ossimDpt ossimMapProjection::worldToLineSample ( const ossimGpt worldPoint) const
virtual

◆ worldToLineSample() [2/2]

void ossimMapProjection::worldToLineSample ( const ossimGpt worldPoint,
ossimDpt lineSampPt 
) const
virtual

METHOD: worldToLineSample() Performs the forward projection from ground point to line, sample.

Implements ossimProjection.

Reimplemented in ossimEquDistCylProjection, ossimLlxyProjection, and ossimCadrgProjection.

Definition at line 425 of file ossimMapProjection.cpp.

References ossimGpt::changeDatum(), ossimGpt::datum(), forward(), ossimMatrix4x4::getData(), ossimUnitConversionTool::getValue(), isGeographic(), ossimGpt::isLatNan(), ossimGpt::isLonNan(), ossimDpt::isNan(), ossimDpt::lat, ossimGpt::latd(), ossimDpt::line, ossimDpt::lon, ossimGpt::lond(), ossimDpt::makeNan(), OSSIM_DEGREES, OSSIM_FEET, OSSIM_METERS, OSSIM_MINUTES, OSSIM_RADIANS, OSSIM_SECONDS, OSSIM_UNIT_UNKNOWN, OSSIM_US_SURVEY_FEET, ossimDpt::samp, ossimUnitConversionTool::setValue(), theDatum, theDegreesPerPixel, theInverseModelTransform, theMetersPerPixel, theModelTransformUnitType, theOrigin, theUlEastingNorthing, theUlGpt, ossimDpt::x, and ossimDpt::y.

427 {
428 
430  {
431  ossimGpt gpt = worldPoint;
432  if(theDatum)
433  {
434  gpt.changeDatum(theDatum);
435  }
437  {
438  case OSSIM_METERS:
439  case OSSIM_FEET:
441  {
442  ossimDpt modelPoint = forward(gpt);
444  ut.setValue(modelPoint.x, OSSIM_METERS);
445  modelPoint.x = ut.getValue(theModelTransformUnitType);
446  ut.setValue(modelPoint.y, OSSIM_METERS);
447  modelPoint.y = ut.getValue(theModelTransformUnitType);
448  const NEWMAT::Matrix& m = theInverseModelTransform.getData();
449 
450  lineSample.x = m[0][0]*modelPoint.x + m[0][1]*modelPoint.y + m[0][3];
451  lineSample.y = m[1][0]*modelPoint.x + m[1][1]*modelPoint.y + m[1][3];
452 
453  return;
454  }
455  case OSSIM_DEGREES:
456  case OSSIM_RADIANS:
457  case OSSIM_MINUTES:
458  case OSSIM_SECONDS:
459  {
461  ossimDpt modelPoint;
462  modelPoint.lat = gpt.latd();
463  modelPoint.lon = gpt.lond();
464  ut.setValue(modelPoint.lat, OSSIM_DEGREES);
465  modelPoint.lat = ut.getValue(theModelTransformUnitType);
466  ut.setValue(modelPoint.lon, OSSIM_DEGREES);
467  modelPoint.lon = ut.getValue(theModelTransformUnitType);
468  const NEWMAT::Matrix& m = theInverseModelTransform.getData();
469 
470  lineSample.x = m[0][0]*modelPoint.x + m[0][1]*modelPoint.y + m[0][3];
471  lineSample.y = m[1][0]*modelPoint.x + m[1][1]*modelPoint.y + m[1][3];
472  return;
473  }
474  default:
475  {
476  lineSample.makeNan();
477  return;
478  }
479  }
480  }
481  else if(isGeographic())
482  {
483  ossimGpt gpt = worldPoint;
484 
485  if (theOrigin.datum() != gpt.datum())
486  {
487  // Apply datum shift if it's not the same.
488  gpt.changeDatum(theOrigin.datum());
489  }
490 
491  lineSample.line = (theUlGpt.latd() - gpt.latd()) / theDegreesPerPixel.y;
492  lineSample.samp = (gpt.lond() - theUlGpt.lond()) / theDegreesPerPixel.x;
493  }
494  else
495  {
496  // make sure our tie point is good and world point
497  // is good.
498  //
500  worldPoint.isLatNan() || worldPoint.isLonNan())
501  {
502  lineSample.makeNan();
503  return;
504  }
505  // initialize line sample
506  // lineSample = ossimDpt(0,0);
507 
508  // I am commenting this code out because I am going to
509  // move it to the ossimImageViewProjectionTransform.
510  //
511  // see if we have a datum set and if so
512  // shift the world to our datum. If not then
513  // find the easting northing value for the world
514  // point.
515  if(theDatum)
516  {
517  ossimGpt gpt = worldPoint;
518 
519  gpt.changeDatum(theDatum);
520 
521  // lineSample is currently in easting northing
522  // and will need to be converted to line sample.
523  lineSample = forward(gpt);
524  }
525  else
526  {
527  // lineSample is currently in easting northing
528  // and will need to be converted to line sample.
529  lineSample = forward(worldPoint);
530  }
531 
532  // check the final result to make sure there were no
533  // problems.
534  //
535  if(!lineSample.isNan())
536  {
537 // if(!isIdentityMatrix())
538 // {
539 // ossimDpt temp = lineSample;
540 
541 // lineSample.x = theInverseTrans[0][0]*temp.x+
542 // theInverseTrans[0][1]*temp.y+
543 // theInverseTrans[0][2];
544 
545 // lineSample.y = theInverseTrans[1][0]*temp.x+
546 // theInverseTrans[1][1]*temp.y+
547 // theInverseTrans[1][2];
548 // }
549 // else
550  {
551  lineSample.x = ((lineSample.x - theUlEastingNorthing.x)/theMetersPerPixel.x);
552 
553  // We must remember that the Northing is negative since the positive
554  // axis for an image is assumed to go down since it's image space.
555  lineSample.y = (-(lineSample.y - theUlEastingNorthing.y)/theMetersPerPixel.y);
556  }
557  }
558  }
559 }
const NEWMAT::Matrix & getData() const
double getValue(ossimUnitType unitType=OSSIM_METERS) const
double lond() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:97
bool isLonNan() const
Definition: ossimGpt.h:140
void setValue(double value, ossimUnitType unitType=OSSIM_METERS)
double y
Definition: ossimDpt.h:165
ossimDpt theUlEastingNorthing
Hold tie point as easting northing.
virtual bool isGeographic() const
bool isNan() const
Definition: ossimDpt.h:72
ossimGpt theUlGpt
Hold tie point in decimal degrees.
double latd() const
Will convert the radian measure to degrees.
Definition: ossimGpt.h:87
bool isLatNan() const
Definition: ossimGpt.h:139
void changeDatum(const ossimDatum *datum)
This will actually perform a shift.
Definition: ossimGpt.cpp:316
ossimMatrix4x4 theInverseModelTransform
const ossimDatum * datum() const
datum().
Definition: ossimGpt.h:196
double lat
Definition: ossimDpt.h:165
ossimDpt theMetersPerPixel
Holds the number of meters per pixel.
ossimUnitType theModelTransformUnitType
double lon
Definition: ossimDpt.h:164
virtual ossimDpt forward(const ossimGpt &worldPoint) const =0
All map projections will convert the world coordinate to an easting northing (Meters).
ossimDpt theDegreesPerPixel
Hold the decimal degrees per pixel.
double x
Definition: ossimDpt.h:164
const ossimDatum * theDatum
This is only set if we want to have built in datum shifting.

Member Data Documentation

◆ theDatum

const ossimDatum* ossimMapProjection::theDatum
protected

This is only set if we want to have built in datum shifting.

Definition at line 318 of file ossimMapProjection.h.

Referenced by ossimCadrgProjection::forward(), ossimUpsProjection::forward(), ossimNewZealandMapGridProjection::forward(), ossimBonneProjection::forward(), ossimCassiniProjection::forward(), ossimEckert6Projection::forward(), ossimTransMercatorProjection::forward(), ossimEckert4Projection::forward(), ossimUtmProjection::forward(), ossimGnomonicProjection::forward(), ossimPolarStereoProjection::forward(), ossimCylEquAreaProjection::forward(), ossimVanDerGrintenProjection::forward(), ossimMillerProjection::forward(), ossimMollweidProjection::forward(), ossimStereographicProjection::forward(), ossimTransCylEquAreaProjection::forward(), ossimMercatorProjection::forward(), ossimPolyconicProjection::forward(), ossimSinusoidalProjection::forward(), ossimOrthoGraphicProjection::forward(), ossimAzimEquDistProjection::forward(), ossimObliqueMercatorProjection::forward(), ossimEquDistCylProjection::forward(), ossimLambertConformalConicProjection::forward(), ossimSpaceObliqueMercatorProjection::forward(), ossimAlbersProjection::forward(), getDatum(), ossimOrthoGraphicProjection::getGroundClipPoints(), ossimBngProjection::inverse(), ossimCadrgProjection::inverse(), ossimGoogleProjection::inverse(), ossimUpsProjection::inverse(), ossimNewZealandMapGridProjection::inverse(), ossimEckert6Projection::inverse(), ossimTransMercatorProjection::inverse(), ossimBonneProjection::inverse(), ossimUtmProjection::inverse(), ossimCassiniProjection::inverse(), ossimGnomonicProjection::inverse(), ossimPolarStereoProjection::inverse(), ossimVanDerGrintenProjection::inverse(), ossimMillerProjection::inverse(), ossimMollweidProjection::inverse(), ossimStereographicProjection::inverse(), ossimTransCylEquAreaProjection::inverse(), ossimMercatorProjection::inverse(), ossimPolyconicProjection::inverse(), ossimEckert4Projection::inverse(), ossimCylEquAreaProjection::inverse(), ossimSinusoidalProjection::inverse(), ossimOrthoGraphicProjection::inverse(), ossimAzimEquDistProjection::inverse(), ossimObliqueMercatorProjection::inverse(), ossimEquDistCylProjection::inverse(), ossimLambertConformalConicProjection::inverse(), ossimSpaceObliqueMercatorProjection::inverse(), ossimAlbersProjection::inverse(), isEqualTo(), lineSampleHeightToWorld(), ossimEquDistCylProjection::lineSampleHeightToWorld(), loadState(), operator==(), ossimBngProjection::ossimBngProjection(), ossimLlxyProjection::ossimLlxyProjection(), print(), ossimCadrgProjection::saveState(), saveState(), setDatum(), setOrigin(), setUlGpt(), ossimUtmProjection::setZone(), ossimBngProjection::update(), ossimNewZealandMapGridProjection::update(), ossimEquDistCylProjection::update(), worldToLineSample(), and ossimEquDistCylProjection::worldToLineSample().

◆ theDegreesPerPixel

ossimDpt ossimMapProjection::theDegreesPerPixel
protected

◆ theElevationLookupFlag

bool ossimMapProjection::theElevationLookupFlag
protected

◆ theEllipsoid

ossimEllipsoid ossimMapProjection::theEllipsoid
protected

◆ theFalseEastingNorthing

ossimDpt ossimMapProjection::theFalseEastingNorthing
protected

Hold the false easting northing.

x = false easting, y = false northing

Definition at line 349 of file ossimMapProjection.h.

Referenced by getFalseEasting(), getFalseNorthing(), isEqualTo(), ossimPolarStereoProjection::loadState(), ossimStereographicProjection::loadState(), ossimGnomonicProjection::loadState(), ossimCassiniProjection::loadState(), ossimPolyconicProjection::loadState(), ossimMillerProjection::loadState(), ossimMollweidProjection::loadState(), ossimBonneProjection::loadState(), ossimOrthoGraphicProjection::loadState(), ossimEckert4Projection::loadState(), ossimVanDerGrintenProjection::loadState(), ossimSinusoidalProjection::loadState(), ossimEckert6Projection::loadState(), ossimCylEquAreaProjection::loadState(), ossimTransMercatorProjection::loadState(), ossimTransCylEquAreaProjection::loadState(), ossimAzimEquDistProjection::loadState(), ossimMercatorProjection::loadState(), ossimObliqueMercatorProjection::loadState(), ossimLambertConformalConicProjection::loadState(), ossimAlbersProjection::loadState(), operator==(), print(), saveState(), ossimBngProjection::update(), ossimNewZealandMapGridProjection::update(), ossimUpsProjection::update(), ossimStereographicProjection::update(), ossimCassiniProjection::update(), ossimEckert6Projection::update(), ossimBonneProjection::update(), ossimUtmProjection::update(), ossimGnomonicProjection::update(), ossimPolarStereoProjection::update(), ossimTransMercatorProjection::update(), ossimVanDerGrintenProjection::update(), ossimMollweidProjection::update(), ossimEckert4Projection::update(), ossimMillerProjection::update(), ossimTransCylEquAreaProjection::update(), ossimMercatorProjection::update(), ossimPolyconicProjection::update(), ossimCylEquAreaProjection::update(), ossimSinusoidalProjection::update(), ossimOrthoGraphicProjection::update(), ossimAzimEquDistProjection::update(), ossimObliqueMercatorProjection::update(), ossimEquDistCylProjection::update(), ossimLambertConformalConicProjection::update(), and ossimAlbersProjection::update().

◆ theInverseModelTransform

ossimMatrix4x4 ossimMapProjection::theInverseModelTransform
protected

Definition at line 364 of file ossimMapProjection.h.

Referenced by applyScale(), isEqualTo(), and worldToLineSample().

◆ theMetersPerPixel

ossimDpt ossimMapProjection::theMetersPerPixel
protected

◆ theModelTransform

ossimMatrix4x4 ossimMapProjection::theModelTransform
protected

◆ theModelTransformUnitType

ossimUnitType ossimMapProjection::theModelTransformUnitType
protected

◆ theOrigin

ossimGpt ossimMapProjection::theOrigin
protected

Definition at line 313 of file ossimMapProjection.h.

Referenced by computeDegreesPerPixel(), computeMetersPerPixel(), ossimOrthoGraphicProjection::getGroundClipPoints(), getOrigin(), isEqualTo(), ossimCadrgProjection::lineSampleToWorld(), ossimLlxyProjection::lineSampleToWorld(), ossimUtmProjection::loadState(), ossimLlxyProjection::loadState(), loadState(), operator==(), origin(), ossimLlxyProjection::ossimLlxyProjection(), ossimMapProjection(), ossimLlxyProjection::print(), print(), saveState(), setDatum(), ossimUpsProjection::setDefaults(), ossimNewZealandMapGridProjection::setDefaults(), ossimBonneProjection::setDefaults(), ossimObliqueMercatorProjection::setDefaults(), ossimUtmProjection::setHemisphere(), ossimLlxyProjection::setMetersPerPixel(), setOrigin(), ossimUtmProjection::setZone(), snapTiePointTo(), ossimBngProjection::update(), ossimNewZealandMapGridProjection::update(), ossimCassiniProjection::update(), ossimBonneProjection::update(), ossimEckert6Projection::update(), ossimStereographicProjection::update(), ossimGnomonicProjection::update(), ossimUtmProjection::update(), ossimPolarStereoProjection::update(), ossimTransMercatorProjection::update(), ossimMillerProjection::update(), ossimMollweidProjection::update(), ossimEckert4Projection::update(), ossimVanDerGrintenProjection::update(), ossimMercatorProjection::update(), ossimPolyconicProjection::update(), ossimTransCylEquAreaProjection::update(), ossimCylEquAreaProjection::update(), ossimSinusoidalProjection::update(), ossimOrthoGraphicProjection::update(), ossimAzimEquDistProjection::update(), ossimObliqueMercatorProjection::update(), ossimEquDistCylProjection::update(), ossimLambertConformalConicProjection::update(), ossimAlbersProjection::update(), update(), ossimCadrgProjection::worldToLineSample(), worldToLineSample(), and ossimLlxyProjection::worldToLineSample().

◆ thePcsCode

ossim_uint32 ossimMapProjection::thePcsCode
mutableprotected

Projection Coordinate System(PCS) code.

Mutable because they may update automatically after the projection is initialized, even in a const method. Normally set to 0 until the corresponding EPSG code can be determined. If the projection is NOT represented by any EPSG code, then the PCS is set to 32767.

Definition at line 355 of file ossimMapProjection.h.

Referenced by getPcsCode(), isEqualTo(), ossimGoogleProjection::loadState(), loadState(), operator==(), ossimGoogleProjection::ossimGoogleProjection(), print(), setDatum(), setPcsCode(), and ossimEquDistCylProjection::update().

◆ theProjectionUnits

ossimUnitType ossimMapProjection::theProjectionUnits
protected

Linear units of the projection as indicated in the projection's specification:

Definition at line 371 of file ossimMapProjection.h.

Referenced by isEqualTo(), operator==(), saveState(), and ossimEquDistCylProjection::setDefaults().

◆ theUlEastingNorthing

ossimDpt ossimMapProjection::theUlEastingNorthing
protected

◆ theUlGpt

ossimGpt ossimMapProjection::theUlGpt
protected

The documentation for this class was generated from the following files: