78 static const char M[] =
"ossimTiledElevationDatabase::open";
82 << M <<
" entered...\n" 83 <<
"\nConnection string: " << connectionString <<
"\n";
90 if ( connectionString.
size() )
125 static const char M[] =
"ossimTiledElevationDatabase::mapRegion";
129 << M <<
" entered...\n" <<
"region: " << region <<
"\n";
164 << M <<
" ERROR: Connection string does not exists: " 171 <<
"Caught exception: " << e.
what() << endl;
191 static const char M[] =
"ossimTiledElevationDatabase::processFile";
195 << M <<
" entered...\n" <<
"file: " << file <<
"\n";
199 if ( sic->
open(file,
false) )
211 if ( geom.
valid() == false )
213 std::string errMsg = M;
214 errMsg +=
" ERROR:\nNo image geometry for image: ";
220 if ( proj.
valid() == false )
222 std::string errMsg = M;
223 errMsg +=
" ERROR:\nNo image projection for image: ";
234 std::string errMsg = M;
235 errMsg +=
" ERROR:\nBounding rect has nans for image: ";
242 bool addEntryToList =
false;
246 addEntryToList =
true;
254 if ( addEntryToList )
261 if ( addEntryToList )
283 std::string errMsg = M;
284 errMsg +=
" ERROR:\nNo image geometry for image: ";
300 std::vector<ossimTiledElevationEntry>::const_iterator i =
m_entries.begin();
363 static const char M[] =
"ossimTiledElevationDatabase::loadState";
367 << M <<
" entered..." <<
"\nkwl:\n" << kwl <<
"\n";
370 const char* lookup = kwl.
find(prefix,
"type");
373 std::string type = lookup;
374 if ( ( type ==
"image_directory" ) || ( type ==
"ossimTiledElevationDatabase" ) )
401 if ( (imageHandlerName ==
"ossimAdrgTileSource") ||
402 (imageHandlerName ==
"ossimCibCadrgTileSource") )
423 if (
m_entries.size() && ih && geom && proj )
434 if ( mapProj.
valid() )
471 std::vector<ossimGpt> corner(4);
472 if ( geom->
getCornerGpts(corner[0], corner[1], corner[2], corner[3]) )
478 if ( corner[i].lon < ulGpt.
lon ) ulGpt.
lon = corner[i].lon;
479 if ( corner[i].lat > ulGpt.
lat ) ulGpt.
lat = corner[i].lat;
480 if ( corner[i].lon > lrGpt.
lon ) lrGpt.
lon = corner[i].lon;
481 if ( corner[i].lat < lrGpt.
lat ) lrGpt.
lat = corner[i].lat;
493 static const char M[] =
"ossimTiledElevationDatabase::mapRegion";
498 std::vector<ossimTiledElevationEntry>::iterator i =
m_entries.begin();
515 ulDpt.
x = std::floor(ulDpt.
x);
516 ulDpt.
y = std::floor(ulDpt.
y);
517 lrDpt.
x = std::ceil(lrDpt.
x);
518 lrDpt.
y = std::floor(lrDpt.
y);
540 (ulGpt.
lat-lrGpt.
lat)/(SIZE.y-1) );
548 <<
"\nrequested view rect: " << VIEW_RECT
550 <<
"\norigin: " << ORIGIN
551 <<
"\nsize: " << SIZE
552 <<
"\nspacing: " << SPACING << std::endl;
592 std::string errMsg = M;
593 errMsg +=
" ERROR:\nUnhandled scalar type: ";
613 const T* buf =
static_cast<T*
>(data->
getBuf(0));
655 out <<
"\nossimTiledElevationDatabase @ "<< (
ossim_uint64)
this <<
"\n" 16 bit unsigned integer (15 bits used)
void clear()
Erases the entire container.
virtual ossim_uint32 getWidth() const
virtual const ossimDpt & getDecimalDegreesPerPixel() const
Returns decimal degrees per pixel as an ossimDpt with "x" representing longitude and "y" representing...
ossimTiledElevationDatabase()
default constructor
ossimGrect m_requestedRect
ossimString m_connectionString
void setFileProcessor(ossimFileProcessorInterface *fpi)
Sets ossimFileProcessorInterfacecallback method to process files.
void setRecurseFlag(bool flag)
Sets recurse flag.
Represents serializable keyword/value map.
virtual ~ossimTiledElevationDatabase()
Protected destructor as this is derived from ossimRefenced.
ossimRefPtr< const ossimImageHandler > getImageHandler() const
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
ossimRefPtr< ossimProjection > m_referenceProj
Projection of the first entry.
const char * find(const char *key) const
double nan()
Method to return ieee floating point double precision NAN.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
ossimFilename getFilename() const
void addEntry(const ossimTiledElevationEntry &entry)
adds entry to the list checking for duplicates.
virtual bool isGeographic() const
void initialize(const ossimIpt &size, const ossimDpt &origin, const ossimDpt &spacing, double null_value=OSSIM_DEFAULT_NULL_PIX_DOUBLE)
virtual ossim_uint32 getHeight() const
16 bit unsigned integer (14 bits used)
virtual ossimString getClassName() const
16 bit unsigned integer (13 bits used)
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...
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &origin, ossim_uint32 resLevel=0)
Elevation source used for working with generic images opened by an ossimImageHandler.
Utility class to walk through directories and get a list of files to process.
virtual void processFile(const ossimFilename &file)
ProcessFile method.
bool completely_within(const ossimGrect &rect) const
void fillGrid(T dummyTemplate, ossimRefPtr< ossimImageData > data)
Templated fill grid method.
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the geometry associated with the full mosaic.
Single image chain class.
OSSIM_DLL ossim_uint32 getNumberOfThreads()
Get the number threads to use from ossimPreferences or ossim::Thread.
virtual double getHeightAboveEllipsoid(const ossimGpt &)
Get height above ellipsoid for point.
bool isCompatible(ossimImageHandler *ih, ossimImageGeometry *geom, ossimProjection *proj) const
Check for match of the following against the first entry of: bands, projection, scalar type and scale...
bool pointWithin(const ossimGpt &gpt, bool considerHgt=false) const
METHOD: pointWithin(ossimGpt)
virtual std::ostream & print(std::ostream &out) const
Outputs theErrorStatus as an ossimErrorCode and an ossimString.
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if non defined...
virtual const ossimFilename & getFilename() const
Returns the filename.
bool localToWorld(const ossimDpt &local_pt, ossimGpt &world_pt) const
Exposes the 3D projection from image to world coordinates.
signed short ossim_sint16
virtual const char * what() const
Returns the error message.
ossimDblGrid * m_grid
Hold region of elevation.
virtual bool pointHasCoverage(const ossimGpt &gpt) const
Satisfies pure virtual ossimElevSource::pointHasCoverage.
ossimRefPtr< ossimGeoid > m_geoid
std::string::size_type size() const
virtual ossimDpt getMetersPerPixel() const =0
unsigned long long ossim_uint64
unsigned int ossim_uint32
virtual const ossim_float64 * getNullPix() const
32 bit normalized floating point
ossimDpt getMetersPerPixel() const
Returns the GSD associated with this image in the active projection.
void setNumberOfThreads(ossim_uint32 nThreads)
Sets the max number of threads(jobs) to run at one time.
ossimTiledElevationEntry()
default constructor
void mapRegion()
Loads m_requestedRect into m_grid from m_entries.
void getBoundingRect(ossimRefPtr< ossimImageGeometry > geom, ossimGrect &boundingRect) const
Initialize bounding rectangle from image handler.
virtual void close()
close method.
virtual ossimString getScalarTypeAsString() const
const ossimGpt & ul() const
bool isDirectoryBasedImage(ossimRefPtr< ossimImageHandler > ih)
RTTI_DEF1(ossimTiledElevationDatabase, "ossimTiledElevationDatabase", ossimElevationDatabase)
virtual ossim_int32 connectMyInputTo(ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
Will try to connect this objects input to the passed in object.
ossim_float64 m_meanSpacing
ossimRefPtr< ossimCacheTileSource > addCache()
Adds a new cache to the current end of the chain.
void initializeDefaultFilterList()
Initializes the filter list with a default set of filtered out file names.
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
void initializeReferenceProjection()
Initializes m_referenceProj from the first entry.
virtual ossimScalarType getScalarType() const
64 bit normalized floating point
const ossimProjection * getProjection() const
Access methods for projection (may be NULL pointer).
16 bit unsigned integer (11 bits used)
ossimGrect combine(const ossimGrect &rect) const
virtual ossimScalarType getOutputScalarType() const
This will be used to query the output pixel type of the tile source.
This class defines an abstract Handler which all image handlers(loaders) should derive from...
virtual double getOffsetFromEllipsoid(const ossimGpt &gpt)
virtual double getHeightAboveMSL(const ossimGpt &gpt)
Get height above MSL for point.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
virtual const void * getBuf() const
ossimGrect m_entryListRect
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Initialize from keyword list.
bool open(const ossimFilename &file, bool openOverview=true)
open method that takes an image file.
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
bool worldToLocal(const ossimGpt &world_pt, ossimDpt &local_pt) const
Exposes the 3D world-to-local image coordinate reverse projection.
virtual bool open(const ossimString &connectionString)
Open a connection to a database.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Save the state to a keyword list.
ossimRefPtr< ossimSingleImageChain > m_sic
Hold pointer to single image chain.
void setWaitOnDirFlag(bool flag)
Sets waitOnDir flag.
virtual ossimDpt getMetersPerPixel() const
bool intersects(const ossimGrect &rect) const
const ossimGpt & lr() const
ossimFileWalker * m_fileWalker
std::vector< ossimTiledElevationEntry > m_entries
void walk(const std::vector< ossimFilename > &files)
Takes an array of files.
void setNode(const ossimIpt &p, const double &value)
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
std::basic_ostream< char > ostream
Base class for char output streams.
const std::string & string() const
void setAbortFlag(bool flag)
If set to true this stops files walking (aborts).
16 bit unsigned integer (12 bits used)