Skip to content

Commit

Permalink
Merge branch 'dev' into of-15
Browse files Browse the repository at this point in the history
  • Loading branch information
oscarkramer committed Oct 30, 2018
2 parents 9e925cd + 1aefbd5 commit 102b682
Show file tree
Hide file tree
Showing 36 changed files with 5,212 additions and 4,691 deletions.
2 changes: 1 addition & 1 deletion cmake/CMakeModules/OssimCommonVariables.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ MACRO(OSSIM_ADD_COMMON_SETTINGS)
SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};${OSSIM_DEPENDENCIES}/lib${LIBSUFFIX}")
SET(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};${OSSIM_DEPENDENCIES}/include")
ENDIF()
SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};/usr/lib;/usr/local/lib;/usr/lib64;/usr/lib/x86_64-linux-gnu")
# SET(CMAKE_LIBRARY_PATH "${CMAKE_LIBRARY_PATH};/usr/lib;/usr/local/lib;/usr/lib64;/usr/lib/x86_64-linux-gnu")
SET(CMAKE_INCLUDE_PATH "${CMAKE_INCLUDE_PATH};${OSSIM_DEV_HOME}/ossim/include;/usr/include;/usr/local/include")

#################################### ADd some common options for all modules to use ###################################
Expand Down
6 changes: 4 additions & 2 deletions include/ossim/base/ossimLagrangeInterpolator.h
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,10 @@ class ossimLagrangeInterpolator : public ossimReferenced
private:
std::vector<double> theTeeArray;
std::vector<NEWMAT::ColumnVector> theDataArray;
std::vector<double> theNormalizer;
ossim_uint32 theNumElements;
mutable std::vector<double> theNormalizer;
mutable ossim_uint32 theNumElements;

void initializeNormalizer()const;
};

#endif
10 changes: 10 additions & 0 deletions include/ossim/base/ossimString.h
Original file line number Diff line number Diff line change
Expand Up @@ -389,6 +389,16 @@ class OSSIM_DLL ossimString
ossimString& downcase();
ossimString downcase()const;

/**
* @return true if the string ends in the pattern specified
*/
bool endsWith(const ossimString &pattern) const;

/**
* @return true if the string starts with the pattern specified
*/
bool startsWith(const ossimString &pattern) const;

/**
* @brief Returns a pointer to a null-terminated array of characters
* representing the string's contents.
Expand Down
5 changes: 3 additions & 2 deletions include/ossim/base/ossimXmlDocument.h
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,9 @@ class OSSIMDLLEXPORT ossimXmlDocument :
virtual ~ossimXmlDocument();

bool write(const ossimFilename& file);
bool openFile(const ossimFilename& filename);
bool read(std::istream& in);
bool openFile(const ossimFilename &filename);
bool readString(const ossimString& xmlString);
bool read(std::istream &in);
/**
* Appends any matching nodes to the list supplied (should be empty):
*/
Expand Down
3 changes: 2 additions & 1 deletion include/ossim/base/ossimXmlNode.h
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,8 @@ class OSSIMDLLEXPORT ossimXmlNode : public ossimObject,
void clearAttributes();

void toKwl(ossimKeywordlist& kwl,
const ossimString& prefix="")const;
const ossimString& prefix="",
bool includeTag=true)const;
void fromKwl(const ossimKeywordlist& kwlToConvert);

protected:
Expand Down
3 changes: 3 additions & 0 deletions include/ossim/imaging/ossimNitfTileSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -218,6 +218,9 @@ class OSSIM_DLL ossimNitfTileSource : public ossimImageHandler

const ossimNitfFileHeader* getFileHeader()const;
ossimNitfFileHeader* getFileHeader();
ossimNitfFile *getNitfFile();
const ossimNitfFile *getNitfFile()const;

/**
* @return The image header for the current entry.
*/
Expand Down
12 changes: 11 additions & 1 deletion include/ossim/imaging/ossimTiffTileSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -266,7 +266,17 @@ class OSSIMDLLEXPORT ossimTiffTileSource : public ossimImageHandler
* directory + 1.
*/
ossim_uint32 getCurrentTiffRLevel() const;


/**
* @brief Convenience method to get the zero based rgb output band list.
*
*
* @param bandList Initialized by this.
* @return true on success, false if number of bands is less than 3 or if
* rgb bands could not be derived.
*/
virtual bool getRgbBandList(std::vector<ossim_uint32> &bandList) const;

ossimString getReadMethod(ossim_uint32 directory) const;

bool loadTile(const ossimIrect& tile_rect,
Expand Down
3 changes: 2 additions & 1 deletion include/ossim/projection/ossimNitfProjectionFactory.h
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ class ossimGpt;
class ossimNitfTileSource;
class ossimNitfImageHeader;
class ossimNitfFileHeader;
class ossimNitfFile;
class ossimDpt;

class OSSIMDLLEXPORT ossimNitfProjectionFactory : public ossimProjectionFactoryBase
Expand Down Expand Up @@ -95,7 +96,7 @@ class OSSIMDLLEXPORT ossimNitfProjectionFactory : public ossimProjectionFactoryB

private:

ossimProjection* createProjectionFromHeaders(
ossimProjection* createProjectionFromHeaders(ossimNitfFile* nitfFile,
ossimNitfFileHeader* fileHeader,
ossimNitfImageHeader* imageHeader)const;

Expand Down
21 changes: 11 additions & 10 deletions include/ossim/support_data/TiffHandlerState.h
Original file line number Diff line number Diff line change
Expand Up @@ -264,13 +264,6 @@ namespace ossim
*/
ossim_float64 getDoubleValue(const ossimString& key, ossim_int32 directory=0)const;

/**
* Convenience method to get a raster type.
*
* This does not supply a way to check if a value existed or not.
*/
ossim_int32 getRasterType(ossim_int32 directory=0)const;

/**
* Convenience method to get a pcs code.
*
Expand Down Expand Up @@ -390,6 +383,12 @@ namespace ossim
*/
ossim_float64 getScaleFactor(ossim_int32 directory=0)const;

/**
* Convenience method to get a raster type.
*
* This does not supply a way to check if a value existed or not.
*/
ossim_int32 getRasterType(ossim_int32 directory = 0) const;
ossim_int32 getPlanarConfig(ossim_int32 directory = 0) const;
ossim_int32 getPhotoInterpretation(ossim_int32 directory = 0) const;
ossim_int32 getCompressionType(ossim_int32 directory = 0) const;
Expand All @@ -405,6 +404,7 @@ namespace ossim
bool isReduced(ossim_int32 directory = 0) const;
bool isPage(ossim_int32 directory = 0) const;
bool isMask(ossim_int32 directory = 0) const;
bool isDigitalGlobe()const;
ossim_int32 getSubFileType(ossim_int32 directory = 0) const;
ossim_uint32 getNumberOfDirectories()const;
bool getColorMap(std::vector<ossim_uint16> &red,
Expand All @@ -430,7 +430,7 @@ namespace ossim
* @param directory to use
*/
bool getGeoDoubleParams(std::vector<ossim_float64>& result,
ossim_int32 directory)const;
ossim_int32 directory=0)const;

/**
* Convenience method to get a Geo double params array.
Expand All @@ -448,9 +448,10 @@ namespace ossim
* @param directory to use
*/
bool getGeoTiePoints(std::vector<ossim_float64>& result,
ossim_int32 directory)const;
ossim_int32 directory=0)const;

bool getCitation(ossimString& citation, ossim_int32 directory)const;
bool getCitation(ossimString& citation, ossim_int32 directory=0)const;
bool getCopyright(ossimString &copyright, ossim_int32 directory = 0) const;
/**
* Convenience method to get a Geo trans matrix array.
*
Expand Down
2 changes: 1 addition & 1 deletion include/ossim/support_data/ossimNitfDesInformation.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ class OSSIMDLLEXPORT ossimNitfDesInformation : public ossimObject

char m_de[DE_SIZE+1];
char m_desid[DESID_SIZE+1];
char m_desver[DESVER_SIZE+1];
char m_desver[DESVER_SIZE+1];
char m_declas[DECLAS_SIZE+1];
char m_desclsy[DESCLSY_SIZE+1];
char m_descode[DESCODE_SIZE+1];
Expand Down
7 changes: 5 additions & 2 deletions include/ossim/support_data/ossimNitfFileHeader.h
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,9 @@ class OSSIM_DLL ossimNitfFileHeader : public ossimObject,

virtual bool getTag(ossimNitfTagInformation& tagInfo,
const ossimString& tagName)const;

virtual bool getDesInformation(ossimNitfDesInformation& desInfo,
const ossimString& desId,
bool exactMatch=false);
virtual ossim_int64 getFileSize()const=0;
virtual const char* getVersion()const=0;
virtual const char* getDateTime()const=0;
Expand Down Expand Up @@ -190,8 +192,9 @@ class OSSIM_DLL ossimNitfFileHeader : public ossimObject,
virtual ossimNitfLabelHeader* allocateLabelHeader()const=0;
virtual ossimNitfTextHeader* allocateTextHeader()const=0;
virtual ossimNitfDataExtensionSegment *allocateDataExtSegment()const=0;
virtual const std::vector<ossimNitfDesInformation>& getDesInfoList()const;

virtual ossim_uint32 getTotalTagLength()const;
virtual ossim_uint32 getTotalTagLength() const;

/** @brief Sets file length (FL) field. */
virtual void setFileLength(ossim_uint64 fileLength) = 0;
Expand Down
12 changes: 6 additions & 6 deletions include/ossim/support_data/ossimNitfRegisteredDes.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ class OSSIM_DLL ossimNitfRegisteredDes : public ossimObject ,

/** @brief destructor */
virtual ~ossimNitfRegisteredDes();

/**
* @brief This will return the name of the registered des for this user
* defined header.
Expand Down Expand Up @@ -65,17 +64,17 @@ class OSSIM_DLL ossimNitfRegisteredDes : public ossimObject ,
* @return Length of REDATA or CEDATA.
*/
virtual ossim_uint32 getSizeInBytes()const;

/**
const std::vector<ossim_int8>& getDesDataBuffer()const;
/**
* @brief Returns the length in bytes of the des from the CEL or REL field.
*
* The entire TRE length is 11 plus this(the size of the CEL or REL field).
*
* @return Length of REDATA or CEDATA.
*/
virtual ossim_uint32 getDesLength()const;
virtual ossim_uint32 getDesLength() const;

/**
/**
* @brief Set the des length.
*
* @param length Length of des.
Expand Down Expand Up @@ -115,8 +114,9 @@ class OSSIM_DLL ossimNitfRegisteredDes : public ossimObject ,
virtual bool saveState(ossimKeywordlist& kwl, const ossimString& prefix)const;

protected:
std::string m_desName;
ossimString m_desName;
ossim_uint32 m_desLength;
std::vector<ossim_int8> m_desData;

TYPE_DATA
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#include <ossim/base/ossimXmlDocument.h>
#include <ossim/base/ossimXmlNode.h>

class OSSIM_DLL ossimNitfXmlDataContentDes : public ossimNitfRegisteredDes
class OSSIM_DLL ossimNitfSicdXmlDataContentDes : public ossimNitfRegisteredDes
{
public:
enum
Expand All @@ -22,16 +22,17 @@ class OSSIM_DLL ossimNitfXmlDataContentDes : public ossimNitfRegisteredDes
DESSHLIN_SIZE = 120,
DESSHABS_SIZE = 200
};
ossimNitfXmlDataContentDes();
ossimNitfSicdXmlDataContentDes();

virtual void parseStream(std::istream& in);
virtual void writeStream(std::ostream& out);

virtual std::ostream& print(std::ostream& out,
const std::string& prefix=std::string()) const;
virtual void clearFields();
bool loadState(const ossimKeywordlist& kwl, const char* prefix);
bool loadValueFromXml(const ossimRefPtr<ossimXmlDocument>, const ossimString& xpath, ossimString& target) const;
bool loadState(const ossimKeywordlist &kwl, const char *prefix);
bool saveState(ossimKeywordlist &kwl, const char *prefix)const;
// bool loadValueFromXml(const ossimRefPtr<ossimXmlDocument>, const ossimString &xpath, ossimString &target) const;

ossimString getDesshl() const;
ossim_uint32 getDesshlAsUint32() const;
Expand All @@ -52,6 +53,7 @@ class OSSIM_DLL ossimNitfXmlDataContentDes : public ossimNitfRegisteredDes

ossimString getDesshtn() const;

void getDesDataAsString(ossimString& result)const;

protected:
char m_desshl[DESSHL_SIZE+1];
Expand All @@ -68,7 +70,4 @@ class OSSIM_DLL ossimNitfXmlDataContentDes : public ossimNitfRegisteredDes
char m_desshli[DESSHLI_SIZE+1];
char m_desshlin[DESSHLIN_SIZE+1];
char m_desshabs[DESSHABS_SIZE+1];

ossimString m_xmlString;
ossimRefPtr<ossimXmlDocument> m_xmlDocument;
};
Loading

0 comments on commit 102b682

Please sign in to comment.