Skip to content
Commits on Source (5)
......@@ -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")
......@@ -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)
......
ossim (2.2.1-1) unstable; urgency=medium
* Team upload.
* New upstream release.
* Bump Standards-Version to 4.1.3, no changes.
-- Bas Couwenberg <sebastic@debian.org> Tue, 09 Jan 2018 18:37:52 +0100
ossim (2.2.0-1) unstable; urgency=medium
* Team upload.
......
......@@ -14,7 +14,7 @@ Build-Depends: cmake (>= 2.8),
libpng-dev,
libtiff-dev,
zlib1g-dev
Standards-Version: 4.1.2
Standards-Version: 4.1.3
Vcs-Browser: https://anonscm.debian.org/cgit/pkg-grass/ossim.git
Vcs-Git: https://anonscm.debian.org/git/pkg-grass/ossim.git
Homepage: https://trac.osgeo.org/ossim/
......
......@@ -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())
......
......@@ -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
......
......@@ -2326,20 +2326,35 @@ void ossimChipperUtil::createIdentityProjection()
m_geom = ih->getImageGeometry();
if ( m_geom.valid() )
{
// Get the image projection.
ossimRefPtr<ossimProjection> proj = m_geom->getProjection();
if ( proj.valid() )
{
ossim_float64 rotation = 0.0;
if ( upIsUp() )
{
ossimRefPtr<ossimProjection> proj = m_geom->getProjection();
if ( proj.valid() )
{
rotation = m_geom->upIsUpAngle();
}
else
{
ossimNotify(ossimNotifyLevel_WARN)
<< "WARNING: No projection to compute the up is up angle!" << std::endl;
}
}
else if ( northUp() )
{
ossimRefPtr<ossimProjection> proj = m_geom->getProjection();
if ( proj.valid() )
{
rotation = m_geom->northUpAngle();
}
else
{
ossimNotify(ossimNotifyLevel_WARN)
<< "WARNING: No projection to compute the North up angle!" << std::endl;
}
}
else if ( hasRotation() )
{
rotation = getRotation();
......@@ -2382,7 +2397,6 @@ void ossimChipperUtil::createIdentityProjection()
}
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 )
......