37 static ossimTrace traceDebug(
"ossimDtedTileSource:debug");
50 theOffsetToFirstDataRecord(0),
54 thePostSpacing(0.0, 0.0),
55 theSwapBytesFlag(false)
201 (samp - tile_rect.
ul().
x);
203 m_fileStr->seekg(seek_position, ios::beg);
213 d_offset -= TILE_WIDTH;
249 static const char MODULE[] =
"ossimDtedTileSource::open";
269 <<
"\nReturning..." << endl;
270 CLOG <<
"returning with error..." << endl;
287 m_dtedInfo = std::make_shared<ossimDtedInfo>();
315 <<
"\nPossibly not a dted file.\n";
373 <<
"\ntheTile:\n" << *
theTile <<
"\n";
378 const char* prefix)
const 412 ossimGpt tie(ul_lat, ul_lon, 0.0, datum);
427 ossimGpt origin (0.0, 0.0, 0.0, datum);
471 if (reduced_res_level == 0)
485 if (reduced_res_level == 0)
500 const char* min_str = 0;
501 const char* max_str = 0;
510 min_str = kwl.
find(
"band1.min_value");
511 max_str = kwl.
find(
"band1.max_value");
514 if ( !min_str || !max_str )
525 if ( min_str || max_str )
542 <<
"ossimDtedTileSource::gatherStatistics() scanning for min/max" 543 <<
"\nThis may take a while...\n";
576 if ( writeStatsFile )
592 <<
"ossimDtedTileSource::gatherStatistics DEBUG:" 652 if (result.
valid() ==
false)
666 std::vector<ossimString>& propertyNames)
const
virtual bool open()=0
Pure virtual open.
ossim_int32 stopOffset() const
virtual ossim_uint32 getWidth() const
virtual bool isSourceEnabled() const
static const char * MIN_VALUE_KW
ossimRefPtr< ossimImageGeometry > theGeometry
virtual ossim_uint32 getTileWidth() const
Returns the width of the output tile.
double latInterval() const
void setProjection(ossimProjection *projection)
Sets the projection to be used for local-to-world coordinate transformation.
virtual ossim_uint32 getNumberOfBands() const
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 reduced_res_level=0) const
Returns the number of samples in the image.
ossimFilename theImageFile
virtual void setImageRectangle(const ossimIrect &rect)
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
Represents serializable keyword/value map.
bool addFile(const char *file)
const char * find(const char *key) const
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
virtual ossim_uint32 getNumberOfLines(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
virtual ossimString getShortName() const
static const char * MAX_VALUE_KW
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
Gets a property for name.
virtual ossimScalarType getOutputScalarType() const
Returns the output pixel type of the tile source.
bool theSwapBytesFlag
DTED data is always stored as BIG_ENDIAN.
OSSIM_DLL void defaultTileSize(ossimIpt &tileSize)
const ossimIpt & ul() const
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
Adds this class's properties to list.
virtual ossimDataObjectStatus getDataObjectStatus() const
OSSIM_DLL ossimByteOrder byteOrder()
static const ossimErrorCode OSSIM_ERROR
virtual void setDecimalDegreesPerPixel(const ossimDpt &gsd)
static StreamFactoryRegistry * instance()
void parse(std::istream &in)
bool intersects(const ossimIrect &rect) const
ossim_uint32 theTileWidth
unsigned short ossim_uint16
virtual ~ossimDtedTileSource()
ossim_uint32 theDataRecordSize
virtual double getMaxPixelValue(ossim_uint32 band=0) const
Returns the max pixel of the band.
virtual bool write(const char *file, const char *comment=0) const
Methods to dump the ossimKeywordlist to a file on disk.
virtual void initialize()
Initialize the data buffer.
void ref() const
increment the reference count by one, indicating that this object has another pointer which is refere...
ossim_int32 numLatPoints() const
virtual bool isValidRLevel(ossim_uint32 resLevel) const
Determines if the passed in reslution level is valid.
bool completely_within(const ossimIrect &rect) const
virtual ossim_uint32 getNumberOfLines(ossim_uint32 reduced_res_level=0) const
Returns the number of lines in the image.
virtual void getPropertyNames(std::vector< ossimString > &propertyNames) const
void add(const char *prefix, const ossimKeywordlist &kwl, bool overwrite=true)
bool fillBuffer(const ossimIrect &tile_rect, const ossimIrect &clip_rect, ossimImageData *tile)
Returns true on success, false on error.
virtual ossim_uint32 getImageTileWidth() const
Returns the tile width of the image or 0 if the image is not tiled.
void getPostSpacing(ossimDpt &postSpacing) const
Initializes spacing to the post spacing of the cell.
virtual bool getOverviewTile(ossim_uint32 resLevel, ossimImageData *result)
Method to get an overview tile.
static ossimImageDataFactory * instance()
void gatherStatistics(bool writeStatsFile)
Scans for min and max.
virtual ossimRefPtr< ossimImageData > getTile(const ossimIrect &tile_rect, ossim_uint32 resLevel=0)
virtual ossimString getLongName() const
virtual void loadMetaData()
Sets the min/max.
virtual ossimDataObjectStatus validate() const
signed short ossim_sint16
unsigned int ossim_uint32
ossim_sint16 theMaxHeight
virtual const ossimEllipsoid * ellipsoid() const
void parse(std::istream &in)
static ossimDatumFactory * instance()
virtual double getNullPixelValue(ossim_uint32 band=0) const
Each band has a null pixel associated with it.
virtual ossimIrect getImageRectangle() const
virtual void close()
Deletes the overview and clears the valid image vertices.
const ossimIpt & lr() const
virtual void setOrigin(const ossimGpt &origin)
virtual ossimRefPtr< ossimImageData > create(ossimSource *owner, ossimScalarType scalar, ossim_uint32 bands=1) const
virtual double getMinPixelValue(ossim_uint32 band=0) const
Retuns the min pixel value.
ossimErrorCode theErrorStatus
void initImageParameters(ossimImageGeometry *geom) const
Convenience method to set things needed in the image geometry from the image handler.
ossimIrect clipToRect(const ossimIrect &rect) const
virtual bool open()
Returns true if "theImageFile" can be opened and is a valid adrg file.
void parse(std::istream &in)
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
void unref() const
decrement the reference count by one, indicating that a pointer to this object is referencing it...
ossimRefPtr< ossimImageData > theTile
ossim_uint32 theNumberOfSamps
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
virtual ossimRefPtr< ossimProperty > getProperty(const ossimString &name) const
virtual void makeBlank()
Initializes data to null pixel values.
virtual void completeOpen()
Will complete the opening process.
ossimImageMetaData theMetaData
void parse(std::istream &in)
ossimRefPtr< ossimImageHandler > theOverview
This class defines an abstract Handler which all image handlers(loaders) should derive from...
virtual ossimErrorCode getErrorStatus() const
virtual bool isOpen() const
Derived classes must implement this method to be concrete.
void allocate()
Allocated the tiles.
virtual const void * getBuf() const
virtual ossimRefPtr< ossimImageGeometry > getImageGeometry()
Returns the image geometry object associated with this tile source or NULL if not defined...
ossimFilename fileNoExtension() const
virtual ossimIrect getImageRectangle(ossim_uint32 reduced_res_level=0) const
Returns the zero based image rectangle for the reduced resolution data set (rrds) passed in...
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string's contents...
ossim_uint32 theOffsetToFirstDataRecord
virtual ossim_uint32 getNumberOfOutputBands() const
Returns the number of bands in a tile returned from this TileSource.
void parse(std::istream &in)
std::shared_ptr< ossimDtedInfo > m_dtedInfo
virtual void setUlTiePoints(const ossimGpt &gpt)
virtual ossim_uint32 getNumberOfSamples(ossim_uint32 resLevel=0) const =0
Pure virtual, derived classes must implement.
ossim_sint16 theMinHeight
ossim_int32 numLonLines() const
const ossimDatum * wgs84() const
#define RTTI_DEF1(cls, name, b1)
const ossimDtedTileSource & operator=(const ossimDtedTileSource &rhs)
ossimFilename & setExtension(const ossimString &e)
Sets the extension of a file name.
virtual ossim_uint32 getNumberOfInputBands() const
Returns the number of bands in the image.
virtual ossim_uint32 getImageTileHeight() const
Returns the tile width of the image or 0 if the image is not tiled.
ossim_uint32 theTileHeight
std::shared_ptr< ossim::istream > m_fileStr
ossim_sint16 convertSignedMagnitude(ossim_uint16 &s) const
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)
virtual ossim_uint32 getTileHeight() const
Returns the height of the output tile.
double lonInterval() const
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.
ossim_uint32 theNumberOfLines