Skip to content
Snippets Groups Projects
Commit 596afaf0 authored by Julien Michel's avatar Julien Michel
Browse files

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

parent 0ff690ec
No related branches found
No related tags found
No related merge requests found
......@@ -12,7 +12,6 @@ set(OTBAppImageUtils_LINK_LIBS
${OTBMathParser_LIBRARIES}
${OTBCommon_LIBRARIES}
${OTBInterpolation_LIBRARIES}
${OTBKMZWriter_LIBRARIES}
${OTBOSSIMAdapters_LIBRARIES}
${OTBObjectList_LIBRARIES}
)
......@@ -87,11 +86,6 @@ otb_create_application(
SOURCES otbColorMapping.cxx
LINK_LIBRARIES ${${otb-module}_LIBRARIES})
otb_create_application(
NAME KmzExport
SOURCES otbKmzExport.cxx
LINK_LIBRARIES ${${otb-module}_LIBRARIES})
otb_create_application(
NAME CompareImages
SOURCES otbCompareImages.cxx
......
......@@ -10,7 +10,6 @@ otb_module(OTBAppImageUtils
OTBITK
OTBImageBase
OTBImageManipulation
OTBKMZWriter
OTBMathParser
OTBMathParserX
OTBOSSIMAdapters
......
......@@ -342,27 +342,6 @@ OTB_TEST_APPLICATION(NAME apTvClLabeledImageColorMappingQB123_1
${OTBAPP_BASELINE}/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 ----------------
otb_test_application(NAME apTvUtCompareImagesNoROI
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
OTBIOGDAL
OTBITK
OTBVectorDataManipulation
OTBIOKML
OTBCommon
OPTIONAL_DEPENDS
OTBIOKML
TEST_DEPENDS
OTBTestKernel
OTBOSSIMAdapters
......
......@@ -18,7 +18,10 @@
#include "otbVectorDataIOFactory.h"
#include "otbOGRVectorDataIOFactory.h"
#ifdef OTB_USE_LIBKML
#include "otbKMLVectorDataIOFactory.h"
#endif
#include "itkObjectFactoryBase.h"
#include "itkMutexLock.h"
#include "itkMutexLockHolder.h"
......@@ -88,7 +91,9 @@ VectorDataIOFactory
if (firstTime)
{
itk::ObjectFactoryBase::RegisterFactory(OGRVectorDataIOFactory::New());
#ifdef OTB_USE_LIBKML
itk::ObjectFactoryBase::RegisterFactory(KMLVectorDataIOFactory::New());
#endif
firstTime = false;
}
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment