OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
Container class that holds both 2D transform and 3D projection information for an image Only one instance of this is alive per image. More...
#include <ossimImageGeometry.h>
Public Types | |
typedef std::vector< ossim_float64 > | DeltaParamList |
Public Member Functions | |
ossimImageGeometry () | |
Default constructor defaults to unity transform with no projection. More... | |
virtual | ~ossimImageGeometry () |
ossimImageGeometry (const ossimImageGeometry ©_this) | |
Copy constructor – performs a deep copy. More... | |
ossimImageGeometry (ossim2dTo2dTransform *transform, ossimProjection *projection) | |
Constructs with projection and transform objects available for referencing. More... | |
bool | open (const ossimFilename &image) |
Shortcut way of getting to an image's geometry when access to pixels is not needed. More... | |
void | rnToRn (const ossimDpt &inRnPt, ossim_uint32 inResolutionLevel, ossim_uint32 outResolutionLevel, ossimDpt &outRnPt) const |
rnToRn is a utility method that takes a rn resolution image point and maps it to the another rn resolution image point. More... | |
void | rnToFull (const ossimDpt &rnPt, ossim_uint32 resolutionLevel, ossimDpt &fullPt) const |
rnToFull is a utility method that takes a rn resolution image point and maps it to the full image point. More... | |
void | fullToRn (const ossimDpt &fullPt, ossim_uint32 resolutionLevel, ossimDpt &rnPt) const |
fullToRn is a utility method that takes a full image point and maps it to a rn resolution image point. More... | |
void | rnToWorld (const ossimDpt &rnPt, ossim_uint32 resolutionLevel, ossimGpt &wpt) const |
rnToWorld is a utility method that takes a rn resolution image point and maps it to the world point. More... | |
void | worldToRn (const ossimGpt &wpt, ossim_uint32 resolutionLevel, ossimDpt &rnPt) const |
worldToRn is a utility method that takes a world point allows one to transform all the way back to an rn point. More... | |
bool | localToWorld (const ossimDpt &local_pt, ossimGpt &world_pt) const |
Exposes the 3D projection from image to world coordinates. More... | |
bool | localToWorld (const ossimDrect &local_rect, ossimGrect &world_rect) const |
bool | localToWorld (const ossimDpt &local_pt, const double &h_ellipsoid, ossimGpt &world_pt) const |
Exposes the 3D projection from image to world coordinates given a constant height above ellipsoid. More... | |
bool | worldToLocal (const ossimGpt &world_pt, ossimDpt &local_pt) const |
Exposes the 3D world-to-local image coordinate reverse projection. More... | |
bool | worldToLocal (const ossimGrect &world_rect, ossimDrect &local_rect) const |
void | setTransform (ossim2dTo2dTransform *transform) |
Sets the transform to be used for local-to-full-image coordinate transformation. More... | |
void | setProjection (ossimProjection *projection) |
Sets the projection to be used for local-to-world coordinate transformation. More... | |
const ossim2dTo2dTransform * | getTransform () const |
Access methods for transform (may be NULL pointer). More... | |
ossim2dTo2dTransform * | getTransform () |
const ossimProjection * | getProjection () const |
Access methods for projection (may be NULL pointer). More... | |
ossimProjection * | getProjection () |
bool | isMapProjected () const |
Returns true if underlying projection is derived from ossimMapProjection. More... | |
const ossimMapProjection * | getAsMapProjection () const |
ossimMapProjection * | getAsMapProjection () |
bool | hasProjection () const |
Returns TRUE if valid projection defined. More... | |
bool | hasTransform () const |
Returns TRUE if valid transform defined. More... | |
bool | isAffectedByElevation () const |
Returns TRUE if this geometry is sensitive to elevation. More... | |
ossimDpt | getMetersPerPixel () const |
Returns the GSD associated with this image in the active projection. More... | |
void | getMetersPerPixel (ossimDpt &gsd) const |
Get the ground sample distance(GSD) associated with this image in the active projection. More... | |
ossimDpt | getDegreesPerPixel () const |
Returns the resolution of this image in degrees/pixel. More... | |
void | getDegreesPerPixel (ossimDpt &dpp) const |
Get the resolution of this image in degrees/pixel. More... | |
bool | getCornerGpts (ossimGpt &ul, ossimGpt &ur, ossimGpt &lr, ossimGpt &ll) const |
Assigns the ossimGpts with the ground coordinates of the four corresponding image corner points. More... | |
void | getTiePoint (ossimGpt &tie, bool edge) const |
Get the latitude, longitude of the tie point. More... | |
void | getTiePoint (ossimDpt &tie, bool edge) const |
Get the easting, northing of the tie point. More... | |
std::ostream & | print (std::ostream &out) const |
Prints contents to output stream. More... | |
bool | operator== (const ossimImageGeometry &compare_this) const |
Returns TRUE if argument geometry has exactly the same instances for transform and m_projection. More... | |
const ossimImageGeometry & | operator= (const ossimImageGeometry ©_this) |
Replaces any existing transform and projection with those in the copy_this object. More... | |
ossimDpt | decimationFactor (ossim_uint32 r_index) const |
Returns the decimation factor from R0 for the resolution level specified. More... | |
void | decimationFactor (ossim_uint32 r_index, ossimDpt &result) const |
Method to get the decimation factor for a given resolution level. More... | |
void | decimationFactors (std::vector< ossimDpt > &decimations) const |
Gets array of all decimation levels. More... | |
void | setDiscreteDecimation (const std::vector< ossimDpt > &decimation_list) |
Sets the decimation scheme to a discrete list of decimation factors. More... | |
ossim_uint32 | getNumberOfDecimations () const |
void | setImageSize (const ossimIpt &size) |
const ossimIpt & | getImageSize () const |
bool | getCrossesDateline () const |
void | getImageEdgePoints (std::vector< ossimDpt > &result, ossim_uint32 partitions=25) const |
void | calculatePolyBounds (ossimPolyArea2d &result, ossim_uint32 partitions=25) const |
This is the first stage implementation. More... | |
void | getBoundingRect (ossimIrect &bounding_rect) const |
Get the bounding rect of (0, 0) to (imageSize.x-1, imageSize.y-1). More... | |
void | getBoundingRect (ossimDrect &bounding_rect) const |
void | getBoundingGroundRect (ossimGrect &bounding_grect) const |
virtual ossimObject * | dup () const |
Creates a new instance of ossimImageGeometry with the same transform and projection. More... | |
virtual bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
Attempts to initialize a transform and a projection given the KWL. More... | |
virtual bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
Saves the transform (if any) and projection (if any) states to the KWL. More... | |
void | setTargetRrds (ossim_uint32 rrds) |
Set m_targetRrds data member. More... | |
ossim_uint32 | getTargetRrds () const |
void | applyScale (const ossimDpt &scale, bool recenterTiePoint) |
Changes the GSD and image size to reflect the scale provided. More... | |
virtual bool | isEqualTo (const ossimObject &obj, ossimCompareType compareType=OSSIM_COMPARE_FULL) const |
virtual ossimAdjustableParameterInterface * | getAdjustableParameterInterface () |
virtual const ossimAdjustableParameterInterface * | getAdjustableParameterInterface () const |
bool | computeImageToGroundPartialsWRTAdjParam (ossimDpt &result, const ossimGpt &gpt, ossim_uint32 idx, ossim_float64 paramDelta=1.0) |
bool | computeImageToGroundPartialsWRTAdjParams (NEWMAT::Matrix &result, const ossimGpt &gpt, ossim_float64 paramDelta=1.0) |
bool | computeImageToGroundPartialsWRTAdjParams (NEWMAT::Matrix &result, const ossimGpt &gpt, const DeltaParamList &deltas) |
bool | computeGroundToImagePartials (NEWMAT::Matrix &result, const ossimGpt &gpt, const ossimDpt3d &deltaLlh) |
bool | computeGroundToImagePartials (NEWMAT::Matrix &result, const ossimGpt &gpt) |
ossim_float64 | upIsUpAngle (const ossimDpt &) const |
ossim_float64 | upIsUpAngle () const |
ossim_float64 | northUpAngle () const |
![]() | |
ossimObject () | |
virtual | ~ossimObject () |
virtual ossimString | getShortName () const |
virtual ossimString | getLongName () const |
virtual ossimString | getDescription () const |
virtual ossimString | getClassName () const |
virtual RTTItypeid | getType () const |
virtual bool | canCastTo (ossimObject *obj) const |
virtual bool | canCastTo (const RTTItypeid &id) const |
virtual bool | canCastTo (const ossimString &parentClassName) const |
virtual void | accept (ossimVisitor &visitor) |
![]() | |
ossimReferenced () | |
ossimReferenced (const ossimReferenced &) | |
ossimReferenced & | operator= (const ossimReferenced &) |
void | ref () const |
increment the reference count by one, indicating that this object has another pointer which is referencing it. More... | |
void | unref () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
void | unref_nodelete () const |
decrement the reference count by one, indicating that a pointer to this object is referencing it. More... | |
int | referenceCount () const |
Protected Member Functions | |
void | undecimatePoint (const ossimDpt &rnPt, ossim_uint32 resolutionLevel, ossimDpt &outPt) const |
Method to back out decimation of a point. More... | |
void | decimatePoint (const ossimDpt &inPt, ossim_uint32 resolutionLevel, ossimDpt &rnPt) const |
Method to apply decimation of a point. More... | |
![]() | |
virtual | ~ossimReferenced () |
Protected Attributes | |
ossimRefPtr< ossim2dTo2dTransform > | m_transform |
Maintains local_image-to-full_image transformation. More... | |
ossimRefPtr< ossimProjection > | m_projection |
Maintains full_image-to-world_space transformation. More... | |
std::vector< ossimDpt > | m_decimationFactors |
List of decimation factors for R-levels. More... | |
ossimIpt | m_imageSize |
ossim_uint32 | m_targetRrds |
Target rrds for localToWorld and worldToLocal methods. More... | |
Container class that holds both 2D transform and 3D projection information for an image Only one instance of this is alive per image.
This is the object that is returned from a call to ossimImageSource::getImageGeometry()
All images in OSSIM have at least a 2D transformation from local (relative to start of file) to full-image coordinates. Often this transform is an identity transform (does nothing). In some cases however, the first pixel in the file does not correspond to the upper-left pixel of the original, full image. Since the image's sensor model may only apply to full-image pixel coordinates, it is necessary to reference the latter when making computing ground point location. Also the local image could be a reduced resolution level of the full image. So the image could be a decimated sub image of the full image.
Additionally, images typically are accompanied by some form of metadata that defines the mapping from 2D image coordinates to 3D world coordinates. This mapping may be in the form of a map projection for orthorectified images, or a perspective projection such as a sensor model.
This object class maintains both 2D transform and 3D projection information for the associated image. This object will typically be created and "owned" by the image handler object. Therefore, only one copy per image will exist at a time.
Notes: 1) Shifts are relative to "full image space". So if you have a sub image from r2 the shift given to the transform should be relative to "full image space". 2) A decimation of 1.0 is the full image. This may or may not be r0 as r0 can be decimated.
Definition at line 65 of file ossimImageGeometry.h.
typedef std::vector<ossim_float64> ossimImageGeometry::DeltaParamList |
Definition at line 68 of file ossimImageGeometry.h.
ossimImageGeometry::ossimImageGeometry | ( | ) |
Default constructor defaults to unity transform with no projection.
Definition at line 31 of file ossimImageGeometry.cpp.
References m_imageSize, and ossimIpt::makeNan().
|
virtual |
Definition at line 79 of file ossimImageGeometry.cpp.
ossimImageGeometry::ossimImageGeometry | ( | const ossimImageGeometry & | copy_this | ) |
Copy constructor – performs a deep copy.
This is needed when an imageSource in the chain needs to modify the image geometry at that point in the chain. The image geometry to the left of that imageSource must remain unchanged. This constructor permits that imageSource to maintain its own geometry based on the input geometry. All chained objects to the right would see this alternate geometry. See ossimScaleFilter for an example of this case.
Definition at line 49 of file ossimImageGeometry.cpp.
ossimImageGeometry::ossimImageGeometry | ( | ossim2dTo2dTransform * | transform, |
ossimProjection * | proj | ||
) |
Constructs with projection and transform objects available for referencing.
Either pointer can be NULL – the associated mapping would be identity.
Definition at line 64 of file ossimImageGeometry.cpp.
References m_imageSize, and ossimIpt::makeNan().
void ossimImageGeometry::applyScale | ( | const ossimDpt & | scale, |
bool | recenterTiePoint | ||
) |
Changes the GSD and image size to reflect the scale provided.
scale | The scale to be applied in x and y directions |
recenterTiePoint | If 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 underlying projection isGeographic. |
Definition at line 1285 of file ossimImageGeometry.cpp.
References ossimMapProjection::applyScale(), ossimRefPtr< T >::get(), m_imageSize, m_projection, ossimIpt::x, ossimDpt::x, ossimIpt::y, and ossimDpt::y.
void ossimImageGeometry::calculatePolyBounds | ( | ossimPolyArea2d & | result, |
ossim_uint32 | partitions = 25 |
||
) | const |
This is the first stage implementation.
It will determine if it crosses the dateline and do a special multi polygon for the ossimPolyArea2d result. For each edge of the image we walk "partitions" number of points. If we cross a dateline we calculate the crossing lat by using the parametric form of the equation. For example, if we are crossing from positive to negative that means we are going through the 180 degree lon location and we will need to solve for the paramtetric parameter t and plug back into the parametric equation to solve for the latitude. Basic form: start + (end-start)*t = 180. If we are coming from negative to positive then we solve basic form: start + (end-start)*t = -180. Where deltaPoint is (end-start)
ossim_float64 t = ((180-start.x)/deltaPoint.x); ossim_float64 lat = (start.y+deltaPoint.y*t);
If we do not cross the dateline then if the image is affected by elevation (i.e. a sensor model) then we use the partitions parameter to calculate that number of partitions to sample along each edge.
if The geometry is not affected by elevation then we just use the corner points and ignore the partitions parameter
poly | holds the resulting polygon. This could be a MultiPolygon depending on the geometry |
partitions | These are the number of steps you want when walking the border. |
Definition at line 1146 of file ossimImageGeometry.cpp.
References ossimPolyArea2d::add(), ossimPolyArea2d::clear(), ossimPolygon::clear(), ossimPolygon::clipToRect(), ossim_hdf5::crossesDateline(), getBoundingRect(), getCrossesDateline(), getImageEdgePoints(), ossimDrect::hasNans(), ossimGpt::isLatNan(), ossimGpt::isLonNan(), ossimPolyArea2d::isValid(), localToWorld(), ossimGpt::lond(), ossimDrect::midPoint(), ossimPolyArea2d::setToBufferedShape(), and ossim::sgn().
bool ossimImageGeometry::computeGroundToImagePartials | ( | NEWMAT::Matrix & | result, |
const ossimGpt & | gpt, | ||
const ossimDpt3d & | deltaLlh | ||
) |
Definition at line 1400 of file ossimImageGeometry.cpp.
References ossimGpt::datum(), DEG_PER_RAD, getProjection(), ossimGpt::height(), ossim::isnan(), ossimGpt::latd(), ossimGpt::lond(), worldToLocal(), ossimDpt3d::x, ossimDpt::x, ossimDpt3d::y, ossimDpt::y, and ossimDpt3d::z.
Referenced by computeGroundToImagePartials(), and ossimPointObservation::getObjSpacePartials().
bool ossimImageGeometry::computeGroundToImagePartials | ( | NEWMAT::Matrix & | result, |
const ossimGpt & | gpt | ||
) |
Definition at line 1455 of file ossimImageGeometry.cpp.
References computeGroundToImagePartials(), FLT_EPSILON, getMetersPerPixel(), ossimDpt::length(), and ossimGpt::metersPerDegree().
bool ossimImageGeometry::computeImageToGroundPartialsWRTAdjParam | ( | ossimDpt & | result, |
const ossimGpt & | gpt, | ||
ossim_uint32 | idx, | ||
ossim_float64 | paramDelta = 1.0 |
||
) |
Definition at line 1310 of file ossimImageGeometry.cpp.
References getAdjustableParameterInterface(), ossimAdjustableParameterInterface::getNumberOfAdjustableParameters(), ossimAdjustableParameterInterface::getParameterCenter(), ossimDpt::hasNans(), ossimAdjustableParameterInterface::setParameterCenter(), and worldToLocal().
Referenced by computeImageToGroundPartialsWRTAdjParams().
bool ossimImageGeometry::computeImageToGroundPartialsWRTAdjParams | ( | NEWMAT::Matrix & | result, |
const ossimGpt & | gpt, | ||
ossim_float64 | paramDelta = 1.0 |
||
) |
Definition at line 1347 of file ossimImageGeometry.cpp.
References computeImageToGroundPartialsWRTAdjParam(), getAdjustableParameterInterface(), ossimAdjustableParameterInterface::getNumberOfAdjustableParameters(), ossimDpt::x, and ossimDpt::y.
Referenced by ossimPointObservation::getParameterPartials().
bool ossimImageGeometry::computeImageToGroundPartialsWRTAdjParams | ( | NEWMAT::Matrix & | result, |
const ossimGpt & | gpt, | ||
const DeltaParamList & | deltas | ||
) |
Definition at line 1372 of file ossimImageGeometry.cpp.
References computeImageToGroundPartialsWRTAdjParam(), getAdjustableParameterInterface(), ossimAdjustableParameterInterface::getNumberOfAdjustableParameters(), ossimDpt::x, and ossimDpt::y.
|
protected |
Method to apply decimation of a point.
inPt | Is a point with no decimation. |
resolutionLevel | Is the resolution of the point rnPt. |
rnPt | Is the result of the transform |
Definition at line 948 of file ossimImageGeometry.cpp.
References decimationFactor(), ossimDpt::hasNans(), ossimDpt::makeNan(), ossimDpt::x, and ossimDpt::y.
Referenced by fullToRn(), and rnToRn().
ossimDpt ossimImageGeometry::decimationFactor | ( | ossim_uint32 | r_index | ) | const |
Returns the decimation factor from R0 for the resolution level specified.
For r_index=0, the decimation factor is by definition 1.0. For the non-discrete case, r_index=1 returns a decimation of 0.5. If the vector of discrete decimation factors (m_decimationFactors) is empty, the factor will be computed as f=1/2^n
Definition at line 489 of file ossimImageGeometry.cpp.
References m_decimationFactors, and size.
Referenced by decimatePoint(), ossimMrSidReader::getDecimationFactor(), ossimMrSidReader::getTile(), ossimImageViewProjectionTransform::imageToView(), operator==(), undecimatePoint(), and ossimImageViewProjectionTransform::viewToImage().
void ossimImageGeometry::decimationFactor | ( | ossim_uint32 | r_index, |
ossimDpt & | result | ||
) | const |
Method to get the decimation factor for a given resolution level.
If the array of decimations is not initialized by owner, the default is: r_index=0 is by definition 1.0. r_index=n Where n is some level the factor will be computed as f=1/2^n.
resLevel | Reduced resolution set for requested decimation. |
result | ossimDpt to initialize with requested decimation. |
Definition at line 509 of file ossimImageGeometry.cpp.
References m_decimationFactors, ossimDpt::x, and ossimDpt::y.
void ossimImageGeometry::decimationFactors | ( | std::vector< ossimDpt > & | decimations | ) | const |
Gets array of all decimation levels.
decimations | Array to initialiaze. |
Definition at line 537 of file ossimImageGeometry.cpp.
References m_decimationFactors.
Referenced by ossimMrSidReader::getDecimationFactors().
|
inlinevirtual |
Creates a new instance of ossimImageGeometry with the same transform and projection.
Overrides base-class version requiring loadState() and saveState() (not implemented yet)
Reimplemented from ossimObject.
Definition at line 378 of file ossimImageGeometry.h.
Referenced by ossimEquationUtil::initInputSources().
void ossimImageGeometry::fullToRn | ( | const ossimDpt & | fullPt, |
ossim_uint32 | resolutionLevel, | ||
ossimDpt & | rnPt | ||
) | const |
fullToRn is a utility method that takes a full image point and maps it to a rn resolution image point.
fullPt | Is a point in full image space. |
resolutionLevel | Is the resolution of the point rnPt. A value of 0 is the local image. |
fullPt | Is the result of the transform |
Definition at line 135 of file ossimImageGeometry.cpp.
References decimatePoint(), ossim2dTo2dTransform::inverse(), m_transform, and ossimRefPtr< T >::valid().
Referenced by ossimImageViewProjectionTransform::imageToView(), ossimImageViewProjectionTransform::viewToImage(), and worldToLocal().
|
virtual |
Definition at line 1299 of file ossimImageGeometry.cpp.
References getProjection(), and PTR_CAST.
Referenced by ossimPointObservation::addMeasurement(), computeImageToGroundPartialsWRTAdjParam(), computeImageToGroundPartialsWRTAdjParams(), ossimAutRegUtil::saveAdjustment(), and ossimAdjustmentExecutive::updateParameters().
|
virtual |
Definition at line 1304 of file ossimImageGeometry.cpp.
References getProjection().
|
inline |
Definition at line 179 of file ossimImageGeometry.h.
Referenced by ossimGpkgWriter::addLevels(), ossimGmlSupportData::configureGmljp2V2(), ATP::AtpGenerator::constructChain(), ossimChipProcTool::getChip(), ossimGmlSupportData::getGeoBounds(), ossimGpkgWriter::getGsd(), ossimPdfWriter::getLgiDictDatum(), ossimPdfWriter::getLgiDictDescription(), ossimPdfWriter::getLgiDictProjectionType(), ossimGmlSupportData::getMapOrigin(), ossimGpkgWriter::getNewOutputProjection(), ossimGmlSupportData::initialize(), ossimPointCloudTool::loadPC(), ossimPointCloudTool::setGSD(), and ossimGpkgWriter::writeEntry().
|
inline |
Definition at line 186 of file ossimImageGeometry.h.
void ossimImageGeometry::getBoundingGroundRect | ( | ossimGrect & | bounding_grect | ) | const |
Definition at line 1275 of file ossimImageGeometry.cpp.
References getCornerGpts(), ossimGpt::lat, ossimGpt::lon, ossimGrect::lr(), and ossimGrect::ul().
Referenced by getTiePoint(), and ossimChipProcTool::setAoiToInputs().
void ossimImageGeometry::getBoundingRect | ( | ossimIrect & | bounding_rect | ) | const |
Get the bounding rect of (0, 0) to (imageSize.x-1, imageSize.y-1).
Relies on image size being initialized.
bounding_rect | Initialized by this method. Will do a ossimIrect::makeNan() if the image size is not initialized. |
Definition at line 1245 of file ossimImageGeometry.cpp.
References ossimIpt::hasNans(), m_imageSize, ossimIrect::makeNan(), ossimIrect::set_lrx(), ossimIrect::set_lry(), ossimIrect::set_ulx(), ossimIrect::set_uly(), ossimIpt::x, and ossimIpt::y.
Referenced by calculatePolyBounds(), ATP::AtpGenerator::constructChain(), ossimPotraceTool::convertToBitmap(), ossimInfo::getCenterGround(), getCrossesDateline(), ossimInfo::getImageBounds(), getImageEdgePoints(), ossimInfo::getImg2grd(), ossimRangeDomeTileSource::getTile(), ossimImageViewProjectionTransform::getViewSegments(), ossimImageRenderer::initializeBoundingRects(), northUpAngle(), ossimPotraceTool::transformLineStrings(), and upIsUpAngle().
void ossimImageGeometry::getBoundingRect | ( | ossimDrect & | bounding_rect | ) | const |
Definition at line 1260 of file ossimImageGeometry.cpp.
References ossimIpt::hasNans(), m_imageSize, ossimDrect::makeNan(), ossimDrect::set_lrx(), ossimDrect::set_lry(), ossimDrect::set_ulx(), ossimDrect::set_uly(), ossimIpt::x, and ossimIpt::y.
bool ossimImageGeometry::getCornerGpts | ( | ossimGpt & | ul, |
ossimGpt & | ur, | ||
ossimGpt & | lr, | ||
ossimGpt & | ll | ||
) | const |
Assigns the ossimGpts with the ground coordinates of the four corresponding image corner points.
Returns the ossimGpts for the four image corner points.
Returns true if points are valid.
Definition at line 714 of file ossimImageGeometry.cpp.
References localToWorld(), m_imageSize, status, ossimIpt::x, and ossimIpt::y.
Referenced by getBoundingGroundRect(), ossimTiledElevationDatabase::getBoundingRect(), ossimImageElevationHandler::open(), and ossimNitfWriterBase::writeGeometry().
bool ossimImageGeometry::getCrossesDateline | ( | ) | const |
Definition at line 1027 of file ossimImageGeometry.cpp.
References ossimGpt::changeDatum(), ossimGpt::datum(), getBoundingRect(), ossimGpt::isLonNan(), ossimIrect::ll(), localToWorld(), ossimGpt::lond(), ossimIrect::lr(), ossimIrect::midPoint(), ossimIrect::ul(), and ossimIrect::ur().
Referenced by calculatePolyBounds(), ossimImageRenderer::initializeBoundingRects(), ossimImageViewProjectionTransform::initializeDatelineCrossing(), and ossimImageViewProjectionTransform::initializeViewSize().
ossimDpt ossimImageGeometry::getDegreesPerPixel | ( | ) | const |
Returns the resolution of this image in degrees/pixel.
Note that this only makes sense if there is a projection associated with the image. Returns NaNs if no projection defined.
Definition at line 389 of file ossimImageGeometry.cpp.
Referenced by ossimChipProcTool::computeAdjustedViewFromGrect(), ossimGmlSupportData::getGeoOrigin(), ossimGpkgWriter::getGsd(), ossimLasReader::getImageGeometry(), and ossimPdfWriter::getLgiDictCtm().
void ossimImageGeometry::getDegreesPerPixel | ( | ossimDpt & | dpp | ) | const |
Get the resolution of this image in degrees/pixel.
Degrees/pixel is taken from projection if there is no transform set; else, taken from three localToWorld calls (one pixel apart) at the image center. If the projection or the image size(if needed) is not set the point will be set to NaNs.
dpp | Point to intialize with degrees/pixel. |
Definition at line 401 of file ossimImageGeometry.cpp.
References ossimRefPtr< T >::get(), ossimMapProjection::getDecimalDegreesPerPixel(), ossimIpt::hasNans(), ossimGpt::height(), ossimDpt::lat, ossimGpt::lat, localToWorld(), ossimDpt::lon, ossimGpt::lon, m_imageSize, m_projection, m_transform, ossimDpt::makeNan(), ossimRefPtr< T >::valid(), ossimDpt::x, and ossimDpt::y.
void ossimImageGeometry::getImageEdgePoints | ( | std::vector< ossimDpt > & | result, |
ossim_uint32 | partitions = 25 |
||
) | const |
Definition at line 1072 of file ossimImageGeometry.cpp.
References ossimDrect::expand(), getBoundingRect(), ossimDrect::hasNans(), ossimDrect::ll(), ossimDrect::lr(), ossimDrect::ul(), ossimDrect::ur(), ossimDpt::x, and ossimDpt::y.
Referenced by calculatePolyBounds(), and ossimImageViewProjectionTransform::getViewSegments().
|
inline |
Definition at line 330 of file ossimImageGeometry.h.
Referenced by ossimChipProcTool::execute(), ossimRangeDomeTileSource::getNumberOfLines(), ossimPointCloudImageHandler::getNumberOfLines(), ossimRangeDomeTileSource::getNumberOfSamples(), ossimPointCloudImageHandler::getNumberOfSamples(), ossimImageViewProjectionTransform::initializeViewSize(), ossimImageHandler::initImageParameters(), and ossimGeomFileWriter::writeFile().
ossimDpt ossimImageGeometry::getMetersPerPixel | ( | ) | const |
Returns the GSD associated with this image in the active projection.
Returns GSD in meters in x- and y-directions.
Note that this only makes sense if there is a projection associated with the image. Returns NaNs if no projection defined.
This may not be the same as the member projection's stated resolution since a transform may be involved.
Definition at line 343 of file ossimImageGeometry.cpp.
Referenced by computeGroundToImagePartials(), ATP::AtpGenerator::constructChain(), ossimGpkgWriter::getGsd(), ossimLasReader::getImageGeometry(), ossimInfo::getImageGeometryInfo(), ossimGmlSupportData::getMapOrigin(), ossimGeoAnnotationEllipseObject::getWidthHeightInPixels(), ossimSFIMFusion::initialize(), ossimImageToPlaneNormalFilter::initialize(), ossimTilingRect::initializeBase(), ossimImageRenderer::initializeBoundingRects(), ossimEquationUtil::initInputSources(), ossimImageElevationHandler::open(), saveState(), and ossimGeneralRasterElevHandler::setFilename().
void ossimImageGeometry::getMetersPerPixel | ( | ossimDpt & | gsd | ) | const |
Get the ground sample distance(GSD) associated with this image in the active projection.
Computes GSD in meters in x- and y-directions.
GSD is taken from projection if there is no transform set; else, taken from three localToWorld calls (one pixel apart) at the image center. If the projection or the image size(if needed) is not set the point will be set to NaNs.
gsd | Point to intialize with GSD. |
This may not be the same as the member projection's stated resolution since a transform may be involved.
Definition at line 354 of file ossimImageGeometry.cpp.
References ossimGpt::distanceTo(), ossimProjection::getMetersPerPixel(), ossimIpt::hasNans(), ossimGpt::height(), localToWorld(), m_imageSize, m_projection, m_transform, ossimDpt::makeNan(), ossimRefPtr< T >::valid(), ossimDpt::x, and ossimDpt::y.
|
inline |
Definition at line 322 of file ossimImageGeometry.h.
Referenced by ossimMrSidReader::getDecimationFactors(), and ossimImageHandler::initImageParameters().
|
inline |
Access methods for projection (may be NULL pointer).
Definition at line 165 of file ossimImageGeometry.h.
Referenced by ossimCoarseGridModel::buildGrid(), ossimGeoPdfReader::computeBoundingRect(), computeGroundToImagePartials(), ossimElevRemapper::elevRemap(), ossimHdf5Tool::execute(), ossimSubImageTool::execute(), ossimKakaduJpipImageGeometryFactory::extendGeometry(), ossimImageGeometryFactory::extendGeometry(), getAdjustableParameterInterface(), ossimPdfWriter::getEpsgCode(), ossimERSTileSource::getImageGeometry(), ossimKakaduJpipHandler::getImageGeometry(), ossimGeneralRasterTileSource::getImageGeometry(), ossimUsgsDemTileSource::getImageGeometry(), ossimOpjJp2Reader::getImageGeometry(), ossimJpegTileSource::getImageGeometry(), ossimMG4LidarReader::getImageGeometry(), ossimGeoPdfReader::getImageGeometry(), ossimMrSidReader::getImageGeometry(), ossimH5ImageHandler::getImageGeometry(), ossimLasReader::getImageGeometry(), ossimKakaduJp2Reader::getImageGeometry(), ossimGpkgReader::getImageGeometry(), ossimImageViewProjectionTransform::getImageToViewBounds(), ossimImageViewProjectionTransform::getInputMetersPerPixel(), ossimPdfWriter::getLgiDictCtm(), ossimChipperUtil::getMapProjection(), ossimImageViewProjectionTransform::getOutputMetersPerPixel(), ATP::AtpGenerator::getValidVertices(), ossimGeoAnnotationEllipseObject::getWidthHeightInPixels(), ossimChipperUtil::hasSensorModelInput(), ossimImageViewProjectionTransform::imageToView(), ossimLasReader::init(), ossimElevRemapper::initialize(), ossimImageProjectionModel::initialize(), ossimViewshedTool::initializeProjectionGsd(), ossimChipProcTool::initializeProjectionGsd(), ossimTiledElevationDatabase::initializeReferenceProjection(), ossimImageViewProjectionTransform::initializeViewSize(), ossimViewshedTool::initProcessingChain(), ossimMapCompositionSource::inputMapProjection(), ossimGdalOgrVectorAnnotation::loadExternalGeometryFile(), ossimGdalOgrVectorAnnotation::loadLineString(), ossimGdalOgrVectorAnnotation::loadMultiLineString(), ossimGdalOgrVectorAnnotation::loadMultiPoint(), ossimGdalOgrVectorAnnotation::loadMultiPolygon(), ossimGdalOgrVectorAnnotation::loadPoint(), ossimGdalOgrVectorAnnotation::loadPolygon(), ossimChipProcTool::newIdentityProjection(), ossimGeoidImage::open(), ossimVpfAnnotationSource::ossimVpfAnnotationSource(), ossimTilingPoly::parseShpFile(), ossimPointCloudImageHandler::setGSD(), ossimRpcSolver::solveCoefficients(), ossimOrthoImageMosaic::updateGeometry(), ossimRLevelFilter::updateGeometry(), ossimScaleFilter::updateGeometry(), ossimGdalOgrVectorAnnotation::verifyViewParams(), ossimImageViewProjectionTransform::viewToImage(), ossimERSFileWriter::writeFile(), ossimEnviHeaderFileWriter::writeFile(), ossimFgdcFileWriter::writeFile(), ossimNitfWriterBase::writeGeometry(), ossimOpjCompressor::writeGeotiffBox(), ossimKakaduCompressor::writeGeotiffBox(), ossimGdalWriter::writeProjectionInfo(), and ossimWriter::writeTiffTags().
|
inline |
Definition at line 166 of file ossimImageGeometry.h.
ossim_uint32 ossimImageGeometry::getTargetRrds | ( | ) | const |
Definition at line 679 of file ossimImageGeometry.cpp.
References m_targetRrds.
void ossimImageGeometry::getTiePoint | ( | ossimGpt & | tie, |
bool | edge | ||
) | const |
Get the latitude, longitude of the tie point.
This is the bounding upper left point of the image which is not necessarily the image (0, 0) point.
tie | ossimGpt to assign. |
edge | If true the tie point is shifted up and to the right by half the gsd. |
Definition at line 732 of file ossimImageGeometry.cpp.
References ossimProjection::forward(), ossimRefPtr< T >::get(), getBoundingGroundRect(), ossimMapProjection::getDecimalDegreesPerPixel(), ossimProjection::getMetersPerPixel(), ossimIpt::hasNans(), ossimDpt::hasNans(), ossimProjection::inverse(), ossimMapProjection::isGeographic(), ossimGpt::lat, localToWorld(), ossimGpt::lon, m_imageSize, m_projection, ossimGpt::makeNan(), ossim::nan(), ossimGrect::ul(), ossimRefPtr< T >::valid(), ossimIpt::x, ossimDpt::x, ossimIpt::y, and ossimDpt::y.
Referenced by ATP::AtpGenerator::constructChain(), getTiePoint(), and ossimEquationUtil::initInputSources().
void ossimImageGeometry::getTiePoint | ( | ossimDpt & | tie, |
bool | edge | ||
) | const |
Get the easting, northing of the tie point.
This is the bounding upper left point of the image which is not necessarily the image (0, 0) point.
tie | ossimDpt to assign. |
edge | If true the tie point is shifted up and to the right by half the gsd. |
Definition at line 878 of file ossimImageGeometry.cpp.
References ossimProjection::forward(), ossimRefPtr< T >::get(), ossimMapProjection::getMetersPerPixel(), getTiePoint(), ossimIpt::hasNans(), ossimDpt::hasNans(), ossimGpt::hasNans(), ossimGpt::hgt, ossimMapProjection::isGeographic(), ossimMapProjection::lineSampleToEastingNorthing(), m_imageSize, m_projection, ossimDpt::makeNan(), rnToFull(), ossimRefPtr< T >::valid(), ossimDpt::x, and ossimDpt::y.
|
inline |
Access methods for transform (may be NULL pointer).
Definition at line 161 of file ossimImageGeometry.h.
Referenced by ossimKakaduJpipImageGeometryFactory::extendGeometry(), ossimImageGeometryFactory::extendGeometry(), ossimQuickbirdNitfTileSource::getImageGeometry(), ossimImageViewProjectionTransform::imageToView(), and ossimImageViewProjectionTransform::viewToImage().
|
inline |
Definition at line 162 of file ossimImageGeometry.h.
|
inline |
Returns TRUE if valid projection defined.
Definition at line 190 of file ossimImageGeometry.h.
Referenced by ossimImageGeometryFactory::extendGeometry(), ossimImageViewProjectionTransform::getImageToViewBounds(), ossimImageViewProjectionTransform::getInputMetersPerPixel(), ossimImageViewProjectionTransform::getOutputMetersPerPixel(), ossimGeoAnnotationEllipseObject::getWidthHeightInPixels(), ossimGeoAnnotationSource::loadState(), and ossimNitfWriterBase::writeGeometry().
|
inline |
Returns TRUE if valid transform defined.
Definition at line 193 of file ossimImageGeometry.h.
Referenced by ossimKakaduJpipImageGeometryFactory::extendGeometry(), and ossimImageGeometryFactory::extendGeometry().
bool ossimImageGeometry::isAffectedByElevation | ( | ) | const |
Returns TRUE if this geometry is sensitive to elevation.
Definition at line 332 of file ossimImageGeometry.cpp.
References ossimProjection::isAffectedByElevation(), m_projection, and ossimRefPtr< T >::valid().
Referenced by ossimInfo::getUpIsUpAngle(), ossimImageViewProjectionTransform::getViewSegments(), ossimEquationUtil::initInputSources(), and worldToLocal().
|
virtual |
< Maintains full_image-to-world_space transformation
Reimplemented from ossimObject.
Definition at line 978 of file ossimImageGeometry.cpp.
References ossimRefPtr< T >::get(), ossimObject::isEqualTo(), ossimProjection::isEqualTo(), ossimIpt::isEqualTo(), m_decimationFactors, m_imageSize, m_projection, m_targetRrds, m_transform, OSSIM_COMPARE_IMMEDIATE, and ossimRefPtr< T >::valid().
Referenced by ossimGeoPolyCutter::setView().
bool ossimImageGeometry::isMapProjected | ( | ) | const |
Returns true if underlying projection is derived from ossimMapProjection.
Definition at line 1681 of file ossimImageGeometry.cpp.
References ossimRefPtr< T >::get(), and m_projection.
|
virtual |
Attempts to initialize a transform and a projection given the KWL.
Returns TRUE if no error encountered.
Reimplemented from ossimObject.
Definition at line 547 of file ossimImageGeometry.cpp.
References ossimString::c_str(), ossimKeywordlist::find(), ossim2dTo2dTransformRegistry::instance(), ossimProjectionFactoryRegistry::instance(), ossimObject::loadState(), m_decimationFactors, m_imageSize, m_projection, m_targetRrds, m_transform, setProjection(), ossimString::size(), STATIC_TYPE_NAME, ossimIpt::toPoint(), ossimString::toUInt32(), ossim::toVector(), ossimKeywordNames::TYPE_KW, and ossimRefPtr< T >::valid().
Referenced by ossimImageGeometryFactory::createGeometry(), ossimImageHandler::getExternalImageGeometry(), ossimDoqqTileSource::getImageGeometry(), ossimERSTileSource::getImageGeometry(), ossimRpfCacheTileSource::getImageGeometry(), ossimImageCacheBase::getImageGeometry(), ossimGdalOgrVectorAnnotation::loadExternalGeometryFile(), ossimGeoAnnotationSource::loadState(), ossimMemoryImageSource::loadState(), ossimGeoPolyCutter::loadState(), ossimImageViewProjectionTransform::loadState(), ossimOgrVectorTileSource::loadState(), ossimEsriShapeFileFilter::loadState(), and ossimGeneralRasterElevHandler::setFilename().
Exposes the 3D projection from image to world coordinates.
The caller should verify that a valid projection exists before calling this method. Returns TRUE if a valid ground point is available in the ground_pt argument. This method depends on the existence of elevation information. If no DEM is available, the results will be incorrect or inaccurate.
Return a NAN point of no projection is defined:
Definition at line 178 of file ossimImageGeometry.cpp.
References ossimProjection::lineSampleToWorld(), m_projection, m_targetRrds, ossimGpt::makeNan(), rnToFull(), and ossimRefPtr< T >::valid().
Referenced by ossimCoarseGridModel::buildGrid(), calculatePolyBounds(), ATP::AtpTileSource::computeParallax(), RadialProcessor::doRadial(), ossimEsriShapeFileFilter::drawAnnotations(), ossimInfo::getCenterGround(), ossimHlzTool::getChip(), ossimShorelineTool::getChip(), ossimViewshedTool::getChip(), getCornerGpts(), getCrossesDateline(), getDegreesPerPixel(), ossimGdalOgrVectorAnnotation::getFeatures(), ossimGmlSupportData::getGeoBounds(), ossimGmlSupportData::getGeoOrigin(), ossimInfo::getImageBounds(), ossimInfo::getImageGeometryInfo(), ossimImageViewProjectionTransform::getImageToViewBounds(), ossimPdfWriter::getLgiDictCtm(), ossimGmlSupportData::getMapOrigin(), getMetersPerPixel(), getTiePoint(), ossimPointCloudUtilityFilter::getTile(), ossimImageViewProjectionTransform::getViewSegments(), ossimIvtGeomXform::imageToGround(), ossimImageViewProjectionTransform::imageToView(), ATP::AtpGenerator::initialize(), ossimImageViewProjectionTransform::initializeViewSize(), ossimViewshedTool::initProcessingChain(), ossimGeoPolyCutter::invertPolygon(), localToWorld(), main(), ossimTiledElevationDatabase::mapRegion(), northUpAngle(), rnToWorld(), ossimGeneralRasterElevHandler::setFilename(), ossimPotraceTool::transformLineStrings(), ossimPotraceTool::transformPolygons(), upIsUpAngle(), and ossimImageViewProjectionTransform::viewToImage().
bool ossimImageGeometry::localToWorld | ( | const ossimDrect & | local_rect, |
ossimGrect & | world_rect | ||
) | const |
Definition at line 201 of file ossimImageGeometry.cpp.
References ossimDrect::ll(), localToWorld(), ossimDrect::lr(), ossimDrect::ul(), and ossimDrect::ur().
bool ossimImageGeometry::localToWorld | ( | const ossimDpt & | local_pt, |
const double & | h_ellipsoid, | ||
ossimGpt & | world_pt | ||
) | const |
Exposes the 3D projection from image to world coordinates given a constant height above ellipsoid.
The caller should verify that a valid projection exists before calling this method. Returns TRUE if a valid ground point is available in the ground_pt argument.
Return a NAN point of no projection is defined:
Definition at line 218 of file ossimImageGeometry.cpp.
References ossimProjection::lineSampleHeightToWorld(), m_projection, m_targetRrds, ossimGpt::makeNan(), rnToFull(), ossimRefPtr< T >::valid(), and ossimGpt::wrap().
ossim_float64 ossimImageGeometry::northUpAngle | ( | ) | const |
Definition at line 1645 of file ossimImageGeometry.cpp.
References getBoundingRect(), ossimGpt::hasNans(), ossimDrect::hasNans(), localToWorld(), ossimDrect::lr(), m_projection, ossimDrect::midPoint(), ossim::nan(), ossimDrect::ul(), ossimRefPtr< T >::valid(), ossimDpt::x, and ossimDpt::y.
Referenced by ossimInfo::getNorthUpAngle().
bool ossimImageGeometry::open | ( | const ossimFilename & | image | ) |
Shortcut way of getting to an image's geometry when access to pixels is not needed.
image | Image to open |
Definition at line 84 of file ossimImageGeometry.cpp.
References ossimImageHandler::getImageGeometry(), ossimImageHandlerRegistry::instance(), ossimImageHandlerRegistry::open(), and ossimRefPtr< T >::valid().
Referenced by ossimChipProcTool::newIdentityProjection(), and ossimChipProcTool::setAoiToInputs().
const ossimImageGeometry & ossimImageGeometry::operator= | ( | const ossimImageGeometry & | copy_this | ) |
Replaces any existing transform and projection with those in the copy_this object.
Definition at line 687 of file ossimImageGeometry.cpp.
References ossimObject::dup(), ossimProjection::dup(), m_decimationFactors, m_imageSize, m_projection, m_targetRrds, m_transform, and ossimRefPtr< T >::valid().
bool ossimImageGeometry::operator== | ( | const ossimImageGeometry & | other | ) | const |
Returns TRUE if argument geometry has exactly the same instances for transform and m_projection.
This should be expanded to permit different instances of same transforms
This may need to be expanded to permit different instances of same transforms
Definition at line 477 of file ossimImageGeometry.cpp.
References decimationFactor(), m_projection, and m_transform.
|
virtual |
Prints contents to output stream.
Reimplemented from ossimObject.
Definition at line 439 of file ossimImageGeometry.cpp.
References m_decimationFactors, m_imageSize, m_projection, m_targetRrds, m_transform, ossim2dTo2dTransform::print(), ossimProjection::print(), and ossimRefPtr< T >::valid().
Referenced by ossimImageViewProjectionTransform::print().
void ossimImageGeometry::rnToFull | ( | const ossimDpt & | rnPt, |
ossim_uint32 | resolutionLevel, | ||
ossimDpt & | fullPt | ||
) | const |
rnToFull is a utility method that takes a rn resolution image point and maps it to the full image point.
rnPt | Is a point in resolution n. |
resolutionLevel | Is the resolution of the point rnPt. a value of 0 is the local image |
fullPt | Is the result of the transform |
Definition at line 116 of file ossimImageGeometry.cpp.
References ossim2dTo2dTransform::forward(), ossimDpt::hasNans(), m_transform, undecimatePoint(), and ossimRefPtr< T >::valid().
Referenced by getTiePoint(), ossimImageViewProjectionTransform::imageToView(), localToWorld(), and ossimImageViewProjectionTransform::viewToImage().
void ossimImageGeometry::rnToRn | ( | const ossimDpt & | inRnPt, |
ossim_uint32 | inResolutionLevel, | ||
ossim_uint32 | outResolutionLevel, | ||
ossimDpt & | outRnPt | ||
) | const |
rnToRn is a utility method that takes a rn resolution image point and maps it to the another rn resolution image point.
inRnPt | Is a point in resolution n. |
inResolutionLevel | Is the resolution of the point inRnPt. |
outResolutionLevel | Is the resolution of the point outRnPt. |
outRnPt | Is the result of the transform. |
Definition at line 98 of file ossimImageGeometry.cpp.
References decimatePoint(), and undecimatePoint().
Referenced by rnToWorld(), and worldToRn().
void ossimImageGeometry::rnToWorld | ( | const ossimDpt & | rnPt, |
ossim_uint32 | resolutionLevel, | ||
ossimGpt & | wpt | ||
) | const |
rnToWorld is a utility method that takes a rn resolution image point and maps it to the world point.
rnPt | Is a point in resolution n. |
resolutionLevel | Is the resolution of the point rnPt. a value of 0 is the local image |
wpt | Is the result of the transform |
Definition at line 154 of file ossimImageGeometry.cpp.
References localToWorld(), m_targetRrds, and rnToRn().
Referenced by ossimElevRemapper::elevRemap(), and ossimPointCloudImageHandler::getTile().
|
virtual |
Saves the transform (if any) and projection (if any) states to the KWL.
Reimplemented from ossimObject.
Definition at line 627 of file ossimImageGeometry.cpp.
References ossimKeywordlist::add(), ossimString::c_str(), getMetersPerPixel(), m_decimationFactors, m_imageSize, m_projection, m_targetRrds, m_transform, ossim2dTo2dTransform::saveState(), ossimObject::saveState(), ossimProjection::saveState(), ossimIpt::toString(), ossimDpt::toString(), ossim::toStringList(), and ossimRefPtr< T >::valid().
Referenced by ossimHdf5Tool::execute(), ossimSubImageTool::execute(), ossimInfo::getImageGeometryInfo(), ossimImageHandler::saveImageGeometry(), ossimElevRemapper::saveState(), ossimGdalOgrVectorAnnotation::saveState(), ossimMemoryImageSource::saveState(), ossimImageViewProjectionTransform::saveState(), ossimOgrVectorTileSource::saveState(), ossimEsriShapeFileFilter::saveState(), and ossimGeoPdfReader::saveState().
|
inline |
Sets the decimation scheme to a discrete list of decimation factors.
Definition at line 318 of file ossimImageGeometry.h.
Referenced by ossimMrSidReader::getDecimationFactors(), and ossimImageHandler::initImageParameters().
|
inline |
Definition at line 326 of file ossimImageGeometry.h.
References size.
Referenced by ossimSubImageTool::execute(), ossimHlzTool::getChip(), ossimShorelineTool::getChip(), ossimViewshedTool::getChip(), ossimChipProcTool::getChip(), ossimChipperUtil::getChip(), ossimLasReader::getImageGeometry(), ATP::AtpGenerator::initialize(), ossimRangeDomeTileSource::initialize(), ossimTilingRect::initializeBase(), ossimIgen::initializeChain(), ossimImageViewProjectionTransform::initializeViewSize(), ossimImageHandler::initImageParameters(), ossimViewshedTool::initProcessingChain(), and ossimPointCloudImageHandler::setGSD().
void ossimImageGeometry::setProjection | ( | ossimProjection * | projection | ) |
Sets the projection to be used for local-to-world coordinate transformation.
Definition at line 324 of file ossimImageGeometry.cpp.
References m_projection.
Referenced by ossimCoarseGridModel::buildGrid(), ossimKakaduJpipImageGeometryFactory::createGeometry(), ossimImageGeometryFactory::extendGeometry(), ossimMrSidReader::getExternalImageGeometry(), ossimGdalTileSource::getExternalImageGeometryFromXml(), ossimQuickbirdTiffTileSource::getImageGeometry(), ossimQbTileFilesHandler::getImageGeometry(), ossimRpfTocEntry::getImageGeometry(), ossimDtedTileSource::getImageGeometry(), ossimGeneralRasterTileSource::getImageGeometry(), ossimPointCloudImageHandler::getImageGeometry(), ossimLasReader::getImageGeometry(), ossimplugins::ossimRadarSat2TiffReader::getInternalImageGeometry(), ossimplugins::ossimTerraSarTiffReader::getInternalImageGeometry(), ossimJpegTileSource::getInternalImageGeometry(), ossimH5ImageHandler::getInternalImageGeometry(), ossimEquationUtil::initInputSources(), ossimGdalOgrVectorAnnotation::loadExternalImageGeometryFromXml(), loadState(), ossimGeoAnnotationSource::setView(), ossimGdalOgrVectorAnnotation::setView(), ossimImageViewProjectionTransform::setView(), ossimEsriShapeFileFilter::setView(), and ossimRpcSolver::solveCoefficients().
void ossimImageGeometry::setTargetRrds | ( | ossim_uint32 | rrds | ) |
Set m_targetRrds data member.
This is used by methods worldToRn and localToWorld that do not take a rrds argument and methods rnToWorld and worldToRn. If the target rrds is set to 2, then the resulting point from worldToLocal is relative to reduced resolution level 2. Vice versa for localToWorld it is assumed the local point is relative to the target reduced resolution data set.
rrds | Target (zero based) reduced resolution data set. |
Definition at line 674 of file ossimImageGeometry.cpp.
References m_targetRrds.
void ossimImageGeometry::setTransform | ( | ossim2dTo2dTransform * | transform | ) |
Sets the transform to be used for local-to-full-image coordinate transformation.
Definition at line 316 of file ossimImageGeometry.cpp.
References m_transform.
Referenced by ossimKakaduJpipImageGeometryFactory::createGeometry(), ossimKakaduJpipImageGeometryFactory::extendGeometry(), ossimImageGeometryFactory::extendGeometry(), ossimQuickbirdNitfTileSource::getImageGeometry(), and ossimQbTileFilesHandler::getImageGeometry().
|
protected |
Method to back out decimation of a point.
rnPt | Is a point in resolution n. |
resolutionLevel | Is the resolution of the point rnPt. |
outPt | Is the result of the transform a non-decimated point. |
Definition at line 918 of file ossimImageGeometry.cpp.
References decimationFactor(), ossimDpt::hasNans(), ossimDpt::makeNan(), ossimDpt::x, and ossimDpt::y.
Referenced by rnToFull(), and rnToRn().
ossim_float64 ossimImageGeometry::upIsUpAngle | ( | const ossimDpt & | pt | ) | const |
Definition at line 1479 of file ossimImageGeometry.cpp.
References ossim::almostEqual(), ossim::atan2d(), FLT_EPSILON, getBoundingRect(), ossimDpt::hasNans(), ossimDrect::hasNans(), ossimProjection::isAffectedByElevation(), ossim::isnan(), ossimDpt::length(), localToWorld(), m_projection, ossimDrect::midPoint(), ossim::nan(), ossimRefPtr< T >::valid(), worldToLocal(), ossimDpt::x, and ossimDpt::y.
ossim_float64 ossimImageGeometry::upIsUpAngle | ( | ) | const |
Definition at line 1617 of file ossimImageGeometry.cpp.
References getBoundingRect(), ossimDrect::hasNans(), ossimProjection::isAffectedByElevation(), m_projection, ossimDrect::midPoint(), ossim::nan(), and ossimRefPtr< T >::valid().
Exposes the 3D world-to-local image coordinate reverse projection.
The caller should verify that a valid projection exists before calling this method. Returns TRUE if a valid image point is available in the local_pt argument.
Definition at line 247 of file ossimImageGeometry.cpp.
References fullToRn(), ossimElevManager::getHeightAboveEllipsoid(), ossimGpt::hgt, ossimElevManager::instance(), isAffectedByElevation(), ossimGpt::isHgtNan(), m_projection, m_targetRrds, ossimDpt::makeNan(), ossimRefPtr< T >::valid(), and ossimProjection::worldToLineSample().
Referenced by ossimChipperUtil::addCrossHairAnnotation(), ossimChipProcTool::computeAdjustedViewFromGrect(), ossimGeoPdfReader::computeBoundingRect(), computeGroundToImagePartials(), computeImageToGroundPartialsWRTAdjParam(), ATP::AtpTileSource::computeParallax(), ossimChipProcTool::getChip(), ossimImageElevationHandler::getHeightAboveMSL(), ossimGeneralRasterElevHandler::getHeightAboveMSLFileTemplate(), ossimGeneralRasterElevHandler::getHeightAboveMSLMemoryTemplate(), ossimImageViewProjectionTransform::getImageToViewBounds(), ossimChipperUtil::getIrect(), ossimPointObservation::getResiduals(), ossimPointCloudImageHandler::getValidImageVertices(), ossimImageViewProjectionTransform::getViewSegments(), ossimIvtGeomXform::groundToImage(), ossimImageViewProjectionTransform::imageToView(), ossimRangeDomeTileSource::initialize(), ossimGdalOgrVectorAnnotation::initializeBoundingRec(), ossimImageViewProjectionTransform::initializeViewSize(), ossimViewshedTool::initProcessingChain(), ossimTiledElevationDatabase::mapRegion(), ossimGeoidImage::offsetFromEllipsoidTemplate(), ossimKmlSuperOverlayReader::open(), ossimViewshedTool::paintReticle(), ossimImageElevationHandler::pointHasCoverage(), ossimPointCloudImageHandler::setGSD(), ossimGeoAnnotationPolyLineObject::transform(), ossimGeoAnnotationLineObject::transform(), ossimGeoAnnotationMultiPolyObject::transform(), ossimGeoAnnotationMultiPolyLineObject::transform(), ossimGeoAnnotationMultiEllipseObject::transform(), ossimGeoAnnotationBitmap::transform(), ossimGeoAnnotationGdBitmapFont::transform(), ossimGeoAnnotationEllipseObject::transform(), ossimGeoAnnotationPolyObject::transform(), ossimGeoAnnotationFontObject::transform(), ossimGeoPolyCutter::transformVertices(), upIsUpAngle(), ossimImageViewProjectionTransform::viewToImage(), worldToLocal(), and worldToRn().
bool ossimImageGeometry::worldToLocal | ( | const ossimGrect & | world_rect, |
ossimDrect & | local_rect | ||
) | const |
Definition at line 301 of file ossimImageGeometry.cpp.
References ossimGrect::ll(), ossimGrect::lr(), ossimGrect::ul(), ossimGrect::ur(), and worldToLocal().
void ossimImageGeometry::worldToRn | ( | const ossimGpt & | wpt, |
ossim_uint32 | resolutionLevel, | ||
ossimDpt & | rnPt | ||
) | const |
worldToRn is a utility method that takes a world point allows one to transform all the way back to an rn point.
wpt | Ground point. |
resolutionLevel | Is the resolution of the point rnPt. a value of 0 is the local image |
rnPt | Is the resoltion point. |
Definition at line 163 of file ossimImageGeometry.cpp.
References m_targetRrds, rnToRn(), and worldToLocal().
Referenced by ossimPointCloudImageHandler::getTile().
|
protected |
List of decimation factors for R-levels.
Definition at line 481 of file ossimImageGeometry.h.
Referenced by decimationFactor(), decimationFactors(), isEqualTo(), loadState(), operator=(), print(), and saveState().
|
protected |
Definition at line 482 of file ossimImageGeometry.h.
Referenced by applyScale(), getBoundingRect(), getCornerGpts(), getDegreesPerPixel(), getMetersPerPixel(), getTiePoint(), isEqualTo(), loadState(), operator=(), ossimImageGeometry(), print(), and saveState().
|
protected |
Maintains full_image-to-world_space transformation.
Definition at line 480 of file ossimImageGeometry.h.
Referenced by applyScale(), getDegreesPerPixel(), getMetersPerPixel(), getTiePoint(), isAffectedByElevation(), isEqualTo(), isMapProjected(), loadState(), localToWorld(), northUpAngle(), operator=(), operator==(), print(), saveState(), setProjection(), upIsUpAngle(), and worldToLocal().
|
protected |
Target rrds for localToWorld and worldToLocal methods.
Definition at line 485 of file ossimImageGeometry.h.
Referenced by getTargetRrds(), isEqualTo(), loadState(), localToWorld(), operator=(), print(), rnToWorld(), saveState(), setTargetRrds(), worldToLocal(), and worldToRn().
|
protected |
Maintains local_image-to-full_image transformation.
Definition at line 479 of file ossimImageGeometry.h.
Referenced by fullToRn(), getDegreesPerPixel(), getMetersPerPixel(), isEqualTo(), loadState(), operator=(), operator==(), print(), rnToFull(), saveState(), and setTransform().