OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimMapProjectionInfo.h>
Public Member Functions | |
ossimMapProjectionInfo (const ossimMapProjection *proj, const ossimDrect &output_rect) | |
virtual | ~ossimMapProjectionInfo () |
bool | errorStatus () const |
Returns true on error false if ok. More... | |
void | getGeom (ossimKeywordlist &kwl, const char *prefix=0) const |
Adds tie point to keyword list. More... | |
ossimDpt | getMetersPerPixel () const |
Returns the pixel size in meters. More... | |
ossimDpt | getUsSurveyFeetPerPixel () const |
Returns the pixel size in U.S. More... | |
ossimDpt | getDecimalDegreesPerPixel () const |
Returns the decimal degrees per pixel. More... | |
ossimDpt | ulEastingNorthingPt () const |
Returns the upper left easting and northing as a ossimDpt. More... | |
ossimDpt | urEastingNorthingPt () const |
Returns the upper right easting and northing as a ossimDpt. More... | |
ossimDpt | lrEastingNorthingPt () const |
Returns the lower right easting and northing as a ossimDpt. More... | |
ossimDpt | llEastingNorthingPt () const |
Returns the lower left easting and northing as a ossimDpt. More... | |
ossimDpt | ulEastingNorthingPtInFt () const |
Returns the upper left easting and northing as a ossimDpt. More... | |
ossimDpt | urEastingNorthingPtInFt () const |
Returns the upper right easting and northing as a ossimDpt. More... | |
ossimDpt | lrEastingNorthingPtInFt () const |
Returns the lower right easting and northing as a ossimDpt. More... | |
ossimDpt | llEastingNorthingPtInFt () const |
Returns the lower left easting and northing as a ossimDpt. More... | |
ossimGpt | ulGroundPt () const |
Returns the upper left ground point. More... | |
ossimGpt | urGroundPt () const |
Returns the upper right ground point. More... | |
ossimGpt | lrGroundPt () const |
Returns the lower right ground point. More... | |
ossimGpt | llGroundPt () const |
Returns the lower left ground point. More... | |
ossimGpt | centerGroundPt () const |
Returns the center ground point. More... | |
ossimDpt | centerEastingNorthingPt () const |
ossim_int32 | linesPerImage () const |
ossim_int32 | pixelsPerLine () const |
std::ostream & | print (std::ostream &os) const |
Formatted print of data members. More... | |
void | setPixelType (ossimPixelType type) |
Sets the data member "thePixelType". More... | |
ossimPixelType | getPixelType () const |
Returns data member "thePixelType". More... | |
void | setOutputFeetFlag (bool flag) |
Sets the data member "theOutputInfoInFeetFlag". More... | |
bool | unitsInFeet () const |
Returns the data member "theOutputInfoInFeetFlag". More... | |
ossimString | getImageInfoString () const |
Returns theImageInfoString. More... | |
void | setImageInfoString (const ossimString &string) |
Used to set data member "theImageInfoString". More... | |
const ossimMapProjection * | getProjection () const |
Returns reference to "theProjection". More... | |
virtual bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
virtual bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
![]() | |
ossimObject () | |
virtual | ~ossimObject () |
virtual ossimObject * | dup () const |
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 bool | isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const |
virtual void | accept (ossimVisitor &visitor) |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
Static Public Attributes | |
static const char * | README_IMAGE_STRING_KW |
static const char * | PIXEL_TYPE_KW = "viewinfo.pixel_type" |
static const char * | OUTPUT_US_FT_INFO_KW |
Private Member Functions | |
ossimMapProjectionInfo () | |
ossimMapProjectionInfo & | operator= (const ossimMapProjectionInfo &) |
void | initializeMembers (const ossimDrect &output_rect) |
Private Attributes | |
const ossimMapProjection * | theProjection |
bool | theErrorStatus |
int | theLinesPerImage |
int | thePixelsPerLine |
ossimGpt | theCornerGroundPt [4] |
ossimDpt | theCornerEastingNorthingPt [4] |
ossimGpt | theCenterGroundPt |
ossimDpt | theCenterEastingNorthingPt |
ossimDrect | theBoundingRect |
ossimPixelType | thePixelType |
"thePixelType" defines whether the tie point coordinates are relative to the center of the pixel(which is PIXEL_IS_POINT) or the upper left corner of the pixel(PIXEL_IS_AREA). More... | |
bool | theOutputInfoInFeetFlag |
If "theOutputInfoInFeetFlag" is true the readme file tie point info will be output in both meters and U.S. More... | |
ossimString | theImageInfoString |
"theImageInfoString" goes in the README file "Image:" field to identify the image. More... | |
Additional Inherited Members | |
![]() | |
virtual | ~ossimReferenced () |
Definition at line 34 of file ossimMapProjectionInfo.h.
ossimMapProjectionInfo::ossimMapProjectionInfo | ( | const ossimMapProjection * | proj, |
const ossimDrect & | output_rect | ||
) |
Definition at line 54 of file ossimMapProjectionInfo.cpp.
References initializeMembers(), ossimNotify(), ossimNotifyLevel_FATAL, theErrorStatus, and theProjection.
|
virtual |
Definition at line 91 of file ossimMapProjectionInfo.cpp.
|
private |
ossimDpt ossimMapProjectionInfo::centerEastingNorthingPt | ( | ) | const |
Definition at line 395 of file ossimMapProjectionInfo.cpp.
References theCenterEastingNorthingPt.
ossimGpt ossimMapProjectionInfo::centerGroundPt | ( | ) | const |
Returns the center ground point.
Definition at line 389 of file ossimMapProjectionInfo.cpp.
References theCenterGroundPt.
bool ossimMapProjectionInfo::errorStatus | ( | ) | const |
Returns true on error false if ok.
Definition at line 95 of file ossimMapProjectionInfo.cpp.
References theErrorStatus.
ossimDpt ossimMapProjectionInfo::getDecimalDegreesPerPixel | ( | ) | const |
Returns the decimal degrees per pixel.
x = sample direction y = line direction
Definition at line 544 of file ossimMapProjectionInfo.cpp.
References ossimMapProjection::getDecimalDegreesPerPixel(), and theProjection.
Referenced by llGroundPt(), lrGroundPt(), print(), ulGroundPt(), and urGroundPt().
void ossimMapProjectionInfo::getGeom | ( | ossimKeywordlist & | kwl, |
const char * | prefix = 0 |
||
) | const |
Adds tie point to keyword list.
This will be latitude, longitude if projection is geographic; else, easting, northing.
Definition at line 145 of file ossimMapProjectionInfo.cpp.
References ossimKeywordlist::add(), ossimString::c_str(), ossimUnitTypeLut::instance(), ossimMapProjection::isGeographic(), OSSIM_DEGREES, OSSIM_METERS, ossimMapProjection::saveState(), theProjection, ossimKeywordNames::TIE_POINT_UNITS_KW, ossimKeywordNames::TIE_POINT_XY_KW, ossimDpt::toString(), ulEastingNorthingPt(), and ulGroundPt().
Referenced by ossimERSFileWriter::writeFile(), and ossimEnviHeaderFileWriter::writeFile().
ossimString ossimMapProjectionInfo::getImageInfoString | ( | ) | const |
Returns theImageInfoString.
Definition at line 246 of file ossimMapProjectionInfo.cpp.
References theImageInfoString.
ossimDpt ossimMapProjectionInfo::getMetersPerPixel | ( | ) | const |
Returns the pixel size in meters.
x = sample direction y = line direction
Definition at line 529 of file ossimMapProjectionInfo.cpp.
References ossimMapProjection::getMetersPerPixel(), and theProjection.
Referenced by getUsSurveyFeetPerPixel(), llEastingNorthingPt(), lrEastingNorthingPt(), print(), ulEastingNorthingPt(), and urEastingNorthingPt().
ossimPixelType ossimMapProjectionInfo::getPixelType | ( | ) | const |
Returns data member "thePixelType".
NOTE: OSSIM_PIXEL_IS_POINT (ennumerated to a "0"): Corner coordinates are relative to the center of pixel. OSSIM_PIXEL_IS_AREA (ennumerated to a "1"): Corner coordinates are relative to the outer of the pixel.
Definition at line 231 of file ossimMapProjectionInfo.cpp.
References thePixelType.
Referenced by ossimNitfWriterBase::addBlockaTag(), llEastingNorthingPt(), llGroundPt(), lrEastingNorthingPt(), lrGroundPt(), print(), ulEastingNorthingPt(), ulGroundPt(), urEastingNorthingPt(), and urGroundPt().
const ossimMapProjection * ossimMapProjectionInfo::getProjection | ( | ) | const |
Returns reference to "theProjection".
Definition at line 256 of file ossimMapProjectionInfo.cpp.
References theProjection.
Referenced by ossimGeoTiff::writeTags().
ossimDpt ossimMapProjectionInfo::getUsSurveyFeetPerPixel | ( | ) | const |
Returns the pixel size in U.S.
Survey feet. x = sample direction y = line direction
NOTE: The US survey feet per meter converion (0.3048006096 feet per meter) is NOT the same as the standard feet per meter conversion (0.3048 feet per meter).
Definition at line 534 of file ossimMapProjectionInfo.cpp.
References getMetersPerPixel(), ossim::mtrs2usft(), ossimDpt::x, and ossimDpt::y.
Referenced by print().
|
private |
Definition at line 100 of file ossimMapProjectionInfo.cpp.
References ossimDrect::height(), ossimMapProjection::inverse(), ossimMapProjection::lineSampleToEastingNorthing(), ossimMapProjection::lineSampleToWorld(), ossimDrect::ll(), ossimDrect::lr(), theBoundingRect, theCenterEastingNorthingPt, theCenterGroundPt, theCornerEastingNorthingPt, theCornerGroundPt, theLinesPerImage, thePixelsPerLine, theProjection, ossimDrect::ul(), ossimDrect::ur(), ossimDrect::width(), ossimDpt::x, and ossimDpt::y.
Referenced by ossimMapProjectionInfo().
ossim_int32 ossimMapProjectionInfo::linesPerImage | ( | ) | const |
Definition at line 400 of file ossimMapProjectionInfo.cpp.
References theLinesPerImage.
Referenced by ossimNitfWriterBase::addBlockaTag().
ossimDpt ossimMapProjectionInfo::llEastingNorthingPt | ( | ) | const |
Returns the lower left easting and northing as a ossimDpt.
The easting is "u" and the northing is "v". Units are in meters.
Definition at line 309 of file ossimMapProjectionInfo.cpp.
References getMetersPerPixel(), getPixelType(), OSSIM_PIXEL_IS_AREA, theCornerEastingNorthingPt, ossimDpt::x, and ossimDpt::y.
Referenced by llEastingNorthingPtInFt(), and ossimNitfWriterBase::writeGeometry().
ossimDpt ossimMapProjectionInfo::llEastingNorthingPtInFt | ( | ) | const |
Returns the lower left easting and northing as a ossimDpt.
The easting is "u" and the northing is "v". Units are in U.S. Survey feet.
Definition at line 521 of file ossimMapProjectionInfo.cpp.
References llEastingNorthingPt(), ossim::mtrs2usft(), ossimDpt::x, and ossimDpt::y.
ossimGpt ossimMapProjectionInfo::llGroundPt | ( | ) | const |
Returns the lower left ground point.
Definition at line 373 of file ossimMapProjectionInfo.cpp.
References getDecimalDegreesPerPixel(), getPixelType(), ossimGpt::latd(), ossimGpt::lond(), OSSIM_PIXEL_IS_AREA, theCornerGroundPt, ossimDpt::x, and ossimDpt::y.
Referenced by ossimNitfWriterBase::addBlockaTag(), and ossimNitfWriterBase::writeGeometry().
|
virtual |
Method to the load (recreate) the state of the object from a keyword list. Return true if ok or false on error.
Reimplemented from ossimObject.
Definition at line 410 of file ossimMapProjectionInfo.cpp.
References ossimString::contains(), ossimString::downcase(), ossimKeywordlist::find(), OSSIM_PIXEL_IS_AREA, OSSIM_PIXEL_IS_POINT, OUTPUT_US_FT_INFO_KW, ossimKeywordNames::PIXEL_TYPE_KW, README_IMAGE_STRING_KW, theImageInfoString, theOutputInfoInFeetFlag, and thePixelType.
ossimDpt ossimMapProjectionInfo::lrEastingNorthingPt | ( | ) | const |
Returns the lower right easting and northing as a ossimDpt.
The easting is "u" and the northing is "v". Units are in meters.
Definition at line 293 of file ossimMapProjectionInfo.cpp.
References getMetersPerPixel(), getPixelType(), OSSIM_PIXEL_IS_AREA, theCornerEastingNorthingPt, ossimDpt::x, and ossimDpt::y.
Referenced by lrEastingNorthingPtInFt(), and ossimNitfWriterBase::writeGeometry().
ossimDpt ossimMapProjectionInfo::lrEastingNorthingPtInFt | ( | ) | const |
Returns the lower right easting and northing as a ossimDpt.
The easting is "u" and the northing is "v". Units are in U.S. Survey feet.
Definition at line 513 of file ossimMapProjectionInfo.cpp.
References lrEastingNorthingPt(), ossim::mtrs2usft(), ossimDpt::x, and ossimDpt::y.
ossimGpt ossimMapProjectionInfo::lrGroundPt | ( | ) | const |
Returns the lower right ground point.
Definition at line 357 of file ossimMapProjectionInfo.cpp.
References getDecimalDegreesPerPixel(), getPixelType(), ossimGpt::latd(), ossimGpt::lond(), OSSIM_PIXEL_IS_AREA, theCornerGroundPt, ossimDpt::x, and ossimDpt::y.
Referenced by ossimNitfWriterBase::addBlockaTag(), and ossimNitfWriterBase::writeGeometry().
|
private |
ossim_int32 ossimMapProjectionInfo::pixelsPerLine | ( | ) | const |
Definition at line 405 of file ossimMapProjectionInfo.cpp.
References thePixelsPerLine.
|
virtual |
Formatted print of data members.
Used by operator <<.
Reimplemented from ossimObject.
Definition at line 176 of file ossimMapProjectionInfo.cpp.
References getDecimalDegreesPerPixel(), getMetersPerPixel(), getPixelType(), ossimMapProjection::getProjectionName(), getUsSurveyFeetPerPixel(), OSSIM_PIXEL_IS_POINT, ossimMapProjection::print(), theCenterEastingNorthingPt, theCenterGroundPt, theCornerEastingNorthingPt, theCornerGroundPt, theLinesPerImage, thePixelsPerLine, and theProjection.
|
virtual |
Method to save the state of the object to a keyword list. Return true if ok or false on error.
Reimplemented from ossimObject.
Definition at line 468 of file ossimMapProjectionInfo.cpp.
References ossimKeywordlist::add(), ossimString::chars(), OSSIM_PIXEL_IS_POINT, OUTPUT_US_FT_INFO_KW, PIXEL_TYPE_KW, README_IMAGE_STRING_KW, theImageInfoString, theOutputInfoInFeetFlag, and thePixelType.
void ossimMapProjectionInfo::setImageInfoString | ( | const ossimString & | string | ) |
Used to set data member "theImageInfoString".
This will be output in the "Image: " field of the README file.
Definition at line 251 of file ossimMapProjectionInfo.cpp.
References theImageInfoString.
void ossimMapProjectionInfo::setOutputFeetFlag | ( | bool | flag | ) |
Sets the data member "theOutputInfoInFeetFlag".
Definition at line 236 of file ossimMapProjectionInfo.cpp.
References theOutputInfoInFeetFlag.
void ossimMapProjectionInfo::setPixelType | ( | ossimPixelType | type | ) |
Sets the data member "thePixelType".
NOTE: PIXEL_IS_POINT (ennumerated to a "0"): Corner coordinates are relative to the center of pixel. PIXEL_IS_AREA (ennumerated to a "1"): Corner coordinates are relative to the outer edge of the pixel.
Definition at line 226 of file ossimMapProjectionInfo.cpp.
References thePixelType.
Referenced by ossimNitfWriterBase::addBlockaTag(), ossimNitfWriterBase::writeGeometry(), and ossimGeoTiff::writeJp2GeotiffBox().
ossimDpt ossimMapProjectionInfo::ulEastingNorthingPt | ( | ) | const |
Returns the upper left easting and northing as a ossimDpt.
The easting is "u" and the northing is "v". Units are in meters.
Definition at line 261 of file ossimMapProjectionInfo.cpp.
References getMetersPerPixel(), getPixelType(), OSSIM_PIXEL_IS_AREA, theCornerEastingNorthingPt, ossimDpt::x, and ossimDpt::y.
Referenced by getGeom(), ulEastingNorthingPtInFt(), and ossimNitfWriterBase::writeGeometry().
ossimDpt ossimMapProjectionInfo::ulEastingNorthingPtInFt | ( | ) | const |
Returns the upper left easting and northing as a ossimDpt.
The easting is "u" and the northing is "v". Units are in U.S. Survey feet.
Definition at line 494 of file ossimMapProjectionInfo.cpp.
References ossim::mtrs2usft(), ulEastingNorthingPt(), ossimDpt::x, and ossimDpt::y.
ossimGpt ossimMapProjectionInfo::ulGroundPt | ( | ) | const |
Returns the upper left ground point.
Definition at line 325 of file ossimMapProjectionInfo.cpp.
References getDecimalDegreesPerPixel(), getPixelType(), ossimGpt::latd(), ossimGpt::lond(), OSSIM_PIXEL_IS_AREA, theCornerGroundPt, ossimDpt::x, and ossimDpt::y.
Referenced by ossimNitfWriterBase::addBlockaTag(), getGeom(), and ossimNitfWriterBase::writeGeometry().
bool ossimMapProjectionInfo::unitsInFeet | ( | ) | const |
Returns the data member "theOutputInfoInFeetFlag".
True = feet, false = meters.
Definition at line 241 of file ossimMapProjectionInfo.cpp.
References theOutputInfoInFeetFlag.
ossimDpt ossimMapProjectionInfo::urEastingNorthingPt | ( | ) | const |
Returns the upper right easting and northing as a ossimDpt.
The easting is "u" and the northing is "v". Units are in meters.
Definition at line 277 of file ossimMapProjectionInfo.cpp.
References getMetersPerPixel(), getPixelType(), OSSIM_PIXEL_IS_AREA, theCornerEastingNorthingPt, ossimDpt::x, and ossimDpt::y.
Referenced by urEastingNorthingPtInFt(), and ossimNitfWriterBase::writeGeometry().
ossimDpt ossimMapProjectionInfo::urEastingNorthingPtInFt | ( | ) | const |
Returns the upper right easting and northing as a ossimDpt.
The easting is "u" and the northing is "v". Units are in U.S. Survey feet.
Definition at line 505 of file ossimMapProjectionInfo.cpp.
References ossim::mtrs2usft(), urEastingNorthingPt(), ossimDpt::x, and ossimDpt::y.
ossimGpt ossimMapProjectionInfo::urGroundPt | ( | ) | const |
Returns the upper right ground point.
Definition at line 341 of file ossimMapProjectionInfo.cpp.
References getDecimalDegreesPerPixel(), getPixelType(), ossimGpt::latd(), ossimGpt::lond(), OSSIM_PIXEL_IS_AREA, theCornerGroundPt, ossimDpt::x, and ossimDpt::y.
Referenced by ossimNitfWriterBase::addBlockaTag(), and ossimNitfWriterBase::writeGeometry().
|
static |
Definition at line 223 of file ossimMapProjectionInfo.h.
Referenced by loadState(), and saveState().
|
static |
Definition at line 222 of file ossimMapProjectionInfo.h.
Referenced by saveState().
|
static |
Definition at line 221 of file ossimMapProjectionInfo.h.
Referenced by loadState(), and saveState().
|
private |
Definition at line 247 of file ossimMapProjectionInfo.h.
Referenced by initializeMembers().
|
private |
Definition at line 246 of file ossimMapProjectionInfo.h.
Referenced by centerEastingNorthingPt(), initializeMembers(), and print().
|
private |
Definition at line 245 of file ossimMapProjectionInfo.h.
Referenced by centerGroundPt(), initializeMembers(), and print().
|
private |
Definition at line 244 of file ossimMapProjectionInfo.h.
Referenced by initializeMembers(), llEastingNorthingPt(), lrEastingNorthingPt(), print(), ulEastingNorthingPt(), and urEastingNorthingPt().
|
private |
Definition at line 243 of file ossimMapProjectionInfo.h.
Referenced by initializeMembers(), llGroundPt(), lrGroundPt(), print(), ulGroundPt(), and urGroundPt().
|
mutableprivate |
Definition at line 240 of file ossimMapProjectionInfo.h.
Referenced by errorStatus(), and ossimMapProjectionInfo().
|
private |
"theImageInfoString" goes in the README file "Image:" field to identify the image.
Definition at line 273 of file ossimMapProjectionInfo.h.
Referenced by getImageInfoString(), loadState(), saveState(), and setImageInfoString().
|
private |
Definition at line 241 of file ossimMapProjectionInfo.h.
Referenced by initializeMembers(), linesPerImage(), and print().
|
private |
If "theOutputInfoInFeetFlag" is true the readme file tie point info will be output in both meters and U.S.
feet. NOTE: U.S. feet conversion is "meters/0.3048006096" not the standard "meters/0.3048". Reference for U.S. feet value: U.S.G.S. "Map Projections - A Working Manual" USGS Professional paper 1395 page 51.
Definition at line 267 of file ossimMapProjectionInfo.h.
Referenced by loadState(), saveState(), setOutputFeetFlag(), and unitsInFeet().
|
private |
Definition at line 242 of file ossimMapProjectionInfo.h.
Referenced by initializeMembers(), pixelsPerLine(), and print().
|
private |
"thePixelType" defines whether the tie point coordinates are relative to the center of the pixel(which is PIXEL_IS_POINT) or the upper left corner of the pixel(PIXEL_IS_AREA).
The default pixle type is PIXEL_IS_POINT.
Definition at line 255 of file ossimMapProjectionInfo.h.
Referenced by getPixelType(), loadState(), saveState(), and setPixelType().
|
private |
Definition at line 239 of file ossimMapProjectionInfo.h.
Referenced by getDecimalDegreesPerPixel(), getGeom(), getMetersPerPixel(), getProjection(), initializeMembers(), ossimMapProjectionInfo(), and print().