OSSIM - Open Source Software Image Map  Version 1.9.0 (20180803)
Public Member Functions | Private Attributes | List of all members
ossimOgrVectorTileSource Class Reference

#include <ossimOgrVectorTileSource.h>

Inheritance diagram for ossimOgrVectorTileSource:
ossimImageHandler ossimImageSource ossimSource ossimConnectableObject ossimErrorStatusInterface ossimObject ossimListenerManager ossimPropertyInterface ossimReferenced

Public Member Functions

 ossimOgrVectorTileSource ()
 
virtual ~ossimOgrVectorTileSource ()
 
virtual void close ()
 Deletes the overview and clears the valid image vertices. More...
 
virtual bool open ()
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIrect &tileRect, ossim_uint32 resLevel=0)
 
virtual ossim_uint32 getNumberOfInputBands () const
 
virtual ossim_uint32 getNumberOfOutputBands () const
 
virtual ossim_uint32 getNumberOfLines (ossim_uint32 reduced_res_level=0) const
 
virtual ossim_uint32 getNumberOfSamples (ossim_uint32 reduced_res_level=0) const
 
virtual ossim_uint32 getNumberOfDecimationLevels () const
 
virtual ossimIrect getImageRectangle (ossim_uint32 reduced_res_level=0) const
 
virtual bool saveState (ossimKeywordlist &kwl, const char *prefix=0) const
 
virtual bool loadState (const ossimKeywordlist &kwl, const char *prefix=0)
 
virtual ossimRefPtr< ossimImageGeometrygetInternalImageGeometry () const
 Returns the image geometry object associated with this tile source or NULL if non defined. More...
 
virtual ossimRefPtr< ossimImageGeometrygetImageGeometry ()
 Returns the image geometry object associated with this tile source or NULL if non defined. More...
 
virtual ossimScalarType getOutputScalarType () const
 
virtual ossim_uint32 getTileWidth () const
 
virtual ossim_uint32 getTileHeight () const
 
virtual ossim_uint32 getImageTileWidth () const
 
virtual ossim_uint32 getImageTileHeight () const
 
virtual bool isOpen () const
 Derived classes must implement this method to be concrete. More...
 
virtual double getNullPixelValue (ossim_uint32 band=0) const
 Each band has a null pixel associated with it. More...
 
virtual double getMinPixelValue (ossim_uint32 band=0) const
 Retuns the min pixel value. More...
 
virtual double getMaxPixelValue (ossim_uint32 band=0) const
 Returns the max pixel of the band. More...
 
virtual bool setCurrentEntry (ossim_uint32 entryIdx)
 
virtual ossim_uint32 getNumberOfEntries () const
 
virtual void getEntryList (std::vector< ossim_uint32 > &entryList) const
 
ossimProjectioncreateProjFromReference (OGRSpatialReference *reference) const
 
ossimMapProjectioncreateDefaultProj ()
 
bool isOgrVectorDataSource () const
 
- Public Member Functions inherited from ossimImageHandler
 ossimImageHandler ()
 Constructor (default): More...
 
virtual ~ossimImageHandler ()
 Destructor: Derived classes should implement. More...
 
virtual void initialize ()
 initialize Does nothing in this class. More...
 
virtual bool openOverview ()
 Searches for an overview. More...
 
virtual bool openOverview (const ossimFilename &overview_file)
 Calls closeOverview(), then attempts to open the overview_file. More...
 
virtual void closeOverview ()
 If theOverview is initialized it will be deleted and set to NULL. More...
 
virtual const ossimImageHandlergetOverview () const
 
virtual bool hasOverviews () const
 
virtual ossimFilename createDefaultOverviewFilename () const
 
virtual ossimFilename createDefaultGeometryFilename () const
 
virtual ossimFilename createDefaultMetadataFilename () const
 
virtual ossimFilename createDefaultHistogramFilename () const
 
virtual ossimFilename createDefaultValidVerticesFilename () const
 
virtual bool writeValidImageVertices (const std::vector< ossimIpt > &vertices, const ossimFilename &file=ossimFilename(""))
 Outputs vertices to file and updates the internal vertex array variable "theValidImageVertices". More...
 
virtual bool openValidVertices (const ossimFilename &vertices_file)
 Opens the valid image vertices file and sets theValidImageVerticesFile variable. More...
 
virtual bool openValidVertices ()
 Creates vertices file name based on image, then tries to open. More...
 
virtual bool open (const ossimFilename &imageFile, ossim_uint32 entryIndex)
 Opens the image file. More...
 
virtual bool open (const ossimFilename &imageFile)
 
virtual bool open (std::shared_ptr< ossim::ImageHandlerState > state)
 
virtual bool buildHistogram (int numberOfRLevels=0, ossimHistogramMode mode=OSSIM_HISTO_MODE_NORMAL)
 Build a histogram for image file. More...
 
virtual bool buildAllHistograms (int numberOfRLevels=0, ossimHistogramMode mode=OSSIM_HISTO_MODE_NORMAL)
 Build a histograms for all image entries. More...
 
virtual bool buildOverview (ossimImageHandlerOverviewCompressionType compressionType=OSSIM_OVERVIEW_COMPRESSION_NONE, ossim_uint32 quality=75, ossimFilterResampler::ossimFilterResamplerType resampleType=ossimFilterResampler::ossimFilterResampler_BOX, bool includeFullResFlag=false)
 Will build over file for theImageFile. More...
 
virtual bool buildAllOverviews (ossimImageHandlerOverviewCompressionType compressionType=OSSIM_OVERVIEW_COMPRESSION_NONE, ossim_uint32 quality=75, ossimFilterResampler::ossimFilterResamplerType resampleType=ossimFilterResampler::ossimFilterResampler_BOX, bool includeFullResFlag=false)
 Will build over file for all image entries. More...
 
virtual bool buildOverview (const ossimFilename &filename, ossimImageHandlerOverviewCompressionType compressionType=OSSIM_OVERVIEW_COMPRESSION_NONE, ossim_uint32 quality=75, ossimFilterResampler::ossimFilterResamplerType resampleType=ossimFilterResampler::ossimFilterResampler_BOX, bool includeFullResFlag=false)
 Will build an over file for filename. More...
 
ossimRefPtr< ossimMultiResLevelHistogramgetImageHistogram () const
 Fetches the current entry image's histogram. More...
 
virtual void setImageGeometry (ossimImageGeometry *geom)
 Sets the image geometry object. More...
 
virtual void saveImageGeometry () const
 Saves the image geometry to a file that will be made based on the image file name. More...
 
virtual void saveImageGeometry (const ossimFilename &geometry_file) const
 Saves the image geometry to a file that will be made based on the image file name. More...
 
virtual ossimIrect getBoundingRect (ossim_uint32 resLevel=0) const
 Returns zero-based bounding rectangle of the image. More...
 
virtual void getDecimationFactor (ossim_uint32 resLevel, ossimDpt &result) const
 
virtual void getDecimationFactors (vector< ossimDpt > &decimations) const
 This returns all decimation for all levels. More...
 
virtual ossim_uint32 getNumberOfReducedResSets () const
 This method is obsolete. More...
 
virtual void setFilename (const ossimFilename &filename)
 Sets the filename. More...
 
virtual const ossimFilenamegetFilename () const
 Returns the filename. More...
 
virtual bool isValidRLevel (ossim_uint32 resLevel) const
 Determines if the passed in reslution level is valid. More...
 
bool canConnectMyInputTo (ossim_int32 inputIndex, const ossimConnectableObject *object) const
 Connection rule. More...
 
virtual void getValidImageVertices (vector< ossimIpt > &validVertices, ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER, ossim_uint32 resLevel=0) const
 ordering specifies how the vertices should be arranged. More...
 
virtual bool isBandSelector () const
 Indicates whether or not the image handler can control output band selection via the setOutputBandList method. More...
 
virtual bool setOutputBandList (const std::vector< ossim_uint32 > &band_list)
 If the image handler "isBandSeletor()" then the band selection of the output chip can be controlled. More...
 
virtual bool setOutputToInputBandList ()
 If the image handler "isBandSeletor()" then the band selection of the output are set to input or identity. More...
 
virtual bool isIdentityBandList (const std::vector< ossim_uint32 > &bandList) const
 Convenience method to see if band list is identity. More...
 
virtual bool isImageTiled () const
 Indicates whether or not the image is tiled internally. More...
 
virtual bool hasMetaData () const
 
virtual ossimRefPtr< ossimNBandLutDataObjectgetLut () const
 
virtual bool hasLut () const
 
virtual void loadMetaData ()
 There is an external file with an omd extension. More...
 
virtual void setMinPixelValue (ossim_uint32 band, const ossim_float64 &pix)
 convenience method to set min pixel value. More...
 
virtual void setMaxPixelValue (ossim_uint32 band, const ossim_float64 &pix)
 convenience method to set max pixel value. More...
 
virtual void setNullPixelValue (ossim_uint32 band, const ossim_float64 &pix)
 convenience method to set null pixel value. More...
 
virtual ossim_uint32 getCurrentEntry () const
 
virtual void getEntryName (ossim_uint32 entryIdx, std::string &name) const
 Get the name of entry as a string. More...
 
virtual void getEntryNames (std::vector< ossimString > &entryNames) const
 
bool useEntryIndex () const
 Convenience method to determine if entry index should be used for support files, e.g. More...
 
ossimFilename getOverviewFile () const
 
virtual void setProperty (ossimRefPtr< ossimProperty > property)
 
virtual ossimRefPtr< ossimPropertygetProperty (const ossimString &name) const
 
virtual void getPropertyNames (std::vector< ossimString > &propertyNames) const
 
ossimFilename getFilenameWithThisExtension (const ossimString &ext, bool set_e0_prefix=false) const
 Returns the image file with extension set using supplentary directory for dirname if set. More...
 
void getFilenameWithThisExt (const ossimString &ext, ossimFilename &f) const
 Returns the image file with extension set using supplentary directory for dirname if set. More...
 
ossim_uint32 getStartingResLevel () const
 
void setStartingResLevel (ossim_uint32 level)
 
bool getOpenOverviewFlag () const
 
void setOpenOverviewFlag (bool flag)
 Sets theOpenOverviewFlag. More...
 
virtual void setSupplementaryDirectory (const ossimFilename &dir)
 Sets the supplementary directory. More...
 
virtual const ossimFilenamegetSupplementaryDirectory () const
 Returns the supplementary directory. More...
 
const ossimStringgetImageID () const
 Fetches the image ID. More...
 
void setImageID (const ossimString &id)
 Sets the image ID in case it is externally generated. More...
 
ossimPixelType getPixelType () const
 Returns the raster pixel alignment type. More...
 
virtual bool getRgbBandList (std::vector< ossim_uint32 > &bandList) const
 Convenience method to get the zero based rgb output band list. More...
 
template<class T >
std::shared_ptr< T > getStateAs ()
 
template<class T >
std::shared_ptr< const T > getStateAs () const
 
std::shared_ptr< ossim::ImageHandlerState > getState ()
 
std::shared_ptr< const ossim::ImageHandlerState > getState () const
 
void setState (std::shared_ptr< ossim::ImageHandlerState > state)
 
- Public Member Functions inherited from ossimImageSource
 ossimImageSource (ossimObject *owner=0)
 
 ossimImageSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimImageSource ()
 
virtual ossimRefPtr< ossimImageDatagetTile (const ossimIpt &origin, ossim_uint32 resLevel=0)
 
virtual bool getTile (ossimImageData *result, ossim_uint32 resLevel=0)
 Method to get a tile. More...
 
virtual ossimObjectgetObject ()
 For RTTI support. More...
 
virtual const ossimObjectgetObject () const
 For RTTI support. More...
 
virtual void getDecimationFactors (std::vector< ossimDpt > &decimations) const
 Will return an array of all decimations for each resolution level. More...
 
virtual void getOutputBandList (std::vector< ossim_uint32 > &bandList) const
 Initializes bandList. More...
 
virtual void getBoundingRect (ossimIrect &rect, ossim_uint32 resLevel=0) const
 Gets the bounding rectangle of the source. More...
 
virtual void getValidImageVertices (std::vector< ossimIpt > &validVertices, ossimVertexOrdering ordering=OSSIM_CLOCKWISE_ORDER, ossim_uint32 resLevel=0) const
 ordering specifies how the vertices should be arranged. More...
 
virtual void setImageGeometry (const ossimImageGeometry *geom)
 Default implementation sets geometry of the first input to the geometry specified. More...
 
virtual bool isIndexedData () const
 
- Public Member Functions inherited from ossimSource
 ossimSource (ossimObject *owner=0)
 
 ossimSource (ossimObject *owner, ossim_uint32 inputListSize, ossim_uint32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimSource ()
 
virtual bool isSourceEnabled () const
 
virtual void enableSource ()
 
virtual void disableSource ()
 
virtual bool getEnableFlag () const
 
virtual void setEnableFlag (bool flag)
 
virtual bool isInitialized () const
 
virtual void setInitializedFlag (bool flag)
 
virtual std::ostream & print (std::ostream &out) const
 Outputs theErrorStatus as an ossimErrorCode and an ossimString. More...
 
- Public Member Functions inherited from ossimConnectableObject
 ossimConnectableObject (ossimObject *owner=0)
 Base constructor of this object. More...
 
 ossimConnectableObject (ossimObject *owner, ossim_int32 inputListSize, ossim_int32 outputListSize, bool inputListIsFixedFlag=true, bool outputListIsFixedFlag=true)
 
virtual ~ossimConnectableObject ()
 
void setId (const ossimId &id)
 All connectable objects will have id's. More...
 
const ossimIdgetId () const
 Will allow us to get this object's id. More...
 
const ossimObjectgetOwner () const
 Fetches the current owner, most likely a container but not limited to one. More...
 
virtual void changeOwner (ossimObject *owner)
 Permits changing the object's owner. More...
 
virtual void setDescription (const ossimString &description)
 
virtual ossimString getDescription () const
 
virtual bool isConnected (ossimConnectableObjectDirectionType direction=CONNECTABLE_DIRECTION_INPUT) const
 will check the direction specified to see if all slots are full. More...
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findConnectableObject(const ossimId &id))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(RTTItypeid typeId, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findObjectOfType(const ossimString &obj, ossimConnectableObjectDirectionType directionType, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual ossimConnectableObject *findInputObjectOfType(const ossimString &className))
 
virtual ossim_int32 findInputIndex (const ossimConnectableObject *object)
 Return a valid index of the input list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findInputIndex (const ossimId &id)
 Return a valid index of the input list if the passed id is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimConnectableObject *object)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 findOutputIndex (const ossimId &id)
 Return a valid index of the output list if the passed in object is found else return -1. More...
 
virtual ossim_int32 getMyInputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual ossim_int32 getMyOutputIndexToConnectTo (ossimConnectableObject *object) const
 Should return the first available index to connect to. More...
 
virtual bool canConnectMyOutputTo (ossim_int32 myOutputIndex, const ossimConnectableObject *object) const
 default implementation is to allow anyone to connect to us. More...
 
virtual void disconnect (ossimConnectableObject *object=0)
 Will disconnect the object passed in. More...
 
virtual void disconnect (const ossimId &id)
 Will disconnect the object passed in. More...
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyInput (ossim_int32 inputIndex, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given input index and generate a connection event. More...
 
virtual void disconnectMyInput (ossimConnectableObject *input, bool disconnectOutputFlag=true, bool createEventFlag=true)
 Finds the index of the passed in input and calls disconnectMyInput(inputIndex, disconnectOutputFlag, createEventFlag);. More...
 
virtual void disconnectMyInputs (ConnectableObjectList &inputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual ossimRefPtr< ossimConnectableObjectdisconnectMyOutput (ossim_int32 outputIndex, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the object at the given output index and generate a connection event. More...
 
virtual void disconnectMyOutput (ossimConnectableObject *output, bool disconnectInputFlag=true, bool createEventFlag=true)
 Will disconnect the output object. More...
 
virtual void disconnectMyOutputs (ConnectableObjectList &outputList, bool disconnectOutputFlag=true, bool createEventFlag=true)
 
virtual void disconnectAllInputs ()
 Will disconnect all of the input objects. More...
 
virtual void disconnectAllOutputs ()
 Will disconnect all of the output objects. More...
 
virtual ossim_int32 connectMyInputTo (ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will try to connect this objects input to the passed in object. More...
 
virtual ossim_int32 connectMyInputTo (ossim_int32 inputIndex, ossimConnectableObject *inputObject, bool makeOutputConnection=true, bool createEventFlag=true)
 Will connect the specified input to the passed in object. More...
 
virtual bool connectMyInputTo (ConnectableObjectList &inputList, bool makeOutputConnection=true, bool createEventFlag=true)
 
virtual ossim_int32 connectMyOutputTo (ossimConnectableObject *outputObject, bool makeInputConnection=true, bool createEventFlag=true)
 Will try to connect this objects output to the passed in object. More...
 
virtual bool connectMyOutputTo (ConnectableObjectList &outputList, bool makeInputConnection=true, bool createEventFlag=true)
 
virtual bool connectInputList (ConnectableObjectList &inputList)
 Will disconnect itself from all inputs and reset to the passed in input list. More...
 
virtual bool connectOutputList (ConnectableObjectList &outputList)
 Will disconnect itself from all outputs and reset to the passed in output list. More...
 
virtual ossim_uint32 getNumberOfInputs () const
 Returns the number of input objects. More...
 
virtual ossim_uint32 getNumberOfOutputs () const
 Return the number of output objects. More...
 
ossimConnectableObjectgetInput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetInput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
ossimConnectableObjectgetOutput (ossim_uint32 index=0)
 returns the object at the specified index. More...
 
const ossimConnectableObjectgetOutput (ossim_uint32 index=0) const
 returns the object at the specified index. More...
 
virtual void setNumberOfInputs (ossim_int32 numberOfInputs)
 Will set the number of inputs. More...
 
virtual bool getInputListIsFixedFlag () const
 
virtual bool getOutputListIsFixedFlag () const
 
virtual void setNumberOfOutputs (ossim_int32 numberOfInputs)
 Will set the number of outputs. More...
 
const ConnectableObjectListgetInputList () const
 
const ConnectableObjectListgetOutputList () const
 
ConnectableObjectListgetInputList ()
 
ConnectableObjectListgetOutputList ()
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const RTTItypeid &typeInfo, bool recurse=true))
 
 OSSIM_DEPRECATE_METHOD (virtual void findAllObjectsOfType(ConnectableObjectList &result, const ossimString &className, bool recurse=true))
 
virtual void propagateEventToOutputs (ossimEvent &event)
 
virtual void propagateEventToInputs (ossimEvent &event)
 
virtual void setProperty (const ossimString &name, const ossimString &value)
 
virtual ossim_uint32 saveStateOfAllInputs (ossimKeywordlist &kwl, bool saveThisStateFlag=true, ossim_uint32 objectIndex=1, const char *prefix=0) const
 Save the state of all inputs to a keyword list. More...
 
virtual bool fillContainer (ossimConnectableContainer &container)
 Inserts this object and all of its children and inputs into the container provided. More...
 
bool moveInputUp (const ossimId &id)
 Moves the input connection matching id up one in the connection list. More...
 
bool moveInputDown (const ossimId &id)
 Moves the input connection matching id down one in the connection list. More...
 
bool moveInputToTop (const ossimId &id)
 Moves the input connection matching id to the top of the connection list. More...
 
bool moveInputToBottom (const ossimId &id)
 Moves the input connection matching id to the bottom of the connection list. More...
 
virtual void accept (ossimVisitor &visitor)
 We will add a visitor interface for all connectable objects. More...
 
- Public Member Functions inherited from ossimObject
 ossimObject ()
 
virtual ~ossimObject ()
 
virtual ossimObjectdup () const
 
virtual ossimString getShortName () const
 
virtual ossimString getLongName () 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
 
- Public Member Functions inherited from ossimReferenced
 ossimReferenced ()
 
 ossimReferenced (const ossimReferenced &)
 
ossimReferencedoperator= (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
 
- Public Member Functions inherited from ossimListenerManager
 ossimListenerManager ()
 
virtual ~ossimListenerManager ()
 
virtual void fireEvent (ossimEvent &event)
 
virtual bool addListener (ossimListener *listener)
 
virtual bool removeListener (ossimListener *listener)
 
virtual bool findListener (ossimListener *listener)
 
- Public Member Functions inherited from ossimPropertyInterface
 ossimPropertyInterface ()
 
virtual ~ossimPropertyInterface ()
 
virtual ossimString getPropertyValueAsString (const ossimString &name) const
 
void getPropertyList (std::vector< ossimRefPtr< ossimProperty > > &propertyList) const
 
void setProperties (std::vector< ossimRefPtr< ossimProperty > > &propertyList)
 
- Public Member Functions inherited from ossimErrorStatusInterface
 ossimErrorStatusInterface ()
 
virtual ~ossimErrorStatusInterface ()
 
virtual ossimErrorCode getErrorStatus () const
 
virtual ossimString getErrorStatusString () const
 
virtual void setErrorStatus (ossimErrorCode error_status) const
 
virtual void setErrorStatus () const
 
virtual void clearErrorStatus () const
 
bool hasError () const
 

Private Attributes

std::vector< ossimOgrVectorLayerNode * > theLayerVector
 
OGRDataSource * theDataSource
 
ossimRefPtr< ossimImageGeometrytheImageGeometry
 
ossimDrect theImageBound
 
OGREnvelope theBoundingExtent
 

Additional Inherited Members

- Public Types inherited from ossimImageHandler
enum  ossimImageHandlerOverviewCompressionType {
  OSSIM_OVERVIEW_COMPRESSION_NONE = 0, OSSIM_OVERVIEW_COMPRESSION_JPEG, OSSIM_OVERVIEW_COMPRESSION_LZW, OSSIM_OVERVIEW_COMPRESSION_DEFLATE,
  OSSIM_OVERVIEW_COMPRESSION_PACKBITS
}
 
- Public Types inherited from ossimConnectableObject
enum  ossimConnectableObjectDirectionType { CONNECTABLE_DIRECTION_NONE = 0, CONNECTABLE_DIRECTION_INPUT = 1, CONNECTABLE_DIRECTION_OUTPUT = 2 }
 
typedef std::vector< ossimRefPtr< ossimConnectableObject > > ConnectableObjectList
 
- Protected Member Functions inherited from ossimImageHandler
virtual ossimRefPtr< ossimImageGeometrygetExternalImageGeometry () const
 Returns the image geometry object associated with this tile source or NULL if non defined. More...
 
virtual bool getOverviewTile (ossim_uint32 resLevel, ossimImageData *result)
 Method to get an overview tile. More...
 
bool initVertices (const char *file)
 Opens file and attempts to initialize the valid image vertices. More...
 
virtual void completeOpen ()
 Will complete the opening process. More...
 
void initImageParameters (ossimImageGeometry *geom) const
 Convenience method to set things needed in the image geometry from the image handler. More...
 
virtual void establishDecimationFactors ()
 Virtual method determines the decimation factors at each resolution level. More...
 
virtual bool setOutputBandList (const std::vector< ossim_uint32 > &inBandList, std::vector< ossim_uint32 > &outBandList)
 Convenience method to set output band list. More...
 
void getFilenameWithNoExtension (ossimFilename &f) const
 Get filename with no extension, using supplentary directory for dirname if set. More...
 
- Protected Member Functions inherited from ossimImageSource
 ossimImageSource (const ossimImageSource &rhs)
 
const ossimImageSourceoperator= (const ossimImageSource &)
 
- Protected Member Functions inherited from ossimSource
 ossimSource (const ossimSource &rhs)
 
const ossimSourceoperator= (const ossimSource &rhs)
 
- Protected Member Functions inherited from ossimConnectableObject
ossimConnectableObjectfindObjectOfType (ConnectableObjectList *connectableList, ossimVisitor &visitor)
 
- Protected Member Functions inherited from ossimReferenced
virtual ~ossimReferenced ()
 
- Protected Member Functions inherited from ossimListenerManager
 ossimListenerManager (const ossimListenerManager &rhs)
 
- Protected Attributes inherited from ossimImageHandler
ossimFilename theImageFile
 
ossimFilename theOverviewFile
 
ossimFilename theSupplementaryDirectory
 
ossimRefPtr< ossimImageHandlertheOverview
 
vector< ossimIpttheValidImageVertices
 
ossimImageMetaData theMetaData
 
ossimRefPtr< ossimImageGeometrytheGeometry
 
ossimRefPtr< ossimNBandLutDataObjecttheLut
 
std::vector< ossimDpttheDecimationFactors
 
ossimString theImageID
 
ossim_uint32 theStartingResLevel
 theStartingResLevel If set to something other than zero(default) this is indicative that the reader is an overview. More...
 
bool theOpenOverviewFlag
 If true opening of overviews will be attempted. More...
 
ossimPixelType thePixelType
 
std::shared_ptr< ossim::ImageHandlerState > m_state
 
- Protected Attributes inherited from ossimSource
bool theEnableFlag
 
bool theInitializedFlag
 
- Protected Attributes inherited from ossimConnectableObject
ossimId theId
 
ossimString theDescription
 
ossimObjecttheOwner
 
bool theInputListIsFixedFlag
 Indicates whether the theInputObjectList is fixed. More...
 
bool theOutputListIsFixedFlag
 Indicates whether the theOutputObjectList is fixed. More...
 
ConnectableObjectList theInputObjectList
 Holds a list of input objects. More...
 
ConnectableObjectList theOutputObjectList
 Holds a list of output objects. More...
 
- Protected Attributes inherited from ossimListenerManager
std::list< ossimListener * > theListenerList
 
bool theEnabledFlag
 
std::list< ossimListener * > theDelayedAdd
 
std::list< ossimListener * > theDelayedRemove
 
bool theFireEventFlag
 
- Protected Attributes inherited from ossimErrorStatusInterface
ossimErrorCode theErrorStatus
 

Detailed Description

Definition at line 41 of file ossimOgrVectorTileSource.h.

Constructor & Destructor Documentation

◆ ossimOgrVectorTileSource()

ossimOgrVectorTileSource::ossimOgrVectorTileSource ( )

Definition at line 74 of file ossimOgrVectorTileSource.cpp.

76  theDataSource(0),
77  theImageBound(),
79 {
80 }
ossimImageHandler()
Constructor (default):

◆ ~ossimOgrVectorTileSource()

ossimOgrVectorTileSource::~ossimOgrVectorTileSource ( )
virtual

Definition at line 85 of file ossimOgrVectorTileSource.cpp.

References close().

86 {
87  close();
88 }
virtual void close()
Deletes the overview and clears the valid image vertices.

Member Function Documentation

◆ close()

void ossimOgrVectorTileSource::close ( )
virtual

Deletes the overview and clears the valid image vertices.

Derived classes should implement.

Reimplemented from ossimImageHandler.

Definition at line 293 of file ossimOgrVectorTileSource.cpp.

References theDataSource, and theLayerVector.

Referenced by ~ossimOgrVectorTileSource().

294 {
295  for(ossim_uint32 i = 0; i < theLayerVector.size(); ++i)
296  {
297  if(theLayerVector[i])
298  {
299  delete theLayerVector[i];
300  }
301  }
302 
303  theLayerVector.clear();
304 
305  if(theDataSource)
306  {
307  delete theDataSource;
308  theDataSource = 0;
309  }
310 }
std::vector< ossimOgrVectorLayerNode * > theLayerVector
unsigned int ossim_uint32

◆ createDefaultProj()

ossimMapProjection * ossimOgrVectorTileSource::createDefaultProj ( )

Definition at line 488 of file ossimOgrVectorTileSource.cpp.

References ossim::cosd(), ossimMapProjection::setDecimalDegreesPerPixel(), ossimEquDistCylProjection::setOrigin(), ossimMapProjection::setUlGpt(), and theBoundingExtent.

489 {
491 
492  ossim_float64 centerLat = (theBoundingExtent.MaxY + theBoundingExtent.MinY ) / 2.0;
493  ossim_float64 centerLon = (theBoundingExtent.MaxX + theBoundingExtent.MinX ) / 2.0;
494  ossim_float64 deltaLat = theBoundingExtent.MaxY - theBoundingExtent.MinY;
495 
496  // Scale that gives 1024 pixel in the latitude direction.
497  ossim_float64 scaleLat = deltaLat / 1024.0;
498  ossim_float64 scaleLon = scaleLat*ossim::cosd(std::fabs(centerLat));
499  ossimGpt origin(centerLat, centerLon, 0.0);
500  ossimDpt scale(scaleLon, scaleLat);
501 
502  // Set the origin.
503  proj->setOrigin(origin);
504 
505  // Set the tie point.
506  proj->setUlGpt( ossimGpt(theBoundingExtent.MaxY,
507  theBoundingExtent.MinX) );
508 
509  // Set the scale. Note this will handle computing meters per pixel.
510  proj->setDecimalDegreesPerPixel(scale);
511 
512  return proj;
513 }
virtual void setDecimalDegreesPerPixel(const ossimDpt &gsd)
virtual void setUlGpt(const ossimGpt &ulGpt)
double ossim_float64
virtual void setOrigin(const ossimGpt &origin)
double cosd(double x)
Definition: ossimCommon.h:259

◆ createProjFromReference()

ossimProjection * ossimOgrVectorTileSource::createProjFromReference ( OGRSpatialReference *  reference) const

Definition at line 456 of file ossimOgrVectorTileSource.cpp.

457 {
458  if(traceDebug())
459  {
460  ossimNotify(ossimNotifyLevel_DEBUG) << "ossimOgrVectorTileSource::createProjFromReference: entered........" << std::endl;
461  }
462  if(!reference)
463  {
464  if(traceDebug())
465  {
466  ossimNotify(ossimNotifyLevel_DEBUG) << "ossimOgrVectorTileSource::createProjFromReference: leaving........" << std::endl;
467  }
468  return 0;
469  }
470  char* wktString = 0;
471  ossimKeywordlist kwl;
472  reference->exportToWkt(&wktString);
473  wktTranslator.toOssimKwl(wktString,
474  kwl);
475  if(traceDebug())
476  {
477  ossimNotify(ossimNotifyLevel_DEBUG) << "wktString === " << wktString << std::endl;
478  ossimNotify(ossimNotifyLevel_DEBUG) << "KWL === " << kwl << std::endl;
479  }
480  OGRFree(wktString);
481  if(traceDebug())
482  {
483  ossimNotify(ossimNotifyLevel_DEBUG) << "ossimOgrVectorTileSource::createProjFromReference: returning........" << std::endl;
484  }
486 }
Represents serializable keyword/value map.
ossimProjection * createProjection(const ossimFilename &filename, ossim_uint32 entryIdx) const
static ossimProjectionFactoryRegistry * instance()
bool toOssimKwl(const ossimString &wktString, ossimKeywordlist &kwl, const char *prefix=NULL) const
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ getEntryList()

void ossimOgrVectorTileSource::getEntryList ( std::vector< ossim_uint32 > &  entryList) const
virtual
Parameters
entryListThis is the list to initialize with entry indexes.
Note
This implementation returns puts one entry "0" in the list.

Reimplemented from ossimImageHandler.

Definition at line 441 of file ossimOgrVectorTileSource.cpp.

References ossimImageHandler::getEntryList(), getNumberOfEntries(), and theLayerVector.

442 {
443  if (theLayerVector.size() > 0)
444  {
445  for (ossim_uint32 i = 0; i < getNumberOfEntries(); i++)
446  {
447  entryList.push_back(i);
448  }
449  }
450  else
451  {
453  }
454 }
virtual ossim_uint32 getNumberOfEntries() const
std::vector< ossimOgrVectorLayerNode * > theLayerVector
unsigned int ossim_uint32
virtual void getEntryList(std::vector< ossim_uint32 > &entryList) const

◆ getImageGeometry()

ossimRefPtr< ossimImageGeometry > ossimOgrVectorTileSource::getImageGeometry ( )
virtual

Returns the image geometry object associated with this tile source or NULL if non defined.

The geometry contains full-to-local image transform as well as projection (image-to-world).

Reimplemented from ossimImageHandler.

Definition at line 358 of file ossimOgrVectorTileSource.cpp.

References theImageGeometry.

359 {
360  return theImageGeometry;
361 }
ossimRefPtr< ossimImageGeometry > theImageGeometry

◆ getImageRectangle()

ossimIrect ossimOgrVectorTileSource::getImageRectangle ( ossim_uint32  reduced_res_level = 0) const
virtual

Returns the zero based image rectangle for the reduced resolution data set (rrds) passed in. Note that rrds 0 is the highest resolution rrds.

Reimplemented from ossimImageHandler.

Definition at line 353 of file ossimOgrVectorTileSource.cpp.

References theImageBound.

354 {
355  return theImageBound;
356 }

◆ getImageTileHeight()

ossim_uint32 ossimOgrVectorTileSource::getImageTileHeight ( ) const
virtual

Returns the tile width of the image or 0 if the image is not tiled. Note: this is not the same as the ossimImageSource::getTileWidth which returns the output tile width which can be different than the internal image tile width on disk.

Implements ossimImageHandler.

Definition at line 283 of file ossimOgrVectorTileSource.cpp.

284 {
285  return 0;
286 }

◆ getImageTileWidth()

ossim_uint32 ossimOgrVectorTileSource::getImageTileWidth ( ) const
virtual

Returns the tile width of the image or 0 if the image is not tiled. Note: this is not the same as the ossimImageSource::getTileWidth which returns the output tile width which can be different than the internal image tile width on disk.

Implements ossimImageHandler.

Definition at line 278 of file ossimOgrVectorTileSource.cpp.

279 {
280  return 0;
281 }

◆ getInternalImageGeometry()

ossimRefPtr< ossimImageGeometry > ossimOgrVectorTileSource::getInternalImageGeometry ( ) const
virtual

Returns the image geometry object associated with this tile source or NULL if non defined.

The geometry contains full-to-local image transform as well as projection (image-to-world)

Reimplemented from ossimImageHandler.

Definition at line 288 of file ossimOgrVectorTileSource.cpp.

References theImageGeometry.

289 {
290  return theImageGeometry;
291 }
ossimRefPtr< ossimImageGeometry > theImageGeometry

◆ getMaxPixelValue()

double ossimOgrVectorTileSource::getMaxPixelValue ( ossim_uint32  band = 0) const
virtual

Returns the max pixel of the band.

Reimplemented from ossimImageHandler.

Definition at line 412 of file ossimOgrVectorTileSource.cpp.

413 {
414  return 0.0;
415 }

◆ getMinPixelValue()

double ossimOgrVectorTileSource::getMinPixelValue ( ossim_uint32  band = 0) const
virtual

Retuns the min pixel value.

If there was an external eta data file then use the meta data from that file. If not given then we will return the default min

Reimplemented from ossimImageHandler.

Definition at line 407 of file ossimOgrVectorTileSource.cpp.

408 {
409  return 0.0;
410 }

◆ getNullPixelValue()

double ossimOgrVectorTileSource::getNullPixelValue ( ossim_uint32  band = 0) const
virtual

Each band has a null pixel associated with it.

The null pixel represents an invalid value.

Reimplemented from ossimImageHandler.

Definition at line 402 of file ossimOgrVectorTileSource.cpp.

403 {
404  return 0.0;
405 }

◆ getNumberOfDecimationLevels()

ossim_uint32 ossimOgrVectorTileSource::getNumberOfDecimationLevels ( ) const
virtual

Returns the number of reduced resolution data sets (rrds).

Note: Shape files should never have reduced res sets so this method is returns "8" to avoid the question of "Do you want to build res sets".

Reimplemented from ossimImageHandler.

Definition at line 348 of file ossimOgrVectorTileSource.cpp.

349 {
350  return 32;
351 }

◆ getNumberOfEntries()

ossim_uint32 ossimOgrVectorTileSource::getNumberOfEntries ( ) const
virtual
Returns
The number of entries (images) in the image file.

Reimplemented from ossimImageHandler.

Definition at line 436 of file ossimOgrVectorTileSource.cpp.

References theLayerVector.

Referenced by getEntryList().

437 {
438  return theLayerVector.size();
439 }
std::vector< ossimOgrVectorLayerNode * > theLayerVector

◆ getNumberOfInputBands()

ossim_uint32 ossimOgrVectorTileSource::getNumberOfInputBands ( ) const
virtual

Returns the number of bands in the image. Satisfies pure virtual from ImageHandler class.

Implements ossimImageSource.

Definition at line 318 of file ossimOgrVectorTileSource.cpp.

319 {
320  return 0;
321 }

◆ getNumberOfLines()

ossim_uint32 ossimOgrVectorTileSource::getNumberOfLines ( ossim_uint32  reduced_res_level = 0) const
virtual

Returns the number of bands in the image. Satisfies pure virtual from ImageHandler class.

Implements ossimImageHandler.

Definition at line 328 of file ossimOgrVectorTileSource.cpp.

References ossimDrect::hasNans(), ossimDrect::height(), theImageBound, ossimDrect::ul(), and ossimDpt::x.

329 {
330  if(theImageBound.hasNans())
331  {
332  return theImageBound.ul().x;
333  }
334 
335  return theImageBound.height();
336 }
const ossimDpt & ul() const
Definition: ossimDrect.h:339
bool hasNans() const
Definition: ossimDrect.h:396
ossim_float64 height() const
Definition: ossimDrect.h:517
double x
Definition: ossimDpt.h:164

◆ getNumberOfOutputBands()

ossim_uint32 ossimOgrVectorTileSource::getNumberOfOutputBands ( ) const
virtual

Returns the number of bands in a tile returned from this TileSource. Note: we are supporting sources that can have multiple data objects. If you want to know the scalar type of an object you can pass in the

Reimplemented from ossimImageSource.

Definition at line 323 of file ossimOgrVectorTileSource.cpp.

324 {
325  return 0;
326 }

◆ getNumberOfSamples()

ossim_uint32 ossimOgrVectorTileSource::getNumberOfSamples ( ossim_uint32  reduced_res_level = 0) const
virtual

Returns the number of bands available from an image. Satisfies pure virtual from ImageHandler class.

Implements ossimImageHandler.

Definition at line 338 of file ossimOgrVectorTileSource.cpp.

References ossimDrect::hasNans(), theImageBound, ossimDrect::ul(), ossimDrect::width(), and ossimDpt::y.

339 {
340  if(theImageBound.hasNans())
341  {
342  return theImageBound.ul().y;
343  }
344 
345  return theImageBound.width();
346 }
ossim_float64 width() const
Definition: ossimDrect.h:522
const ossimDpt & ul() const
Definition: ossimDrect.h:339
double y
Definition: ossimDpt.h:165
bool hasNans() const
Definition: ossimDrect.h:396

◆ getOutputScalarType()

ossimScalarType ossimOgrVectorTileSource::getOutputScalarType ( ) const
virtual

Returns the output pixel type of the tile source.

Reimplemented from ossimImageSource.

Definition at line 363 of file ossimOgrVectorTileSource.cpp.

References OSSIM_SCALAR_UNKNOWN.

364 {
365  return OSSIM_SCALAR_UNKNOWN;
366 }

◆ getTile()

ossimRefPtr< ossimImageData > ossimOgrVectorTileSource::getTile ( const ossimIrect tileRect,
ossim_uint32  resLevel = 0 
)
virtual

Returns a pointer to a tile given an origin representing the upper left corner of the tile to grab from the image. Satisfies pure virtual from TileSource class.

Reimplemented from ossimImageSource.

Definition at line 312 of file ossimOgrVectorTileSource.cpp.

314 {
315  return 0;
316 }

◆ getTileHeight()

ossim_uint32 ossimOgrVectorTileSource::getTileHeight ( ) const
virtual

Returns the height of the output tile.

Reimplemented from ossimImageSource.

Definition at line 373 of file ossimOgrVectorTileSource.cpp.

374 {
375  return 0;
376 }

◆ getTileWidth()

ossim_uint32 ossimOgrVectorTileSource::getTileWidth ( ) const
virtual

Returns the width of the output tile.

Reimplemented from ossimImageSource.

Definition at line 368 of file ossimOgrVectorTileSource.cpp.

369 {
370  return 0;
371 }

◆ isOgrVectorDataSource()

bool ossimOgrVectorTileSource::isOgrVectorDataSource ( ) const

Definition at line 383 of file ossimOgrVectorTileSource.cpp.

References ossimString::before(), ossimString::downcase(), ossimString::empty(), ossimFilename::ext(), ossimImageHandler::theImageFile, and ossimString::upcase().

384 {
385  if (!theImageFile.empty())
386  {
387  if (theImageFile.before(":", 3).upcase() != "SDE" &&
388  theImageFile.before(":", 4).upcase() != "GLTP" &&
389  theImageFile.ext().downcase() != "mdb")
390  {
391  return false;
392  }
393  }
394  else
395  {
396  return false;
397  }
398 
399  return true;
400 }
ossimString before(const ossimString &str, std::string::size_type pos=0) const
METHOD: before(str, pos) Returns string beginning at pos and ending one before the token str If strin...
static ossimString upcase(const ossimString &aString)
Definition: ossimString.cpp:34
ossimFilename theImageFile
static ossimString downcase(const ossimString &aString)
Definition: ossimString.cpp:48
bool empty() const
Definition: ossimString.h:411
ossimString ext() const

◆ isOpen()

bool ossimOgrVectorTileSource::isOpen ( ) const
virtual

Derived classes must implement this method to be concrete.

Returns
true if open, false if not.

Implements ossimImageHandler.

Definition at line 378 of file ossimOgrVectorTileSource.cpp.

References theDataSource.

379 {
380  return (theDataSource!=0);
381 }

◆ loadState()

bool ossimOgrVectorTileSource::loadState ( const ossimKeywordlist kwl,
const char *  prefix = 0 
)
virtual

Method to the load (recreate) the state of an object from a keyword list. Return true if ok or false on error.

Reimplemented from ossimImageHandler.

Definition at line 267 of file ossimOgrVectorTileSource.cpp.

References ossimImageGeometry::loadState(), ossimImageHandler::loadState(), and theImageGeometry.

268 {
269  bool success = ossimImageHandler::loadState(kwl, prefix);
270  if (success)
271  {
273  success = theImageGeometry->loadState(kwl, prefix);
274  }
275  return success;
276 }
ossimRefPtr< ossimImageGeometry > theImageGeometry
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Attempts to initialize a transform and a projection given the KWL.
virtual bool loadState(const ossimKeywordlist &kwl, const char *prefix=0)
Method to the load (recreate) the state of an object from a keyword list.
Container class that holds both 2D transform and 3D projection information for an image Only one inst...

◆ open()

bool ossimOgrVectorTileSource::open ( )
virtual
Returns
Returns true on success, false on error.
Note
This method relies on the data member ossimImageData::theImageFile being set. Callers should do a "setFilename" prior to calling this method or use the ossimImageHandler::open that takes a file name and an entry index.

Implements ossimImageHandler.

Definition at line 93 of file ossimOgrVectorTileSource.cpp.

94 {
95  const char* MODULE = "ossimOgrVectorTileSource::open";
96 
97  if(traceDebug())
98  {
100  << MODULE << " entered...\nFile: " << theImageFile.c_str() << std::endl;
101  }
102 
103  if(isOpen())
104  {
105  close();
106  }
107 
108  if ( isOgrVectorDataSource() )
109  {
110  //---
111  // Old interface removed in gdal.
112  // theDataSource = OGRSFDriverRegistrar::Open(theImageFile,
113  // false);
114  //---
115  theDataSource = (OGRDataSource*) OGROpen( theImageFile.c_str(), false, NULL );
116  if (theDataSource)
117  {
118  int layerCount = theDataSource->GetLayerCount();
119  theLayerVector.resize(layerCount);
120  if(layerCount)
121  {
122  for(int i = 0; i < layerCount; ++i)
123  {
124  OGRLayer* layer = theDataSource->GetLayer(i);
125  if(layer)
126  {
127  OGRSpatialReference* spatialReference = layer->GetSpatialRef();
128 
129  if(!spatialReference)
130  {
131  if(traceDebug())
132  {
134  << MODULE
135  << " No spatial reference given, assuming geographic"
136  << endl;
137  }
138  }
139  }
140  else
141  {
142  if(traceDebug())
143  {
145 
146  << MODULE
147  << " layer " << i << " is null." << endl;
148  }
149  }
150 
151  if (layer)
152  {
153  layer->GetExtent(&theBoundingExtent, true);
154 
155  ossimRefPtr<ossimProjection> proj = createProjFromReference(layer->GetSpatialRef());
156  ossimRefPtr<ossimImageGeometry> imageGeometry = 0;
157  bool isDefaultProjection = false;
158  if(proj.valid())
159  {
160  imageGeometry = new ossimImageGeometry(0, proj.get());
161  }
162 
163  ossimMapProjection* mapProj = 0;
164  if(imageGeometry.valid())
165  {
166  mapProj = PTR_CAST(ossimMapProjection, imageGeometry->getProjection());
167  }
168  else
169  {
170  mapProj = createDefaultProj();
171  imageGeometry = new ossimImageGeometry(0, mapProj);
172  isDefaultProjection = true;
173  }
174 
175  if(mapProj)
176  {
177  ossimDrect rect(theBoundingExtent.MinX,
178  theBoundingExtent.MaxY,
179  theBoundingExtent.MaxX,
180  theBoundingExtent.MinY,
182 
183  std::vector<ossimGpt> points;
184  if (isDefaultProjection || mapProj->isGeographic())
185  {
186  ossimGpt g1(rect.ul().y, rect.ul().x);
187  ossimGpt g2(rect.ur().y, rect.ur().x);
188  ossimGpt g3(rect.lr().y, rect.lr().x);
189  ossimGpt g4(rect.ll().y, rect.ll().x);
190 
191  points.push_back(g1);
192  points.push_back(g2);
193  points.push_back(g3);
194  points.push_back(g4);
195  }
196  else
197  {
198  ossimGpt g1 = mapProj->inverse(rect.ul());
199  ossimGpt g2 = mapProj->inverse(rect.ur());
200  ossimGpt g3 = mapProj->inverse(rect.lr());
201  ossimGpt g4 = mapProj->inverse(rect.ll());
202 
203  points.push_back(g1);
204  points.push_back(g2);
205  points.push_back(g3);
206  points.push_back(g4);
207  }
208 
209  std::vector<ossimDpt> rectTmp;
210  rectTmp.resize(4);
211 
212  for(std::vector<ossimGpt>::size_type index=0; index < 4; ++index)
213  {
214  imageGeometry->worldToLocal(points[(int)index], rectTmp[(int)index]);
215  }
216 
217  ossimDrect rect2 = ossimDrect(rectTmp[0],
218  rectTmp[1],
219  rectTmp[2],
220  rectTmp[3]);
221 
222  theLayerVector[i] = new ossimOgrVectorLayerNode(rect2);
223  theLayerVector[i]->setGeoImage(imageGeometry);
224 
225  // Initialize the image geometry to the first layer's geometry:
226  if (i == 0)
227  theImageGeometry = imageGeometry;
228  }
229  }
230  }
231 
232  } // if(layerCount)
233  else
234  {
235  OGR_DS_Destroy( theDataSource );
236  theDataSource = 0;
237  }
238 
239  } // Matches: if (theDataSource)
240 
241  } // Matches: if ( isOgrVectorDataSource() )
242 
243  return ( theDataSource ? true : false );
244 }
virtual void close()
Deletes the overview and clears the valid image vertices.
ossimFilename theImageFile
ossimMapProjection * createDefaultProj()
bool valid() const
Definition: ossimRefPtr.h:75
ossimRefPtr< ossimImageGeometry > theImageGeometry
virtual bool isGeographic() const
ossimProjection * createProjFromReference(OGRSpatialReference *reference) const
std::vector< ossimOgrVectorLayerNode * > theLayerVector
virtual ossimGpt inverse(const ossimDpt &projectedPoint) const =0
Will take a point in meters and convert it to ground.
#define PTR_CAST(T, p)
Definition: ossimRtti.h:321
Container class that holds both 2D transform and 3D projection information for an image Only one inst...
const char * c_str() const
Returns a pointer to a null-terminated array of characters representing the string&#39;s contents...
Definition: ossimString.h:396
virtual bool isOpen() const
Derived classes must implement this method to be concrete.
OSSIMDLLEXPORT std::ostream & ossimNotify(ossimNotifyLevel level=ossimNotifyLevel_WARN)

◆ saveState()

bool ossimOgrVectorTileSource::saveState ( ossimKeywordlist kwl,
const char *  prefix = 0 
) const
virtual

Method to save the state of an object to a keyword list. Return true if ok or false on error.

Reimplemented from ossimImageHandler.

Definition at line 249 of file ossimOgrVectorTileSource.cpp.

References ossimImageGeometry::saveState(), ossimImageHandler::saveState(), theImageGeometry, theLayerVector, and ossimRefPtr< T >::valid().

251 {
252  for (unsigned int i = 0; i < theLayerVector.size(); i++)
253  {
254  ossimRefPtr<ossimImageGeometry> imageGeometry = theLayerVector[i]->theGeoImage;
255  if(theImageGeometry.valid())
256  {
257  theImageGeometry->saveState(kwl, prefix);
258  }
259  }
260 
261  return ossimImageHandler::saveState(kwl, prefix);
262 }
bool valid() const
Definition: ossimRefPtr.h:75
ossimRefPtr< ossimImageGeometry > theImageGeometry
std::vector< ossimOgrVectorLayerNode * > theLayerVector
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Saves the transform (if any) and projection (if any) states to the KWL.
virtual bool saveState(ossimKeywordlist &kwl, const char *prefix=0) const
Method to save the state of an object to a keyword list.

◆ setCurrentEntry()

bool ossimOgrVectorTileSource::setCurrentEntry ( ossim_uint32  entryIdx)
virtual
Parameters
entryIdxEntry number to select.
Note
The implementation does nothing. Derived classes that handle multiple images should override.
Returns
true if it was able to set the current entry and false otherwise.

Reimplemented from ossimImageHandler.

Definition at line 417 of file ossimOgrVectorTileSource.cpp.

References ossimDrect::makeNan(), theImageBound, theImageGeometry, theLayerVector, and ossimRefPtr< T >::valid().

418 {
419  if(theLayerVector.size() > 0)
420  {
421  if (theLayerVector.size() > entryIdx)
422  {
423  theImageGeometry = 0;
425  theImageGeometry = theLayerVector[entryIdx]->theGeoImage;
426  theImageBound = theLayerVector[entryIdx]->theBoundingRect;
427  if (theImageGeometry.valid())
428  {
429  return true;
430  }
431  }
432  }
433  return false;
434 }
void makeNan()
Definition: ossimDrect.h:388
bool valid() const
Definition: ossimRefPtr.h:75
ossimRefPtr< ossimImageGeometry > theImageGeometry
std::vector< ossimOgrVectorLayerNode * > theLayerVector

Member Data Documentation

◆ theBoundingExtent

OGREnvelope ossimOgrVectorTileSource::theBoundingExtent
private

Definition at line 191 of file ossimOgrVectorTileSource.h.

Referenced by createDefaultProj().

◆ theDataSource

OGRDataSource* ossimOgrVectorTileSource::theDataSource
private

Definition at line 188 of file ossimOgrVectorTileSource.h.

Referenced by close(), and isOpen().

◆ theImageBound

ossimDrect ossimOgrVectorTileSource::theImageBound
private

◆ theImageGeometry

ossimRefPtr<ossimImageGeometry> ossimOgrVectorTileSource::theImageGeometry
private

◆ theLayerVector

std::vector<ossimOgrVectorLayerNode*> ossimOgrVectorTileSource::theLayerVector
private

The documentation for this class was generated from the following files: