Commit 596afaf0 authored by Julien Michel's avatar Julien Michel

ENH: Make VectorDataIO dependency to IOKML optional and isolate KMZ app in a dedicated module

parent 0ff690ec
...@@ -12,7 +12,6 @@ set(OTBAppImageUtils_LINK_LIBS ...@@ -12,7 +12,6 @@ set(OTBAppImageUtils_LINK_LIBS
${OTBMathParser_LIBRARIES} ${OTBMathParser_LIBRARIES}
${OTBCommon_LIBRARIES} ${OTBCommon_LIBRARIES}
${OTBInterpolation_LIBRARIES} ${OTBInterpolation_LIBRARIES}
${OTBKMZWriter_LIBRARIES}
${OTBOSSIMAdapters_LIBRARIES} ${OTBOSSIMAdapters_LIBRARIES}
${OTBObjectList_LIBRARIES} ${OTBObjectList_LIBRARIES}
) )
...@@ -87,11 +86,6 @@ otb_create_application( ...@@ -87,11 +86,6 @@ otb_create_application(
SOURCES otbColorMapping.cxx SOURCES otbColorMapping.cxx
LINK_LIBRARIES ${${otb-module}_LIBRARIES}) LINK_LIBRARIES ${${otb-module}_LIBRARIES})
otb_create_application(
NAME KmzExport
SOURCES otbKmzExport.cxx
LINK_LIBRARIES ${${otb-module}_LIBRARIES})
otb_create_application( otb_create_application(
NAME CompareImages NAME CompareImages
SOURCES otbCompareImages.cxx SOURCES otbCompareImages.cxx
......
...@@ -10,7 +10,6 @@ otb_module(OTBAppImageUtils ...@@ -10,7 +10,6 @@ otb_module(OTBAppImageUtils
OTBITK OTBITK
OTBImageBase OTBImageBase
OTBImageManipulation OTBImageManipulation
OTBKMZWriter
OTBMathParser OTBMathParser
OTBMathParserX OTBMathParserX
OTBOSSIMAdapters OTBOSSIMAdapters
......
...@@ -342,27 +342,6 @@ OTB_TEST_APPLICATION(NAME apTvClLabeledImageColorMappingQB123_1 ...@@ -342,27 +342,6 @@ OTB_TEST_APPLICATION(NAME apTvClLabeledImageColorMappingQB123_1
${OTBAPP_BASELINE}/clLabeledFancyImageQB123_1.tif ${OTBAPP_BASELINE}/clLabeledFancyImageQB123_1.tif
${TEMP}/clLabeledFancyImageQB123_1.tif) ${TEMP}/clLabeledFancyImageQB123_1.tif)
#----------- KmzExport TESTS ----------------
otb_test_application(NAME apTvUtKmzExport
APP KmzExport
OPTIONS -in ${INPUTDATA}/qb_RoadExtract.img
-out ${TEMP}/apTvUtKmzExport.kmz
-logo ${INPUTDATA}/cnes.png
-legend ${INPUTDATA}/otb_big.png
-elev.dem ${INPUTDATA}/DEM/srtm_directory)
otb_test_application(NAME apTvUtKmzExport1Band
APP KmzExport
OPTIONS #-in /media/otbnas/public/Data/Saterre/data/cumulLAI.tif
-in ${INPUTDATA}/QB_PAN_ROI_1000_100.tif
-out ${TEMP}/apTvUtKmzExport1Band.kmz
-logo ${INPUTDATA}/cnes.png
-legend ${INPUTDATA}/otb_big.png
-elev.dem ${INPUTDATA}/DEM/srtm_directory
-tilesize 50) # needed to see the bug mantis #773
set_property(TEST apTvUtKmzExport1Band PROPERTY RESOURCE_LOCK kmz_tmp_dir)
#----------- CompareImages TESTS ---------------- #----------- CompareImages TESTS ----------------
otb_test_application(NAME apTvUtCompareImagesNoROI otb_test_application(NAME apTvUtCompareImagesNoROI
APP CompareImages APP CompareImages
......
project(OTBAppKMZ)
otb_module_impl()
set(OTBAppImageUtils_LINK_LIBS
${OTBKMZWriter_LIBRARIES}
)
otb_create_application(
NAME KmzExport
SOURCES otbKmzExport.cxx
LINK_LIBRARIES ${${otb-module}_LIBRARIES})
set(DOCUMENTATION "KMZ generation related applications.")
otb_module(OTBAppKMZ
DEPENDS
OTBApplicationEngine
OTBKMZWriter
TEST_DEPENDS
OTBCommandLine
OTBTestKernel
DESCRIPTION
"${DOCUMENTATION}"
)
otb_module_test()
#----------- KmzExport TESTS ----------------
otb_test_application(NAME apTvUtKmzExport
APP KmzExport
OPTIONS -in ${INPUTDATA}/qb_RoadExtract.img
-out ${TEMP}/apTvUtKmzExport.kmz
-logo ${INPUTDATA}/cnes.png
-legend ${INPUTDATA}/otb_big.png
-elev.dem ${INPUTDATA}/DEM/srtm_directory)
otb_test_application(NAME apTvUtKmzExport1Band
APP KmzExport
OPTIONS #-in /media/otbnas/public/Data/Saterre/data/cumulLAI.tif
-in ${INPUTDATA}/QB_PAN_ROI_1000_100.tif
-out ${TEMP}/apTvUtKmzExport1Band.kmz
-logo ${INPUTDATA}/cnes.png
-legend ${INPUTDATA}/otb_big.png
-elev.dem ${INPUTDATA}/DEM/srtm_directory
-tilesize 50) # needed to see the bug mantis #773
set_property(TEST apTvUtKmzExport1Band PROPERTY RESOURCE_LOCK kmz_tmp_dir)
...@@ -8,9 +8,11 @@ otb_module(OTBVectorDataIO ...@@ -8,9 +8,11 @@ otb_module(OTBVectorDataIO
OTBIOGDAL OTBIOGDAL
OTBITK OTBITK
OTBVectorDataManipulation OTBVectorDataManipulation
OTBIOKML
OTBCommon OTBCommon
OPTIONAL_DEPENDS
OTBIOKML
TEST_DEPENDS TEST_DEPENDS
OTBTestKernel OTBTestKernel
OTBOSSIMAdapters OTBOSSIMAdapters
......
...@@ -18,7 +18,10 @@ ...@@ -18,7 +18,10 @@
#include "otbVectorDataIOFactory.h" #include "otbVectorDataIOFactory.h"
#include "otbOGRVectorDataIOFactory.h" #include "otbOGRVectorDataIOFactory.h"
#ifdef OTB_USE_LIBKML
#include "otbKMLVectorDataIOFactory.h" #include "otbKMLVectorDataIOFactory.h"
#endif
#include "itkObjectFactoryBase.h" #include "itkObjectFactoryBase.h"
#include "itkMutexLock.h" #include "itkMutexLock.h"
#include "itkMutexLockHolder.h" #include "itkMutexLockHolder.h"
...@@ -88,7 +91,9 @@ VectorDataIOFactory ...@@ -88,7 +91,9 @@ VectorDataIOFactory
if (firstTime) if (firstTime)
{ {
itk::ObjectFactoryBase::RegisterFactory(OGRVectorDataIOFactory::New()); itk::ObjectFactoryBase::RegisterFactory(OGRVectorDataIOFactory::New());
#ifdef OTB_USE_LIBKML
itk::ObjectFactoryBase::RegisterFactory(KMLVectorDataIOFactory::New()); itk::ObjectFactoryBase::RegisterFactory(KMLVectorDataIOFactory::New());
#endif
firstTime = false; firstTime = false;
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment