OSSIM - Open Source Software Image Map
Version 1.9.0 (20180803)
|
#include <ossimTiling.h>
Public Types | |
enum | ossimTilingDeltaType { ossimTilingDeltaType_TOTAL_PIXELS, ossimTilingDeltaType_PER_PIXEL } |
Public Member Functions | |
ossimTiling () | |
bool | initialize (const ossimMapProjection &proj, const ossimIrect &boundingRect) |
bool | next (ossimRefPtr< ossimMapProjection > &resultProjection, ossimIrect &resultingBounds, ossimString &resultingName) const |
void | reset () |
void | setTilingDistance (const ossimDpt &tilingDistance, ossimUnitType unitType) |
void | setDelta (const ossimDpt &delta, ossimTilingDeltaType deltaType) |
This sets the pixel delta. More... | |
void | setTileNameMask (const ossimString &mask) |
This sets the tilename mask. More... | |
ossimString | getTileNameMask () const |
bool | getRowCol (ossim_int64 &row, ossim_int64 &col, ossim_int64 tileId) const |
bool | getOrigin (ossimDpt &origin, ossim_int64 tileId) const |
bool | getOrigin (ossimDpt &origin, ossim_int64 row, ossim_int64 col) const |
void | setPaddingSizeInPixels (const ossimIpt &pizelOverlap) |
ossimDpt | getDeltaPerPixel () const |
virtual bool | saveState (ossimKeywordlist &kwl, const char *prefix=0) const |
virtual bool | loadState (const ossimKeywordlist &kwl, const char *prefix=0) |
virtual std::ostream & | print (std::ostream &out) const |
Generic print method. More... | |
![]() | |
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 |
Protected Member Functions | |
void | getConvertedTilingDistance (ossimDpt &pt) const |
bool | validate () const |
bool | isAngularUnit (ossimUnitType unitType) const |
bool | isLinearUnit (ossimUnitType unitType) const |
void | getTileName (ossimString &resultingName, ossim_int64 row, ossim_int64 col, ossim_int64 id) const |
void | clampGeographic (ossimDrect &rect) const |
![]() | |
virtual | ~ossimReferenced () |
Definition at line 24 of file ossimTiling.h.
Enumerator | |
---|---|
ossimTilingDeltaType_TOTAL_PIXELS | |
ossimTilingDeltaType_PER_PIXEL |
Definition at line 28 of file ossimTiling.h.
ossimTiling::ossimTiling | ( | ) |
Definition at line 27 of file ossimTiling.cpp.
|
protected |
Definition at line 669 of file ossimTiling.cpp.
References ossimDpt::lat, ossimDpt::lon, ossimDrect::lr(), ossimDrect::orientMode(), and ossimDrect::ul().
|
protected |
Definition at line 947 of file ossimTiling.cpp.
References ossimMapProjection::isGeographic(), ossimMapProjection::origin(), OSSIM_DEGREES, OSSIM_METERS, OSSIM_PIXEL, ossimNotify(), ossimNotifyLevel_WARN, ossimUnitConversionTool::setValue(), theMapProjection, theTilingDistance, theTilingDistanceUnitType, ossimDpt::x, and ossimDpt::y.
Referenced by getOrigin().
ossimDpt ossimTiling::getDeltaPerPixel | ( | ) | const |
Definition at line 544 of file ossimTiling.cpp.
References ossimMapProjection::isGeographic(), ossimMapProjection::origin(), OSSIM_DEGREES, OSSIM_METERS, ossimTilingDeltaType_TOTAL_PIXELS, ossimUnitConversionTool::setValue(), theDelta, theDeltaType, theMapProjection, theTilingDistance, theTilingDistanceUnitType, ossimDpt::x, and ossimDpt::y.
Referenced by next().
bool ossimTiling::getOrigin | ( | ossimDpt & | origin, |
ossim_int64 | tileId | ||
) | const |
Definition at line 501 of file ossimTiling.cpp.
References getRowCol().
Referenced by getTileName(), ossimTilingRect::next(), and next().
bool ossimTiling::getOrigin | ( | ossimDpt & | origin, |
ossim_int64 | row, | ||
ossim_int64 | col | ||
) | const |
Definition at line 516 of file ossimTiling.cpp.
References getConvertedTilingDistance(), ossimDrect::orientMode(), OSSIM_RIGHT_HANDED, theTilingRect, theTotalHorizontalTiles, theTotalVerticalTiles, ossimDrect::ul(), ossimDpt::x, and ossimDpt::y.
bool ossimTiling::getRowCol | ( | ossim_int64 & | row, |
ossim_int64 & | col, | ||
ossim_int64 | tileId | ||
) | const |
Definition at line 481 of file ossimTiling.cpp.
References theTotalHorizontalTiles, theTotalTiles, and theTotalVerticalTiles.
Referenced by getOrigin(), ossimTilingRect::next(), and next().
|
protected |
Definition at line 586 of file ossimTiling.cpp.
References ossimString::c_str(), ossimString::contains(), getOrigin(), ossimDpt::lat, ossimDpt::lon, OSSIM_DEGREES, ossimString::substitute(), theTileNameMask, theTilingDistance, theTilingDistanceUnitType, and ossimDpt::x.
Referenced by ossimTilingRect::next(), and next().
ossimString ossimTiling::getTileNameMask | ( | ) | const |
bool ossimTiling::initialize | ( | const ossimMapProjection & | proj, |
const ossimIrect & | boundingRect | ||
) |
Definition at line 48 of file ossimTiling.cpp.
Referenced by ossimIgen::outputProduct().
|
protected |
Definition at line 408 of file ossimTiling.cpp.
References OSSIM_DEGREES, OSSIM_MINUTES, OSSIM_RADIANS, and OSSIM_SECONDS.
|
protected |
Definition at line 430 of file ossimTiling.cpp.
References OSSIM_FEET, OSSIM_METERS, OSSIM_MILES, OSSIM_MILLIMETERS, OSSIM_NAUTICAL_MILES, and OSSIM_US_SURVEY_FEET.
|
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.
Reimplemented in ossimTilingRect, and ossimTilingPoly.
Definition at line 760 of file ossimTiling.cpp.
References distance(), ossimKeywordlist::find(), ossimUnitTypeLut::getEntryNumber(), ossimUnitTypeLut::instance(), ossimKeywordlist::numberOf(), OSSIM_PIXEL, ossimTilingDeltaType_PER_PIXEL, ossimTilingDeltaType_TOTAL_PIXELS, setTileNameMask(), theDelta, theDeltaType, theEdgeToEdgeFlag, theNumberOfBands, theNumberOfBytesPerPixelPerBand, theOutputSizeInBytes, thePaddingSizeInPixels, theTileNameMask, theTilingDistance, theTilingDistanceUnitType, ossimString::toBool(), ossimString::toInt32(), ossimString::toInt64(), ossimDpt::x, x, ossimDpt::y, and y.
bool ossimTiling::next | ( | ossimRefPtr< ossimMapProjection > & | resultProjection, |
ossimIrect & | resultingBounds, | ||
ossimString & | resultingName | ||
) | const |
Definition at line 188 of file ossimTiling.cpp.
References ossimGpt::datum(), getDeltaPerPixel(), getOrigin(), getRowCol(), getTileName(), ossimMapProjection::isGeographic(), ossimDpt::lat, ossimDpt::lon, ossimMapProjection::origin(), OSSIM_PIXEL, ossimTilingDeltaType_TOTAL_PIXELS, ossimMapProjection::setDecimalDegreesPerPixel(), ossimMapProjection::setMetersPerPixel(), ossimMapProjection::setUlTiePoints(), theDelta, theDeltaType, theEdgeToEdgeFlag, theMapProjection, thePaddingSizeInPixels, theTileId, theTilingDistance, theTilingDistanceUnitType, theTotalTiles, ossimIpt::x, ossimDpt::x, ossimIpt::y, and ossimDpt::y.
Referenced by ossimIgen::outputProduct().
|
virtual |
Generic print method.
Derived classes should re-implement as they see fit.
Reimplemented from ossimObject.
Definition at line 912 of file ossimTiling.cpp.
References ossimMapProjection::print(), theDelta, theDeltaType, theEdgeToEdgeFlag, theImageRect, theMapProjection, theNumberOfBands, theNumberOfBytesPerPixelPerBand, theOutputSizeInBytes, thePaddingSizeInPixels, theTileId, theTileNameMask, theTilingDistance, theTilingDistanceUnitType, theTilingRect, theTotalHorizontalTiles, theTotalTiles, theTotalVerticalTiles, and ossimRefPtr< T >::valid().
void ossimTiling::reset | ( | void | ) |
|
virtual |
Method to save the state of the object to a keyword list. Return true if ok or false on error.
Reimplemented from ossimObject.
Reimplemented in ossimTilingRect, and ossimTilingPoly.
Definition at line 683 of file ossimTiling.cpp.
References ossimKeywordlist::add(), ossimString::c_str(), ossimUnitTypeLut::instance(), ossimTilingDeltaType_TOTAL_PIXELS, theDelta, theDeltaType, theEdgeToEdgeFlag, theNumberOfBands, theNumberOfBytesPerPixelPerBand, theOutputSizeInBytes, thePaddingSizeInPixels, theTileNameMask, theTilingDistance, theTilingDistanceUnitType, ossimString::toString(), ossimDpt::x, and ossimDpt::y.
void ossimTiling::setDelta | ( | const ossimDpt & | delta, |
ossimTilingDeltaType | deltaType | ||
) |
This sets the pixel delta.
The delta can either be TOTAL_PIXELS or UNIT_PER_PIXEL.
If the delta type is TOTAL_PIXELS then the unit per pixel is calculated from the theTilingDistance. This is very useful when wanting to be on even geographic boundaries and would like to have a fixed width and height for the pixels. Flight simulators use this tiling scheme for power of 2 outputs.
if the delta type is unit per pixel then the total pixels is computed form the theTilingDistance. This is useful when you might want whole number GSD's and whole numbered tile boundaries.
Definition at line 312 of file ossimTiling.cpp.
References theDelta, and theDeltaType.
void ossimTiling::setPaddingSizeInPixels | ( | const ossimIpt & | pizelOverlap | ) |
void ossimTiling::setTileNameMask | ( | const ossimString & | mask | ) |
This sets the tilename mask.
The key tokens that are supported are.
r% Replaces with the row number of the current tile c% Replaces with the column number of the current tile i% Replaces with the current tile id. or% Replaces with the origin of the row oc% Replaces with the origin of the col SRTM% Replaces all filenames with the SRTM file name convention
Examples: tiler_c% assume r = 0 and c = 100 then this is replaced with tile0_100
Definition at line 455 of file ossimTiling.cpp.
References ossimString::contains(), and theTileNameMask.
Referenced by ossimTilingRect::loadState(), and loadState().
void ossimTiling::setTilingDistance | ( | const ossimDpt & | tilingDistance, |
ossimUnitType | unitType | ||
) |
tilingDistance | Distance in the specified units. |
unitType | Currently only angular unit degrees, and linear unit meters are supported. If unitType is pixel unit then the delta per unit will be set to 1. |
Definition at line 305 of file ossimTiling.cpp.
References theTilingDistance, and theTilingDistanceUnitType.
|
protected |
Definition at line 319 of file ossimTiling.cpp.
References FLT_EPSILON, ossimIrect::hasNans(), ossimMapProjection::isGeographic(), OSSIM_DEGREES, OSSIM_FEET, OSSIM_METERS, OSSIM_MILES, OSSIM_MILLIMETERS, OSSIM_MINUTES, OSSIM_NAUTICAL_MILES, OSSIM_PIXEL, OSSIM_RADIANS, OSSIM_SECONDS, OSSIM_US_SURVEY_FEET, ossimNotify(), ossimNotifyLevel_WARN, theDelta, theImageRect, theMapProjection, theTilingDistance, theTilingDistanceUnitType, ossimRefPtr< T >::valid(), ossimDpt::x, and ossimDpt::y.
|
protected |
If (theDeltaType == ossimTilingDeltaType_TOTAL_PIXELS) then this is the size of the tile in pixels like 1024 x 1024.
If (theDeltaType == ossimTilingDeltaType_PER_PIXEL) then this is the size of a single pixel like 1.0 meter.
Definition at line 134 of file ossimTiling.h.
Referenced by getDeltaPerPixel(), ossimTilingRect::loadState(), loadState(), next(), print(), saveState(), setDelta(), and validate().
|
protected |
Definition at line 137 of file ossimTiling.h.
Referenced by getDeltaPerPixel(), loadState(), next(), print(), saveState(), and setDelta().
|
protected |
This flags the code to shift the tie point so that the edge of the pixel falls on the tile boundary.
default=false
Definition at line 186 of file ossimTiling.h.
Referenced by loadState(), next(), print(), and saveState().
|
protected |
Definition at line 174 of file ossimTiling.h.
Referenced by ossimTilingRect::initializeBase(), print(), ossimTilingPoly::setRect(), and validate().
|
mutableprotected |
Definition at line 173 of file ossimTiling.h.
Referenced by ossimTilingRect::getConvertedDistance(), getConvertedTilingDistance(), getDeltaPerPixel(), ossimTilingRect::getPaddingSize(), ossimTilingRect::initializeBase(), ossimTilingPoly::next(), ossimTilingRect::next(), next(), ossimTilingPoly::nextFeature(), ossimTilingPoly::parseShpFile(), print(), and validate().
|
protected |
Output number of bands.
Needed to tile by output size in bytes.
default = 1
Definition at line 158 of file ossimTiling.h.
Referenced by loadState(), print(), and saveState().
|
protected |
Output number of bytes per pixel.
Needed to tile by output size in bytes.
default = 1
Definition at line 170 of file ossimTiling.h.
Referenced by loadState(), print(), and saveState().
|
protected |
If set tiling size is controlled by the desired output size in bytes.
Set by one of output_size_in_bytes, output_size_in_kilo_bytes, or output_size_in_mega_bytes. Always stored in bytes.
Definition at line 149 of file ossimTiling.h.
Referenced by loadState(), print(), and saveState().
|
protected |
Definition at line 172 of file ossimTiling.h.
Referenced by ossimTilingRect::getPaddingSize(), ossimTilingRect::initializeBase(), ossimTilingPoly::loadState(), ossimTilingRect::loadState(), loadState(), ossimTilingRect::next(), next(), ossimTilingPoly::parseShpFile(), print(), ossimTilingRect::saveState(), saveState(), and ossimTilingPoly::setRect().
|
mutableprotected |
Definition at line 176 of file ossimTiling.h.
Referenced by ossimTilingPoly::next(), ossimTilingRect::next(), next(), ossimTilingPoly::nextFeature(), print(), and reset().
|
protected |
Definition at line 180 of file ossimTiling.h.
Referenced by getTileName(), getTileNameMask(), ossimTilingPoly::loadState(), ossimTilingRect::loadState(), loadState(), ossimTilingPoly::next(), print(), ossimTilingRect::saveState(), saveState(), and setTileNameMask().
|
protected |
The size of a tile in theTilingDistanceUnitType.
Definition at line 122 of file ossimTiling.h.
Referenced by getConvertedTilingDistance(), getDeltaPerPixel(), getTileName(), ossimTilingRect::initializeBase(), ossimTilingRect::loadState(), loadState(), next(), print(), ossimTilingRect::saveState(), saveState(), setTilingDistance(), and validate().
|
protected |
The unit type for "theDelta", and "theTilingDistance".
Definition at line 125 of file ossimTiling.h.
Referenced by ossimTilingRect::getConvertedDistance(), getConvertedTilingDistance(), getDeltaPerPixel(), ossimTilingRect::getPaddingSize(), getTileName(), ossimTilingRect::initializeBase(), ossimTilingRect::loadState(), loadState(), next(), print(), ossimTilingRect::saveState(), saveState(), setTilingDistance(), and validate().
|
protected |
Definition at line 175 of file ossimTiling.h.
Referenced by getOrigin(), and print().
|
protected |
Definition at line 177 of file ossimTiling.h.
Referenced by getOrigin(), getRowCol(), ossimTilingRect::next(), and print().
|
protected |
Definition at line 179 of file ossimTiling.h.
Referenced by getRowCol(), ossimTilingPoly::next(), ossimTilingRect::next(), next(), ossimTilingPoly::parseShpFile(), and print().
|
protected |
Definition at line 178 of file ossimTiling.h.
Referenced by getOrigin(), getRowCol(), ossimTilingRect::next(), and print().