Skip to content
Permalink
Browse files

Update otb processing maintenance files to version 5.6.0

(cherry picked from commit d772a68)
  • Loading branch information
grizonnetm authored and alexbruy committed May 24, 2017
1 parent 81a5394 commit 48da656c5e569485badd5de4a0c8c33e4f88bfa2
@@ -3,7 +3,14 @@ FILE(GLOB HELPER_FILES helper/*.py)
FILE(GLOB DESCR_FILES description/5.0.0/*.xml)
FiLE(GLOB HELP_FILES description/5.0.0/doc/*.html)

FILE(GLOB DESCR_FILES description/5.6.0/*.xml)
FiLE(GLOB HELP_FILES description/5.6.0/doc/*.html)

PLUGIN_INSTALL(processing ./algs/otb ${PY_FILES})
PLUGIN_INSTALL(processing ./algs/otb/helper ${HELPER_FILES})

PLUGIN_INSTALL(processing ./algs/otb/description/5.0.0 ${DESCR_FILES})
PLUGIN_INSTALL(processing ./algs/otb/description/5.0.0/doc ${HELP_FILES})

PLUGIN_INSTALL(processing ./algs/otb/description/5.6.0 ${DESCR_FILES})
PLUGIN_INSTALL(processing ./algs/otb/description/5.6.0/doc ${HELP_FILES})
@@ -142,7 +142,7 @@ def getInstalledVersion(runOtb=False):


def compatibleDescriptionPath(version):
supportedVersions = {"5.0.0": "5.0.0"}
supportedVersions = {"5.0.0": "5.0.0", "5.6.0": "5.6.0"}
if version is None:
return None
if version not in supportedVersions:
@@ -608,7 +608,7 @@ def list_reader(file_name, version):
def get_otb_version():
#TODO Find a way to retrieve installed otb version, force exception and parse otb-X.XX.X ?
# return "3.18"
return "5.0"
return "5.6"


def get_white_list():
@@ -716,5 +716,16 @@ def create_html_description():
create_xml_descriptors()
create_html_description()

#Check if some application are not listed in the white/black list
logger = get_OTB_log()
white_list = get_white_list()
black_list = get_black_list()
for available_app in otbApplication.Registry.GetAvailableApplications():
try:
if available_app not in white_list and available_app not in black_list:
logger.error("Application " + available_app + " is not listed in white_list.xml or black_list.xml. Need to be fix.")
except Exception:
logger.error(traceback.format_exc())

# Exit applications
QgsApplication.exitQgis()
@@ -480,6 +480,36 @@ def getTrainImagesClassifier(available_app, original_dom_document):
the_list.append(split[key])
return the_list

def getTrainRegression(available_app, original_dom_document):
"""
Split by classifier (ann, dt, gbt, knn, libsvm, rf)
Delete GEOID and DEM parameter as they are not updated at the creation of the otb algorithms when you launch QGIS.
The values are picked from the settings.
"""
the_root = original_dom_document
deleteGeoidSrtm(the_root)
split = split_by_choice(the_root, 'classifier')
the_list = []
for key in split:
defaultWrite('%s-%s' % (available_app, key), split[key])
the_list.append(split[key])
return the_list

def getTrainVectorClassifier(available_app, original_dom_document):
"""
Split by classifier (ann, dt, gbt, knn, libsvm, rf)
Delete GEOID and DEM parameter as they are not updated at the creation of the otb algorithms when you launch QGIS.
The values are picked from the settings.
"""
the_root = original_dom_document
deleteGeoidSrtm(the_root)
split = split_by_choice(the_root, 'classifier')
the_list = []
for key in split:
defaultWrite('%s-%s' % (available_app, key), split[key])
the_list.append(split[key])
return the_list


def getLineSegmentDetection(available_app, original_dom_document):
"""
@@ -98,4 +98,34 @@
<app_name>BlockMatching</app_name>
<app_name>SplitImage</app_name>
</version>
<version id="5.6">
<app_name>ApplicationExample</app_name>
<app_name>SarRadiometricCalibration</app_name>
<app_name>SARPolarMatrixConvert</app_name>
<app_name>PixelValue</app_name>
<app_name>Quicklook</app_name>
<app_name>ConvertCartoToGeoPoint</app_name>
<app_name>ConvertSensorToGeoPoint</app_name>
<app_name>ObtainUTMZoneFromGeoPoint</app_name>
<app_name>BundleToPerfectSensor</app_name>
<app_name>DSFuzzyModelEstimation</app_name>
<app_name>HomologousPointsExtraction</app_name>
<app_name>VectorDataDSValidation</app_name>
<app_name>GenerateRPCSensorModel</app_name>
<app_name>GridBasedImageResampling</app_name>
<app_name>GeneratePlyFile</app_name>
<app_name>RefineSensorModel</app_name>
<app_name>MultiResolutionPyramid</app_name>
<app_name>HyperspectralUnmixing</app_name>
<app_name>OSMDownloader</app_name>
<app_name>VertexComponentAnalysis</app_name>
<app_name>VectorDataSetField</app_name>
<app_name>DownloadSRTMTiles</app_name>
<app_name>DisparityMapToElevationMap</app_name>
<app_name>FineRegistration</app_name>
<app_name>StereoRectificationGridGenerator</app_name>
<app_name>BlockMatching</app_name>
<app_name>SplitImage</app_name>
<app_name>TestApplication</app_name>
</version>
</data>
@@ -128,7 +128,65 @@
<app_name>ColorMapping</app_name>
<app_name>ComputeConfusionMatrix</app_name>
<app_name>ComputeImagesStatistics</app_name>
<app_name>ComputeModulusAndPhase</app_name>
<app_name>ComputeModulusAndPhase</app_name>
<app_name>ComputeOGRLayersFeaturesStatistics</app_name>
<app_name>ComputePolylineFeatureFromImage</app_name>
<app_name>ConcatenateImages</app_name>
<app_name>ConcatenateVectorData</app_name>
<app_name>ConnectedComponentSegmentation</app_name>
<app_name>Convert</app_name>
<app_name>DEMConvert</app_name>
<app_name>Despeckle</app_name>
<app_name>DimensionalityReduction</app_name>
<app_name>ExtractROI</app_name>
<app_name>EdgeExtraction</app_name>
<app_name>FusionOfClassifications</app_name>
<app_name>GrayScaleMorphologicalOperation</app_name>
<app_name>HaralickTextureExtraction</app_name>
<app_name>HooverCompareSegmentation</app_name>
<app_name>ImageClassifier</app_name>
<app_name>ImageEnvelope</app_name>
<app_name>KMeansClassification</app_name>
<app_name>KmzExport</app_name>
<app_name>LineSegmentDetection</app_name>
<app_name>LSMSSegmentation</app_name>
<app_name>LSMSSmallRegionsMerging</app_name>
<app_name>LSMSVectorization</app_name>
<app_name>LocalStatisticExtraction</app_name>
<app_name>MeanShiftSmoothing</app_name>
<app_name>MultivariateAlterationDetector</app_name>
<app_name>OGRLayerClassifier</app_name>
<app_name>OpticalCalibration</app_name>
<app_name>OrthoRectification</app_name>
<app_name>Pansharpening</app_name>
<app_name>RadiometricIndices</app_name>
<app_name>Rasterization</app_name>
<app_name>ReadImageInfo</app_name>
<app_name>Rescale</app_name>
<app_name>RigidTransformResample</app_name>
<app_name>Segmentation</app_name>
<app_name>SFSTextureExtraction</app_name>
<app_name>Smoothing</app_name>
<app_name>SOMClassification</app_name>
<app_name>Superimpose</app_name>
<app_name>StereoFramework</app_name>
<app_name>TileFusion</app_name>
<app_name>TrainImagesClassifier</app_name>
<app_name>TrainOGRLayersClassifier</app_name>
<app_name>VectorDataTransform</app_name>
<app_name>VectorDataReprojection</app_name>
<app_name>VectorDataExtractROI</app_name>
</version>
<version id="5.6">
<app_name>BandMath</app_name>
<app_name>BandMathX</app_name>
<app_name>BinaryMorphologicalOperation</app_name>
<app_name>ClassificationMapRegularization</app_name>
<app_name>CompareImages</app_name>
<app_name>ColorMapping</app_name>
<app_name>ComputeConfusionMatrix</app_name>
<app_name>ComputeImagesStatistics</app_name>
<app_name>ComputeModulusAndPhase</app_name>
<app_name>ComputeOGRLayersFeaturesStatistics</app_name>
<app_name>ComputePolylineFeatureFromImage</app_name>
<app_name>ConcatenateImages</app_name>
@@ -154,16 +212,24 @@
<app_name>LSMSVectorization</app_name>
<app_name>LocalStatisticExtraction</app_name>
<app_name>MeanShiftSmoothing</app_name>
<app_name>ManageNoData</app_name>
<app_name>MultivariateAlterationDetector</app_name>
<app_name>OGRLayerClassifier</app_name>
<app_name>OpticalCalibration</app_name>
<app_name>OrthoRectification</app_name>
<app_name>Pansharpening</app_name>
<app_name>PolygonClassStatistics</app_name>
<app_name>PredictRegression</app_name>
<app_name>RadiometricIndices</app_name>
<app_name>Rasterization</app_name>
<app_name>ReadImageInfo</app_name>
<app_name>Rescale</app_name>
<app_name>RigidTransformResample</app_name>
<app_name>SARCalibration</app_name>
<app_name>SARDecompositions</app_name>
<app_name>SARPolarSynth</app_name>
<app_name>SampleExtraction</app_name>
<app_name>SampleSelection</app_name>
<app_name>Segmentation</app_name>
<app_name>SFSTextureExtraction</app_name>
<app_name>Smoothing</app_name>
@@ -173,6 +239,8 @@
<app_name>TileFusion</app_name>
<app_name>TrainImagesClassifier</app_name>
<app_name>TrainOGRLayersClassifier</app_name>
<app_name>TrainVectorClassifier</app_name>
<app_name>TrainRegression</app_name>
<app_name>VectorDataTransform</app_name>
<app_name>VectorDataReprojection</app_name>
<app_name>VectorDataExtractROI</app_name>

0 comments on commit 48da656

Please sign in to comment.