This is an automated email from the git hooks/post-receive script. sebastic pushed a commit to branch master in repository ossim.
commit e0f587a1ee6aed73f1316e5c82dd6968274d78e1 Author: Bas Couwenberg <sebas...@xs4all.nl> Date: Tue Jan 9 18:36:31 2018 +0100 New upstream version 2.2.1 --- CMakeLists.txt | 34 ++++++----- apps/ossim-cli/ossim-cli.cpp | 35 +++++++---- src/imaging/ossimNitfTileSource.cpp | 19 +++++- src/matrix/newmat8.cpp | 4 +- src/util/ossimChipperUtil.cpp | 114 ++++++++++++++++++++---------------- 5 files changed, 124 insertions(+), 82 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 2eb0a66..0c3a4bb 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -56,23 +56,15 @@ set( ossimDependentLibs ) # Find required and optional packages and add their include paths and libraries: #--- -# GEOS - Currently optional until it is actually called.: -find_package( GEOS QUIET) +# GEOS - Required: +find_package( GEOS ) if( GEOS_FOUND ) include_directories( ${GEOS_INCLUDE_DIR} ) set( ossimDependentLibs ${ossimDependentLibs} ${GEOS_LIBRARY} ) else( GEOS_FOUND ) - message( FATAL_ERROR "Could not find geos package! Consider installing this as it will soon become a required package." ) + message( FATAL_ERROR "Could not find required geos package!" ) endif( GEOS_FOUND ) -find_package( JsonCpp QUIET) -if( JSONCPP_FOUND ) - include_directories( ${JSONCPP_INCLUDE_DIR} ) - set( ossimDependentLibs ${ossimDependentLibs} ${JSONCPP_LIBRARY} ) -else( JSONCPP_FOUND ) - message("Could not find JSONCPP package! Consider installing this as it will soon become a required package." ) -endif( JSONCPP_FOUND ) - # GEOFIFF - Required: set( OSSIM_HAS_GEOTIFF 0 ) find_package( GEOTIFF ) @@ -132,6 +124,17 @@ endif() # if (CMAKE_SYSTEM_NAME MATCHES "Linux") # endif( DL_LIBRARY ) #endif( UNIX ) +# JSONCPP - Optional: +set( OSSIM_HAS_JSONCPP 0 ) +find_package( JsonCpp ) +if( JSONCPP_FOUND ) + include_directories( ${JSONCPP_INCLUDE_DIR} ) + set( ossimDependentLibs ${ossimDependentLibs} ${JSONCPP_LIBRARY} ) + set( OSSIM_HAS_JSONCPP 1 ) +else( JSONCPP_FOUND ) + message("Could not find optional JSONCPP package! Consider installing this as it will soon become a required package." ) +endif( JSONCPP_FOUND ) + # FREETYPE - Optional: set( OSSIM_HAS_FREETYPE 0 ) if( BUILD_OSSIM_FREETYPE_SUPPORT ) @@ -169,7 +172,7 @@ else ( ZLIB_FOUND ) message( WARNING "Could not find optional zlib package!" ) endif ( ZLIB_FOUND ) -# HDF5 - Optional +# HDF5 - Optional: set( OSSIM_HAS_HDF5 0 ) if (BUILD_OSSIM_HDF5_SUPPORT) message( STATUS "Native HDF5 support requested. Searching for HDF5 library..." ) @@ -201,8 +204,6 @@ if ( NOT ${Project_WC_REVISION} EQUAL 0 ) set( OSSIM_GIT_REVISION_NUMBER ${Project_WC_REVISION} ) endif() - - ##################################################################################### # Call the configure files for ossimConfig and ossimVersion setup ##################################################################################### @@ -265,6 +266,7 @@ MESSAGE( STATUS "JPEG_LIBRARY = ${JPEG_LIBRARIES}" ) MESSAGE( STATUS "JPEG_INCLUDE = ${JPEG_INCLUDE_DIR}" ) MESSAGE( STATUS "OSSIM DEPENDENT LIBRARIES = ${ossimDependentLibs}" ) MESSAGE( STATUS "OSSIM_HAS_HDF5 = ${OSSIM_HAS_HDF5}" ) +MESSAGE( STATUS "OSSIM_HAS_JSONCPP = ${OSSIM_HAS_JSONCPP}" ) #----------------------------------------------------------------------------- @@ -272,8 +274,6 @@ MESSAGE( STATUS "OSSIM_HAS_HDF5 = ${OSSIM_HAS_HDF5}" ) #----------------------------------------------------------------------------- #OSSIM_ADD_COMMON_MAKE_UNINSTALL() -message("################## end of OSSIM core library setup #########################") - IF(BUILD_OSSIM_APPS) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/apps ${CMAKE_CURRENT_BINARY_DIR}/apps) ENDIF() @@ -288,3 +288,5 @@ endif() IF(BUILD_OSSIM_TESTS) add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/test/src ${CMAKE_CURRENT_BINARY_DIR}/test/src) ENDIF() + +message("################## end of OSSIM core library setup #########################\n") diff --git a/apps/ossim-cli/ossim-cli.cpp b/apps/ossim-cli/ossim-cli.cpp index 9f69a47..527409f 100755 --- a/apps/ossim-cli/ossim-cli.cpp +++ b/apps/ossim-cli/ossim-cli.cpp @@ -19,6 +19,11 @@ using namespace std; #include <ossim/base/ossimString.h> #include <ossim/util/ossimToolRegistry.h> #include <ossim/base/ossimException.h> +#include <ossim/base/ossimNotify.h> + +#define CINFO ossimNotify(ossimNotifyLevel_INFO) +#define CWARN ossimNotify(ossimNotifyLevel_WARN) +#define CFATAL ossimNotify(ossimNotifyLevel_FATAL) void showAvailableCommands() { @@ -26,20 +31,20 @@ void showAvailableCommands() map<string, string> capabilities; factory->getCapabilities(capabilities); map<string, string>::iterator iter = capabilities.begin(); - cout<<"\nAvailable commands:\n"<<endl; + CINFO<<"\nAvailable commands:\n"<<endl; for (;iter != capabilities.end(); ++iter) - cout<<" "<<iter->first<<" -- "<<iter->second<<endl; - cout<<endl; + CINFO<<" "<<iter->first<<" -- "<<iter->second<<endl; + CINFO<<endl; } void usage(char* appName) { - cout << "\nUsages: "<<endl; - cout << " "<<appName<<" <command> [command options and parameters]"<<endl; - cout << " "<<appName<<" --spec <command-spec-file>"<<endl; - cout << " "<<appName<<" --version"<<endl; - cout << " "<<appName<<" help <command> -- To get help on specific command."<<endl; + CINFO << "\nUsages: \n" + << " "<<appName<<" <command> [command options and parameters]\n" + << " "<<appName<<" --spec <command-spec-file>\n" + << " "<<appName<<" --version\n" + << " "<<appName<<" help <command> -- To get help on specific command."<<endl; showAvailableCommands(); } @@ -53,14 +58,17 @@ bool runCommand(ossimArgumentParser& ap) if (!utility.valid()) { - cout << "\nDid not understand command <"<<command<<">"<<endl; + CWARN << "\nDid not understand command <"<<command<<">"<<endl; showAvailableCommands(); return false; } + ossimTimer* timer = ossimTimer::instance(); + timer->setStartTick(); + if (!utility->initialize(ap)) { - cout << "\nCould not execute command <"<<command<<"> with arguments and options " + CWARN << "\nCould not execute command <"<<command<<"> with arguments and options " "provided."<<endl; return false; } @@ -70,10 +78,11 @@ bool runCommand(ossimArgumentParser& ap) if (!utility->execute()) { - cout << "\nAn error was encountered executing the command. Check options."<<endl; + CWARN << "\nAn error was encountered executing the command. Check options."<<endl; return false; } + //CINFO << "\nElapsed time after initialization: "<<timer->time_s()<<" s.\n"<<endl; return true; } @@ -105,7 +114,7 @@ int main(int argc, char *argv[]) ifstream ifs (argv[2]); if (ifs.fail()) { - cout<<"\nCould not open the spec file at <"<<argv[2]<<">\n"<<endl; + CWARN<<"\nCould not open the spec file at <"<<argv[2]<<">\n"<<endl; status_ok = false; break; } @@ -158,7 +167,7 @@ int main(int argc, char *argv[]) } catch( ... ) { - cerr << "Caught unknown exception!" << endl; + CFATAL << "Caught unknown exception!" << endl; } if (status_ok) diff --git a/src/imaging/ossimNitfTileSource.cpp b/src/imaging/ossimNitfTileSource.cpp index 6c91985..97bfbff 100644 --- a/src/imaging/ossimNitfTileSource.cpp +++ b/src/imaging/ossimNitfTileSource.cpp @@ -80,8 +80,8 @@ static const ossim_uint32 OSSIM_NITF_VQ_BLOCKSIZE = 6144; /** @brief Extended error handler struct for jpeg code. */ struct ossimJpegErrorMgr { - struct jpeg_error_mgr pub; /* "public" fields */ - jmp_buf setjmp_buffer; /* for return to caller */ + struct jpeg_error_mgr pub; /* "public" fields */ + jmp_buf setjmp_buffer; /* for return to caller */ }; @@ -1396,6 +1396,21 @@ void ossimNitfTileSource::initializeCacheSize() case READ_BIR: theCacheSize.x = hdr->getNumberOfPixelsPerBlockHoriz(); theCacheSize.y = hdr->getNumberOfPixelsPerBlockVert(); + if(getNumberOfBlocks() == 1) + { + // is it larger than 4kx4k then we will for now error out so + // we can't continue + if((theCacheSize.x*theCacheSize.y) > 16777216) + { + if(traceDebug()) + { + ossimNotify(ossimNotifyLevel_WARN) << "We currently do not support single blocks with block sizes larger than 4kx4k"; + ossimNotify(ossimNotifyLevel_WARN) << "Current size is: " << theCacheSize << std::endl; + } + theCacheSize.x = 0; + theCacheSize.y = 0; + } + } // theCacheSize.x = getNumberOfSamples(0); // theCacheSize.y = getTileHeight(); // if(theCacheSize.y > hdr->getNumberOfPixelsPerBlockVert()) diff --git a/src/matrix/newmat8.cpp b/src/matrix/newmat8.cpp index 8f18413..52ac479 100644 --- a/src/matrix/newmat8.cpp +++ b/src/matrix/newmat8.cpp @@ -94,6 +94,7 @@ void CroutMatrix::ludcmp() } } + void CroutMatrix::lubksb(Real* B, int mini) { REPORT @@ -102,8 +103,9 @@ void CroutMatrix::lubksb(Real* B, int mini) // copyright remains. However there is not much opportunity for // variation in the code, so it is still similar to the NR code. // I follow the NR code in skipping over initial zeros in the B vector. - Tracer trace("Crout(lubksb)"); + sing = false; + // if ((this->LogDeterminant()).Value() != 0) sing = false; if (sing) Throw(SingularException(*this)); int i, j, ii = nrows; // ii initialised : B might be all zeros diff --git a/src/util/ossimChipperUtil.cpp b/src/util/ossimChipperUtil.cpp index 99036c5..b38913d 100644 --- a/src/util/ossimChipperUtil.cpp +++ b/src/util/ossimChipperUtil.cpp @@ -2327,62 +2327,76 @@ void ossimChipperUtil::createIdentityProjection() if ( m_geom.valid() ) { - // Get the image projection. - ossimRefPtr<ossimProjection> proj = m_geom->getProjection(); - if ( proj.valid() ) + ossim_float64 rotation = 0.0; + + if ( upIsUp() ) { - ossim_float64 rotation = 0.0; - if ( upIsUp() ) + ossimRefPtr<ossimProjection> proj = m_geom->getProjection(); + if ( proj.valid() ) { rotation = m_geom->upIsUpAngle(); } - else if ( northUp() ) - { - rotation = m_geom->northUpAngle(); - } - else if ( hasRotation() ) + else { - rotation = getRotation(); + ossimNotify(ossimNotifyLevel_WARN) + << "WARNING: No projection to compute the up is up angle!" << std::endl; } - - if ( ossim::isnan( rotation ) ) + } + else if ( northUp() ) + { + ossimRefPtr<ossimProjection> proj = m_geom->getProjection(); + if ( proj.valid() ) { - rotation = 0.0; + rotation = m_geom->northUpAngle(); } - - ossimDpt imageSpaceScale; - getImageSpaceScale( imageSpaceScale ); - - ossimDrect rect; - m_geom->getBoundingRect(rect); - ossimDpt midPt = rect.midPoint(); - - if ( traceDebug() ) + else { - ossimNotify(ossimNotifyLevel_DEBUG) - << MODULE - << "\nAffine transform parameters:" - << "\nrotation: " << rotation - << "\nmid point: " << midPt << std::endl; + ossimNotify(ossimNotifyLevel_WARN) + << "WARNING: No projection to compute the North up angle!" << std::endl; } + } + else if ( hasRotation() ) + { + rotation = getRotation(); + } - m_ivt = new ossimImageViewAffineTransform(-rotation, - imageSpaceScale.x, // image space scale x - imageSpaceScale.y, // image space scale y - 1.0,1.0, //scale x and y - 0.0, 0.0, // translate x,y - midPt.x, midPt.y); // pivot point - - if ( m_kwl->hasKey( METERS_KW ) || - m_kwl->hasKey( DEGREES_X_KW ) || - m_kwl->hasKey( RRDS_KW ) ) - { - // Set the image view transform scale. - initializeIvtScale(); - } + if ( ossim::isnan( rotation ) ) + { + rotation = 0.0; + } - resampler->setImageViewTransform( m_ivt.get() ); + ossimDpt imageSpaceScale; + getImageSpaceScale( imageSpaceScale ); + + ossimDrect rect; + m_geom->getBoundingRect(rect); + ossimDpt midPt = rect.midPoint(); + + if ( traceDebug() ) + { + ossimNotify(ossimNotifyLevel_DEBUG) + << MODULE + << "\nAffine transform parameters:" + << "\nrotation: " << rotation + << "\nmid point: " << midPt << std::endl; } + + m_ivt = new ossimImageViewAffineTransform(-rotation, + imageSpaceScale.x, // image space scale x + imageSpaceScale.y, // image space scale y + 1.0,1.0, //scale x and y + 0.0, 0.0, // translate x,y + midPt.x, midPt.y); // pivot point + + if ( m_kwl->hasKey( METERS_KW ) || + m_kwl->hasKey( DEGREES_X_KW ) || + m_kwl->hasKey( RRDS_KW ) ) + { + // Set the image view transform scale. + initializeIvtScale(); + } + + resampler->setImageViewTransform( m_ivt.get() ); } // Matches: if ( m_geom.valid() ) @@ -4637,13 +4651,6 @@ void ossimChipperUtil::getAreaOfInterest(ossimImageSource* source, ossimIrect& r } } - // If no user defined rect set to scene bounding rect. - if ( rect.hasNans() ) - { - // Get the rectangle from the input chain: - rect = source->getBoundingRect(0); - } - } // if ( m_getOutputGeometry.valid() ) else { @@ -4660,6 +4667,13 @@ void ossimChipperUtil::getAreaOfInterest(ossimImageSource* source, ossimIrect& r throw( ossimException(errMsg) ); } + // If no user defined rect set to scene bounding rect. + if ( rect.hasNans() ) + { + // Get the rectangle from the input chain: + rect = source->getBoundingRect(0); + } + } // if ( rect.hasNans() ) } // if ( source ) -- Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-grass/ossim.git _______________________________________________ Pkg-grass-devel mailing list Pkg-grass-devel@lists.alioth.debian.org http://lists.alioth.debian.org/cgi-bin/mailman/listinfo/pkg-grass-devel