diff --git a/CI/deploy.sh b/CI/deploy.sh index f05f5ebd04fd8bd612025a7e530115d27e5e9245..9232c69b7c4847962134ba2edbee9442778ad666 100755 --- a/CI/deploy.sh +++ b/CI/deploy.sh @@ -47,11 +47,29 @@ else # On release ssh otbpush@otb5-vm2.orfeo-toolbox.org rm -rf ${jobs_directory}/* fi + + + +# Remove old package and source file +echo "Removing old package and sources" +ssh otbpush@otb5-vm2.orfeo-toolbox.org \ +rm ${jobs_directory}/OTB-*.zip \ +${jobs_directory}/OTB-*.tar.* # Push package -echo "Pushing binary packages" +echo "Pushing new binary and sources packages" scp OTB-*.{run,zip} otbpush@otb5-vm2.orfeo-toolbox.org:${jobs_directory}/. + + +echo "Removing old CookBook" +ssh otbpush@otb5-vm2.orfeo-toolbox.org \ +rm ${jobs_directory}/CookBook-*-html.tar.gz + +echo "Removing old Doxygen" +ssh otbpush@otb5-vm2.orfeo-toolbox.org \ +rm ${jobs_directory}/OTB-Doxygen-*.tar.bz2 + # Push doc -echo "Pushing documentation" +echo "Pushing new documentation" scp {CookBook-*-html.tar.gz,OTB-Doxygen-*.tar.bz2} otbpush@otb5-vm2.orfeo-toolbox.org:${jobs_directory}/. # Create zip, tar.gz and tar.xy source @@ -59,11 +77,12 @@ echo "Creating source tarball and zip" git archive --format=zip -o OTB-sources-"$CI_COMMIT_SHORT_SHA".zip HEAD git archive --format=tgz -o OTB-sources-"$CI_COMMIT_SHORT_SHA".tar.gz HEAD git archive --format=tar.xz -o OTB-sources-"$CI_COMMIT_SHORT_SHA".tar.xz HEAD + # Remove old source file -echo "Removing old sources" -ssh otbpush@otb5-vm2.orfeo-toolbox.org \ -rm ${jobs_directory}/OTB-sources-*.zip \ -${jobs_directory}/OTB-sources-*.tar.* +#echo "Removing old sources" +#ssh otbpush@otb5-vm2.orfeo-toolbox.org \ +#rm ${jobs_directory}/OTB-sources-*.zip \ +#${jobs_directory}/OTB-sources-*.tar.* # Push new source file echo "Pushing new sources" diff --git a/CMake/GetVersionFromGitTag.cmake b/CMake/GetVersionFromGitTag.cmake index 374f05997c06f891898fddb78ab02c661c057034..0b6c5804d2456184a6b5ea34c85f89277c8fffae 100644 --- a/CMake/GetVersionFromGitTag.cmake +++ b/CMake/GetVersionFromGitTag.cmake @@ -116,7 +116,7 @@ function(get_package_name root_repo_dir project project_version_string) message(STATUS "M: ${_VERSION_MAJOR}, m: ${_VERSION_MINOR}, p: ${_VERSION_PATCH}") - set(${project_version_string} "${PROJECT_VERSION_STRING}" PARENT_SCOPE) + set(${project_version_string} "${PROJECT_VERSION_STRING}" PARENT_SCOPE) endif() diff --git a/Data/Baseline/OTB/Files/ioTuImageMetadataAppendTest.txt b/Data/Baseline/OTB/Files/ioTuImageMetadataAppendTest.txt new file mode 100644 index 0000000000000000000000000000000000000000..afcaf94e771bae1622b1842445e02b7ea51cce18 --- /dev/null +++ b/Data/Baseline/OTB/Files/ioTuImageMetadataAppendTest.txt @@ -0,0 +1,24 @@ +SensorID PHR +ProductionDate 2009-08-10T10:30:08.142149Z +ProjectionWKT UTM projRef +Extra.Comment Test Extrakeys +BandName B0 +NoData -10000 +PhysicalGain 2 +PhysicalBias 1 +BandName B1 +NoData -10000 +PhysicalGain 3 +PhysicalBias 2 +BandName B0 +NoData -10000 +PhysicalGain 2 +PhysicalBias 1 +BandName B1 +NoData -10000 +PhysicalGain 3 +PhysicalBias 2 +BandName B2 +NoData -10000 +PhysicalGain 4 +PhysicalBias 3 diff --git a/Data/Baseline/OTB/Files/ioTuImageMetadataCompactTest.txt b/Data/Baseline/OTB/Files/ioTuImageMetadataCompactTest.txt new file mode 100644 index 0000000000000000000000000000000000000000..3e902ef18d7e9bfd3b8b37c613738c602dce0b4f --- /dev/null +++ b/Data/Baseline/OTB/Files/ioTuImageMetadataCompactTest.txt @@ -0,0 +1,17 @@ +SensorID PHR +Polarization Polarization +NoData -10000 +AcquisitionDate 2009-08-05T20:34:38.236478Z +ProductionDate 2009-08-10T10:30:08.142149Z +ProjectionWKT UTM projRef +Extra.Comment Test Extrakeys +Extra.Information Very important +BandName B0 +PhysicalGain 2 +PhysicalBias 1 +BandName B1 +PhysicalGain 3 +PhysicalBias 2 +BandName B2 +PhysicalGain 4 +PhysicalBias 3 diff --git a/Data/Baseline/OTB/Files/ioTuImageMetadataMergeTest.txt b/Data/Baseline/OTB/Files/ioTuImageMetadataMergeTest.txt new file mode 100644 index 0000000000000000000000000000000000000000..39d5c3a6db32f3071a4de1df1a512eacf4c0ee46 --- /dev/null +++ b/Data/Baseline/OTB/Files/ioTuImageMetadataMergeTest.txt @@ -0,0 +1,14 @@ +SensorID SPOT +Polarization Polarization +ProductionDate 2009-08-10T10:30:08.142149Z +ProjectionWKT UTM projRef +Extra.Comment Test Extrakeys +BandName B0 +NoData -10000 +PhysicalGain 2 +PhysicalBias 1 +BandName B1 +NoData -10000 +PhysicalGain 3 +PhysicalBias 2 +SunAzimuth 20 diff --git a/Data/Baseline/OTB/Files/ioTuImageMetadataSliceTest.txt b/Data/Baseline/OTB/Files/ioTuImageMetadataSliceTest.txt new file mode 100644 index 0000000000000000000000000000000000000000..080d58c0b6e2bfa4583fd570e378af271a2ed33d --- /dev/null +++ b/Data/Baseline/OTB/Files/ioTuImageMetadataSliceTest.txt @@ -0,0 +1,12 @@ +SensorID PHR +ProductionDate 2009-08-10T10:30:08.142149Z +ProjectionWKT UTM projRef +Extra.Comment Test Extrakeys +BandName B0 +NoData -10000 +PhysicalGain 2 +PhysicalBias 1 +BandName B1 +NoData -10000 +PhysicalGain 3 +PhysicalBias 2 diff --git a/Data/Baseline/OTB/Files/ioTuImageMetadataToFromKeywordlistTest.txt b/Data/Baseline/OTB/Files/ioTuImageMetadataToFromKeywordlistTest.txt new file mode 100644 index 0000000000000000000000000000000000000000..dac34793037126682a1feadb9adb30589a2736a2 --- /dev/null +++ b/Data/Baseline/OTB/Files/ioTuImageMetadataToFromKeywordlistTest.txt @@ -0,0 +1,22 @@ +SensorID PHR +ProductionDate 2009-08-10T10:30:08.142149Z +ProjectionWKT UTM projRef +ProjectionEPSG 4326 +ProjectionProj +proj=longlat +datum=WGS84 +no_defs +SpectralSensitivity LUT1D.DIM0.SIZE = 3 +LUT1D.DIM0.ORIGIN = 0 +LUT1D.DIM0.SPACING = 1 +LUT1D.ARRAY = 1 2 3 +Extra.Comment Test Extrakeys +BandName B0 +NoData -10000 +PhysicalGain 2 +PhysicalBias 1 +BandName B1 +NoData -10000 +PhysicalGain 3 +PhysicalBias 2 +BandName B2 +NoData -10000 +PhysicalGain 4 +PhysicalBias 3 diff --git a/Data/Baseline/OTB/Files/ioTuMetaDataKeyTest.txt b/Data/Baseline/OTB/Files/ioTuMetaDataKeyTest.txt new file mode 100644 index 0000000000000000000000000000000000000000..4135f61fa7b7d1a436256d0ff8c5d6c4f2e7c51a --- /dev/null +++ b/Data/Baseline/OTB/Files/ioTuMetaDataKeyTest.txt @@ -0,0 +1,4 @@ +mytime : 2009-08-10T10:30:08.142149Z +First try size: 608 +Second try size: 312 +Third try size: 312 diff --git a/Data/Baseline/OTB/Files/ioTuotbXMLMetadataSupplierTest.txt b/Data/Baseline/OTB/Files/ioTuotbXMLMetadataSupplierTest.txt new file mode 100644 index 0000000000000000000000000000000000000000..96245d9b9794caae9daab209836c525df65d36f8 --- /dev/null +++ b/Data/Baseline/OTB/Files/ioTuotbXMLMetadataSupplierTest.txt @@ -0,0 +1,3 @@ +OrthoRectification +Output Cartographic Map Projection + diff --git a/Data/Baseline/OTB/Files/ioTvImageMetadataInterfaceTest_Sentinel1.txt b/Data/Baseline/OTB/Files/ioTvImageMetadataInterfaceTest_Sentinel1.txt new file mode 100644 index 0000000000000000000000000000000000000000..9a64c99a38abb4887b3839d74424e27607575919 --- /dev/null +++ b/Data/Baseline/OTB/Files/ioTvImageMetadataInterfaceTest_Sentinel1.txt @@ -0,0 +1,957 @@ +SensorID SAR +Mission S1A +Instrument SENTINEL-1 +ProductType SLC +Mode S6 +Swath S6 +OrbitDirection ASCENDING +BeamMode SM +BeamSwath S6 +TileHintX 17663 +TileHintY 1 +DataType 11 +OrbitNumber 6447 +NumberOfLines 31106 +NumberOfColumns 17663 +AverageSceneHeight 19 +CalScale 1 +PRF 1663.48 +RadarFrequency 5.405e+09 +CenterIncidenceAngle 44.7171 +LineSpacing 4.08568 +PixelSpacing 3.19483 +AcquisitionDate 2015-06-19T19:50:43.223221Z +ProductionDate 2015-06-20T01:51:06.838854Z +AcquisitionStartTime 2015-06-19T19:50:43.223221Z +AcquisitionStopTime 2015-06-19T19:51:01.921994Z +GCP <GCPParam> +Extra.FACILITY_IDENTIFIER UPA_ +Polarization VV +Swath S6 +SAR <SARParam> +{"Projection": "GEOGCS["WGS 84",DATUM["WGS_1984",SPHEROID["WGS 84",6378137,298.257223563,AUTHORITY["EPSG","7030"]],AUTHORITY["EPSG","6326"]],PRIMEM["Greenwich",0,AUTHORITY["EPSG","8901"]],UNIT["degree",0.0174532925199433,AUTHORITY["EPSG","9122"]],AXIS["Latitude",NORTH],AXIS["Longitude",EAST],AUTHORITY["EPSG","4326"]]", +[{"GCP_Id": "1", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "0", "GCP_X": "-24.4551", "GCP_Y": "14.4996", "GCP_Z": "0", }, +{"GCP_Id": "2", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "884", "GCP_X": "-24.4171", "GCP_Y": "14.5067", "GCP_Z": "0", }, +{"GCP_Id": "3", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "1768", "GCP_X": "-24.3793", "GCP_Y": "14.5138", "GCP_Z": "0", }, +{"GCP_Id": "4", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "2652", "GCP_X": "-24.3417", "GCP_Y": "14.5209", "GCP_Z": "0", }, +{"GCP_Id": "5", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "3536", "GCP_X": "-24.3042", "GCP_Y": "14.5279", "GCP_Z": "0", }, +{"GCP_Id": "6", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "4420", "GCP_X": "-24.2668", "GCP_Y": "14.5349", "GCP_Z": "0", }, +{"GCP_Id": "7", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "5304", "GCP_X": "-24.2296", "GCP_Y": "14.5419", "GCP_Z": "0", }, +{"GCP_Id": "8", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "6188", "GCP_X": "-24.1926", "GCP_Y": "14.5488", "GCP_Z": "0", }, +{"GCP_Id": "9", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "7072", "GCP_X": "-24.1556", "GCP_Y": "14.5557", "GCP_Z": "0", }, +{"GCP_Id": "10", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "7956", "GCP_X": "-24.1189", "GCP_Y": "14.5626", "GCP_Z": "0", }, +{"GCP_Id": "11", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "8840", "GCP_X": "-24.0822", "GCP_Y": "14.5694", "GCP_Z": "0", }, +{"GCP_Id": "12", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "9724", "GCP_X": "-24.0457", "GCP_Y": "14.5763", "GCP_Z": "0", }, +{"GCP_Id": "13", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "10608", "GCP_X": "-24.0093", "GCP_Y": "14.583", "GCP_Z": "0", }, +{"GCP_Id": "14", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "11492", "GCP_X": "-23.9731", "GCP_Y": "14.5898", "GCP_Z": "0", }, +{"GCP_Id": "15", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "12376", "GCP_X": "-23.937", "GCP_Y": "14.5965", "GCP_Z": "0", }, +{"GCP_Id": "16", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "13260", "GCP_X": "-23.901", "GCP_Y": "14.6032", "GCP_Z": "0", }, +{"GCP_Id": "17", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "14144", "GCP_X": "-23.8651", "GCP_Y": "14.6098", "GCP_Z": "0", }, +{"GCP_Id": "18", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "15028", "GCP_X": "-23.8293", "GCP_Y": "14.6165", "GCP_Z": "0", }, +{"GCP_Id": "19", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "15912", "GCP_X": "-23.7937", "GCP_Y": "14.6231", "GCP_Z": "0", }, +{"GCP_Id": "20", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "16796", "GCP_X": "-23.7581", "GCP_Y": "14.6297", "GCP_Z": "0", }, +{"GCP_Id": "21", "GCP_Info": "", "GCP_Row": "0", "GCP_Col": "17662", "GCP_X": "-23.7234", "GCP_Y": "14.6361", "GCP_Z": "0", }, +{"GCP_Id": "22", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "0", "GCP_X": "-24.4604", "GCP_Y": "14.5262", "GCP_Z": "0", }, +{"GCP_Id": "23", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "884", "GCP_X": "-24.4224", "GCP_Y": "14.5333", "GCP_Z": "0", }, +{"GCP_Id": "24", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "1768", "GCP_X": "-24.3846", "GCP_Y": "14.5404", "GCP_Z": "0", }, +{"GCP_Id": "25", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "2652", "GCP_X": "-24.3469", "GCP_Y": "14.5475", "GCP_Z": "0", }, +{"GCP_Id": "26", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "3536", "GCP_X": "-24.3094", "GCP_Y": "14.5546", "GCP_Z": "0", }, +{"GCP_Id": "27", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "4420", "GCP_X": "-24.2721", "GCP_Y": "14.5616", "GCP_Z": "0", }, +{"GCP_Id": "28", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "5304", "GCP_X": "-24.2349", "GCP_Y": "14.5685", "GCP_Z": "0", }, +{"GCP_Id": "29", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "6188", "GCP_X": "-24.1978", "GCP_Y": "14.5755", "GCP_Z": "0", }, +{"GCP_Id": "30", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "7072", "GCP_X": "-24.1609", "GCP_Y": "14.5824", "GCP_Z": "0", }, +{"GCP_Id": "31", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "7956", "GCP_X": "-24.1241", "GCP_Y": "14.5892", "GCP_Z": "0", }, +{"GCP_Id": "32", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "8840", "GCP_X": "-24.0875", "GCP_Y": "14.5961", "GCP_Z": "0", }, +{"GCP_Id": "33", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "9724", "GCP_X": "-24.0509", "GCP_Y": "14.6029", "GCP_Z": "0", }, +{"GCP_Id": "34", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "10608", "GCP_X": "-24.0146", "GCP_Y": "14.6097", "GCP_Z": "0", }, +{"GCP_Id": "35", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "11492", "GCP_X": "-23.9783", "GCP_Y": "14.6164", "GCP_Z": "0", }, +{"GCP_Id": "36", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "12376", "GCP_X": "-23.9422", "GCP_Y": "14.6231", "GCP_Z": "0", }, +{"GCP_Id": "37", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "13260", "GCP_X": "-23.9062", "GCP_Y": "14.6298", "GCP_Z": "0", }, +{"GCP_Id": "38", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "14144", "GCP_X": "-23.8703", "GCP_Y": "14.6365", "GCP_Z": "0", }, +{"GCP_Id": "39", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "15028", "GCP_X": "-23.8345", "GCP_Y": "14.6431", "GCP_Z": "0", }, +{"GCP_Id": "40", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "15912", "GCP_X": "-23.7989", "GCP_Y": "14.6497", "GCP_Z": "0", }, +{"GCP_Id": "41", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "16796", "GCP_X": "-23.7633", "GCP_Y": "14.6563", "GCP_Z": "0", }, +{"GCP_Id": "42", "GCP_Info": "", "GCP_Row": "734", "GCP_Col": "17662", "GCP_X": "-23.7286", "GCP_Y": "14.6627", "GCP_Z": "0", }, +{"GCP_Id": "43", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "0", "GCP_X": "-24.4657", "GCP_Y": "14.5528", "GCP_Z": "0", }, +{"GCP_Id": "44", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "884", "GCP_X": "-24.4277", "GCP_Y": "14.56", "GCP_Z": "0", }, +{"GCP_Id": "45", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "1768", "GCP_X": "-24.3899", "GCP_Y": "14.5671", "GCP_Z": "0", }, +{"GCP_Id": "46", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "2652", "GCP_X": "-24.3522", "GCP_Y": "14.5741", "GCP_Z": "0", }, +{"GCP_Id": "47", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "3536", "GCP_X": "-24.3147", "GCP_Y": "14.5812", "GCP_Z": "0", }, +{"GCP_Id": "48", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "4420", "GCP_X": "-24.2773", "GCP_Y": "14.5882", "GCP_Z": "0", }, +{"GCP_Id": "49", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "5304", "GCP_X": "-24.2401", "GCP_Y": "14.5952", "GCP_Z": "0", }, +{"GCP_Id": "50", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "6188", "GCP_X": "-24.2031", "GCP_Y": "14.6021", "GCP_Z": "0", }, +{"GCP_Id": "51", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "7072", "GCP_X": "-24.1661", "GCP_Y": "14.609", "GCP_Z": "0", }, +{"GCP_Id": "52", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "7956", "GCP_X": "-24.1293", "GCP_Y": "14.6159", "GCP_Z": "0", }, +{"GCP_Id": "53", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "8840", "GCP_X": "-24.0927", "GCP_Y": "14.6227", "GCP_Z": "0", }, +{"GCP_Id": "54", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "9724", "GCP_X": "-24.0562", "GCP_Y": "14.6295", "GCP_Z": "0", }, +{"GCP_Id": "55", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "10608", "GCP_X": "-24.0198", "GCP_Y": "14.6363", "GCP_Z": "0", }, +{"GCP_Id": "56", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "11492", "GCP_X": "-23.9835", "GCP_Y": "14.643", "GCP_Z": "0", }, +{"GCP_Id": "57", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "12376", "GCP_X": "-23.9474", "GCP_Y": "14.6497", "GCP_Z": "0", }, +{"GCP_Id": "58", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "13260", "GCP_X": "-23.9114", "GCP_Y": "14.6564", "GCP_Z": "0", }, +{"GCP_Id": "59", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "14144", "GCP_X": "-23.8755", "GCP_Y": "14.6631", "GCP_Z": "0", }, +{"GCP_Id": "60", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "15028", "GCP_X": "-23.8397", "GCP_Y": "14.6697", "GCP_Z": "0", }, +{"GCP_Id": "61", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "15912", "GCP_X": "-23.8041", "GCP_Y": "14.6763", "GCP_Z": "0", }, +{"GCP_Id": "62", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "16796", "GCP_X": "-23.7685", "GCP_Y": "14.6829", "GCP_Z": "0", }, +{"GCP_Id": "63", "GCP_Info": "", "GCP_Row": "1468", "GCP_Col": "17662", "GCP_X": "-23.7338", "GCP_Y": "14.6893", "GCP_Z": "0", }, +{"GCP_Id": "64", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "0", "GCP_X": "-24.471", "GCP_Y": "14.5795", "GCP_Z": "0", }, +{"GCP_Id": "65", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "884", "GCP_X": "-24.433", "GCP_Y": "14.5866", "GCP_Z": "0", }, +{"GCP_Id": "66", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "1768", "GCP_X": "-24.3951", "GCP_Y": "14.5937", "GCP_Z": "0", }, +{"GCP_Id": "67", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "2652", "GCP_X": "-24.3575", "GCP_Y": "14.6008", "GCP_Z": "0", }, +{"GCP_Id": "68", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "3536", "GCP_X": "-24.32", "GCP_Y": "14.6078", "GCP_Z": "0", }, +{"GCP_Id": "69", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "4420", "GCP_X": "-24.2826", "GCP_Y": "14.6148", "GCP_Z": "0", }, +{"GCP_Id": "70", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "5304", "GCP_X": "-24.2454", "GCP_Y": "14.6218", "GCP_Z": "0", }, +{"GCP_Id": "71", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "6188", "GCP_X": "-24.2083", "GCP_Y": "14.6287", "GCP_Z": "0", }, +{"GCP_Id": "72", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "7072", "GCP_X": "-24.1714", "GCP_Y": "14.6356", "GCP_Z": "0", }, +{"GCP_Id": "73", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "7956", "GCP_X": "-24.1346", "GCP_Y": "14.6425", "GCP_Z": "0", }, +{"GCP_Id": "74", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "8840", "GCP_X": "-24.0979", "GCP_Y": "14.6493", "GCP_Z": "0", }, +{"GCP_Id": "75", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "9724", "GCP_X": "-24.0614", "GCP_Y": "14.6561", "GCP_Z": "0", }, +{"GCP_Id": "76", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "10608", "GCP_X": "-24.025", "GCP_Y": "14.6629", "GCP_Z": "0", }, +{"GCP_Id": "77", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "11492", "GCP_X": "-23.9888", "GCP_Y": "14.6696", "GCP_Z": "0", }, +{"GCP_Id": "78", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "12376", "GCP_X": "-23.9526", "GCP_Y": "14.6764", "GCP_Z": "0", }, +{"GCP_Id": "79", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "13260", "GCP_X": "-23.9166", "GCP_Y": "14.683", "GCP_Z": "0", }, +{"GCP_Id": "80", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "14144", "GCP_X": "-23.8807", "GCP_Y": "14.6897", "GCP_Z": "0", }, +{"GCP_Id": "81", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "15028", "GCP_X": "-23.8449", "GCP_Y": "14.6963", "GCP_Z": "0", }, +{"GCP_Id": "82", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "15912", "GCP_X": "-23.8093", "GCP_Y": "14.7029", "GCP_Z": "0", }, +{"GCP_Id": "83", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "16796", "GCP_X": "-23.7737", "GCP_Y": "14.7095", "GCP_Z": "0", }, +{"GCP_Id": "84", "GCP_Info": "", "GCP_Row": "2202", "GCP_Col": "17662", "GCP_X": "-23.739", "GCP_Y": "14.7159", "GCP_Z": "0", }, +{"GCP_Id": "85", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "0", "GCP_X": "-24.4763", "GCP_Y": "14.6061", "GCP_Z": "0", }, +{"GCP_Id": "86", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "884", "GCP_X": "-24.4383", "GCP_Y": "14.6132", "GCP_Z": "0", }, +{"GCP_Id": "87", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "1768", "GCP_X": "-24.4004", "GCP_Y": "14.6203", "GCP_Z": "0", }, +{"GCP_Id": "88", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "2652", "GCP_X": "-24.3628", "GCP_Y": "14.6274", "GCP_Z": "0", }, +{"GCP_Id": "89", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "3536", "GCP_X": "-24.3252", "GCP_Y": "14.6344", "GCP_Z": "0", }, +{"GCP_Id": "90", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "4420", "GCP_X": "-24.2879", "GCP_Y": "14.6414", "GCP_Z": "0", }, +{"GCP_Id": "91", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "5304", "GCP_X": "-24.2506", "GCP_Y": "14.6484", "GCP_Z": "0", }, +{"GCP_Id": "92", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "6188", "GCP_X": "-24.2136", "GCP_Y": "14.6553", "GCP_Z": "0", }, +{"GCP_Id": "93", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "7072", "GCP_X": "-24.1766", "GCP_Y": "14.6622", "GCP_Z": "0", }, +{"GCP_Id": "94", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "7956", "GCP_X": "-24.1398", "GCP_Y": "14.6691", "GCP_Z": "0", }, +{"GCP_Id": "95", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "8840", "GCP_X": "-24.1032", "GCP_Y": "14.6759", "GCP_Z": "0", }, +{"GCP_Id": "96", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "9724", "GCP_X": "-24.0666", "GCP_Y": "14.6827", "GCP_Z": "0", }, +{"GCP_Id": "97", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "10608", "GCP_X": "-24.0303", "GCP_Y": "14.6895", "GCP_Z": "0", }, +{"GCP_Id": "98", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "11492", "GCP_X": "-23.994", "GCP_Y": "14.6963", "GCP_Z": "0", }, +{"GCP_Id": "99", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "12376", "GCP_X": "-23.9578", "GCP_Y": "14.703", "GCP_Z": "0", }, +{"GCP_Id": "100", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "13260", "GCP_X": "-23.9218", "GCP_Y": "14.7097", "GCP_Z": "0", }, +{"GCP_Id": "101", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "14144", "GCP_X": "-23.8859", "GCP_Y": "14.7163", "GCP_Z": "0", }, +{"GCP_Id": "102", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "15028", "GCP_X": "-23.8501", "GCP_Y": "14.7229", "GCP_Z": "0", }, +{"GCP_Id": "103", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "15912", "GCP_X": "-23.8145", "GCP_Y": "14.7295", "GCP_Z": "0", }, +{"GCP_Id": "104", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "16796", "GCP_X": "-23.7789", "GCP_Y": "14.7361", "GCP_Z": "0", }, +{"GCP_Id": "105", "GCP_Info": "", "GCP_Row": "2936", "GCP_Col": "17662", "GCP_X": "-23.7442", "GCP_Y": "14.7425", "GCP_Z": "0", }, +{"GCP_Id": "106", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "0", "GCP_X": "-24.4815", "GCP_Y": "14.6327", "GCP_Z": "0", }, +{"GCP_Id": "107", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "884", "GCP_X": "-24.4435", "GCP_Y": "14.6399", "GCP_Z": "0", }, +{"GCP_Id": "108", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "1768", "GCP_X": "-24.4057", "GCP_Y": "14.647", "GCP_Z": "0", }, +{"GCP_Id": "109", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "2652", "GCP_X": "-24.368", "GCP_Y": "14.6541", "GCP_Z": "0", }, +{"GCP_Id": "110", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "3536", "GCP_X": "-24.3305", "GCP_Y": "14.6611", "GCP_Z": "0", }, +{"GCP_Id": "111", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "4420", "GCP_X": "-24.2931", "GCP_Y": "14.6681", "GCP_Z": "0", }, +{"GCP_Id": "112", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "5304", "GCP_X": "-24.2559", "GCP_Y": "14.675", "GCP_Z": "0", }, +{"GCP_Id": "113", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "6188", "GCP_X": "-24.2188", "GCP_Y": "14.682", "GCP_Z": "0", }, +{"GCP_Id": "114", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "7072", "GCP_X": "-24.1819", "GCP_Y": "14.6889", "GCP_Z": "0", }, +{"GCP_Id": "115", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "7956", "GCP_X": "-24.1451", "GCP_Y": "14.6957", "GCP_Z": "0", }, +{"GCP_Id": "116", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "8840", "GCP_X": "-24.1084", "GCP_Y": "14.7026", "GCP_Z": "0", }, +{"GCP_Id": "117", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "9724", "GCP_X": "-24.0719", "GCP_Y": "14.7094", "GCP_Z": "0", }, +{"GCP_Id": "118", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "10608", "GCP_X": "-24.0355", "GCP_Y": "14.7161", "GCP_Z": "0", }, +{"GCP_Id": "119", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "11492", "GCP_X": "-23.9992", "GCP_Y": "14.7229", "GCP_Z": "0", }, +{"GCP_Id": "120", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "12376", "GCP_X": "-23.9631", "GCP_Y": "14.7296", "GCP_Z": "0", }, +{"GCP_Id": "121", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "13260", "GCP_X": "-23.927", "GCP_Y": "14.7363", "GCP_Z": "0", }, +{"GCP_Id": "122", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "14144", "GCP_X": "-23.8911", "GCP_Y": "14.7429", "GCP_Z": "0", }, +{"GCP_Id": "123", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "15028", "GCP_X": "-23.8553", "GCP_Y": "14.7496", "GCP_Z": "0", }, +{"GCP_Id": "124", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "15912", "GCP_X": "-23.8197", "GCP_Y": "14.7562", "GCP_Z": "0", }, +{"GCP_Id": "125", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "16796", "GCP_X": "-23.7841", "GCP_Y": "14.7627", "GCP_Z": "0", }, +{"GCP_Id": "126", "GCP_Info": "", "GCP_Row": "3670", "GCP_Col": "17662", "GCP_X": "-23.7494", "GCP_Y": "14.7691", "GCP_Z": "0", }, +{"GCP_Id": "127", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "0", "GCP_X": "-24.4868", "GCP_Y": "14.6594", "GCP_Z": "0", }, +{"GCP_Id": "128", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "884", "GCP_X": "-24.4488", "GCP_Y": "14.6665", "GCP_Z": "0", }, +{"GCP_Id": "129", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "1768", "GCP_X": "-24.411", "GCP_Y": "14.6736", "GCP_Z": "0", }, +{"GCP_Id": "130", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "2652", "GCP_X": "-24.3733", "GCP_Y": "14.6807", "GCP_Z": "0", }, +{"GCP_Id": "131", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "3536", "GCP_X": "-24.3358", "GCP_Y": "14.6877", "GCP_Z": "0", }, +{"GCP_Id": "132", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "4420", "GCP_X": "-24.2984", "GCP_Y": "14.6947", "GCP_Z": "0", }, +{"GCP_Id": "133", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "5304", "GCP_X": "-24.2612", "GCP_Y": "14.7017", "GCP_Z": "0", }, +{"GCP_Id": "134", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "6188", "GCP_X": "-24.2241", "GCP_Y": "14.7086", "GCP_Z": "0", }, +{"GCP_Id": "135", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "7072", "GCP_X": "-24.1871", "GCP_Y": "14.7155", "GCP_Z": "0", }, +{"GCP_Id": "136", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "7956", "GCP_X": "-24.1503", "GCP_Y": "14.7224", "GCP_Z": "0", }, +{"GCP_Id": "137", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "8840", "GCP_X": "-24.1137", "GCP_Y": "14.7292", "GCP_Z": "0", }, +{"GCP_Id": "138", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "9724", "GCP_X": "-24.0771", "GCP_Y": "14.736", "GCP_Z": "0", }, +{"GCP_Id": "139", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "10608", "GCP_X": "-24.0407", "GCP_Y": "14.7428", "GCP_Z": "0", }, +{"GCP_Id": "140", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "11492", "GCP_X": "-24.0044", "GCP_Y": "14.7495", "GCP_Z": "0", }, +{"GCP_Id": "141", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "12376", "GCP_X": "-23.9683", "GCP_Y": "14.7562", "GCP_Z": "0", }, +{"GCP_Id": "142", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "13260", "GCP_X": "-23.9322", "GCP_Y": "14.7629", "GCP_Z": "0", }, +{"GCP_Id": "143", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "14144", "GCP_X": "-23.8963", "GCP_Y": "14.7696", "GCP_Z": "0", }, +{"GCP_Id": "144", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "15028", "GCP_X": "-23.8605", "GCP_Y": "14.7762", "GCP_Z": "0", }, +{"GCP_Id": "145", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "15912", "GCP_X": "-23.8249", "GCP_Y": "14.7828", "GCP_Z": "0", }, +{"GCP_Id": "146", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "16796", "GCP_X": "-23.7893", "GCP_Y": "14.7893", "GCP_Z": "0", }, +{"GCP_Id": "147", "GCP_Info": "", "GCP_Row": "4404", "GCP_Col": "17662", "GCP_X": "-23.7546", "GCP_Y": "14.7958", "GCP_Z": "0", }, +{"GCP_Id": "148", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "0", "GCP_X": "-24.4921", "GCP_Y": "14.686", "GCP_Z": "0", }, +{"GCP_Id": "149", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "884", "GCP_X": "-24.4541", "GCP_Y": "14.6932", "GCP_Z": "0", }, +{"GCP_Id": "150", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "1768", "GCP_X": "-24.4163", "GCP_Y": "14.7003", "GCP_Z": "0", }, +{"GCP_Id": "151", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "2652", "GCP_X": "-24.3786", "GCP_Y": "14.7073", "GCP_Z": "0", }, +{"GCP_Id": "152", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "3536", "GCP_X": "-24.341", "GCP_Y": "14.7143", "GCP_Z": "0", }, +{"GCP_Id": "153", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "4420", "GCP_X": "-24.3036", "GCP_Y": "14.7213", "GCP_Z": "0", }, +{"GCP_Id": "154", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "5304", "GCP_X": "-24.2664", "GCP_Y": "14.7283", "GCP_Z": "0", }, +{"GCP_Id": "155", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "6188", "GCP_X": "-24.2293", "GCP_Y": "14.7352", "GCP_Z": "0", }, +{"GCP_Id": "156", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "7072", "GCP_X": "-24.1924", "GCP_Y": "14.7421", "GCP_Z": "0", }, +{"GCP_Id": "157", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "7956", "GCP_X": "-24.1556", "GCP_Y": "14.749", "GCP_Z": "0", }, +{"GCP_Id": "158", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "8840", "GCP_X": "-24.1189", "GCP_Y": "14.7558", "GCP_Z": "0", }, +{"GCP_Id": "159", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "9724", "GCP_X": "-24.0823", "GCP_Y": "14.7626", "GCP_Z": "0", }, +{"GCP_Id": "160", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "10608", "GCP_X": "-24.0459", "GCP_Y": "14.7694", "GCP_Z": "0", }, +{"GCP_Id": "161", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "11492", "GCP_X": "-24.0097", "GCP_Y": "14.7761", "GCP_Z": "0", }, +{"GCP_Id": "162", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "12376", "GCP_X": "-23.9735", "GCP_Y": "14.7828", "GCP_Z": "0", }, +{"GCP_Id": "163", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "13260", "GCP_X": "-23.9375", "GCP_Y": "14.7895", "GCP_Z": "0", }, +{"GCP_Id": "164", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "14144", "GCP_X": "-23.9015", "GCP_Y": "14.7962", "GCP_Z": "0", }, +{"GCP_Id": "165", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "15028", "GCP_X": "-23.8658", "GCP_Y": "14.8028", "GCP_Z": "0", }, +{"GCP_Id": "166", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "15912", "GCP_X": "-23.8301", "GCP_Y": "14.8094", "GCP_Z": "0", }, +{"GCP_Id": "167", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "16796", "GCP_X": "-23.7945", "GCP_Y": "14.816", "GCP_Z": "0", }, +{"GCP_Id": "168", "GCP_Info": "", "GCP_Row": "5138", "GCP_Col": "17662", "GCP_X": "-23.7598", "GCP_Y": "14.8224", "GCP_Z": "0", }, +{"GCP_Id": "169", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "0", "GCP_X": "-24.4973", "GCP_Y": "14.7127", "GCP_Z": "11.5691", }, +{"GCP_Id": "170", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "884", "GCP_X": "-24.4593", "GCP_Y": "14.7198", "GCP_Z": "11.5691", }, +{"GCP_Id": "171", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "1768", "GCP_X": "-24.4214", "GCP_Y": "14.7269", "GCP_Z": "11.5691", }, +{"GCP_Id": "172", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "2652", "GCP_X": "-24.3837", "GCP_Y": "14.734", "GCP_Z": "11.5691", }, +{"GCP_Id": "173", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "3536", "GCP_X": "-24.3462", "GCP_Y": "14.741", "GCP_Z": "11.5691", }, +{"GCP_Id": "174", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "4420", "GCP_X": "-24.3088", "GCP_Y": "14.748", "GCP_Z": "11.5691", }, +{"GCP_Id": "175", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "5304", "GCP_X": "-24.2716", "GCP_Y": "14.755", "GCP_Z": "11.5691", }, +{"GCP_Id": "176", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "6188", "GCP_X": "-24.2345", "GCP_Y": "14.7619", "GCP_Z": "11.5691", }, +{"GCP_Id": "177", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "7072", "GCP_X": "-24.1975", "GCP_Y": "14.7688", "GCP_Z": "11.5691", }, +{"GCP_Id": "178", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "7956", "GCP_X": "-24.1607", "GCP_Y": "14.7756", "GCP_Z": "11.5691", }, +{"GCP_Id": "179", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "8840", "GCP_X": "-24.124", "GCP_Y": "14.7825", "GCP_Z": "11.5691", }, +{"GCP_Id": "180", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "9724", "GCP_X": "-24.0875", "GCP_Y": "14.7893", "GCP_Z": "11.5691", }, +{"GCP_Id": "181", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "10608", "GCP_X": "-24.0511", "GCP_Y": "14.796", "GCP_Z": "11.5691", }, +{"GCP_Id": "182", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "11492", "GCP_X": "-24.0148", "GCP_Y": "14.8028", "GCP_Z": "11.5691", }, +{"GCP_Id": "183", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "12376", "GCP_X": "-23.9786", "GCP_Y": "14.8095", "GCP_Z": "11.5691", }, +{"GCP_Id": "184", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "13260", "GCP_X": "-23.9426", "GCP_Y": "14.8162", "GCP_Z": "11.5691", }, +{"GCP_Id": "185", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "14144", "GCP_X": "-23.9067", "GCP_Y": "14.8228", "GCP_Z": "11.5691", }, +{"GCP_Id": "186", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "15028", "GCP_X": "-23.8709", "GCP_Y": "14.8294", "GCP_Z": "11.5691", }, +{"GCP_Id": "187", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "15912", "GCP_X": "-23.8352", "GCP_Y": "14.836", "GCP_Z": "11.5691", }, +{"GCP_Id": "188", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "16796", "GCP_X": "-23.7996", "GCP_Y": "14.8426", "GCP_Z": "11.5691", }, +{"GCP_Id": "189", "GCP_Info": "", "GCP_Row": "5872", "GCP_Col": "17662", "GCP_X": "-23.7649", "GCP_Y": "14.849", "GCP_Z": "11.5691", }, +{"GCP_Id": "190", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "0", "GCP_X": "-24.5024", "GCP_Y": "14.7393", "GCP_Z": "24.3652", }, +{"GCP_Id": "191", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "884", "GCP_X": "-24.4644", "GCP_Y": "14.7465", "GCP_Z": "24.3652", }, +{"GCP_Id": "192", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "1768", "GCP_X": "-24.4266", "GCP_Y": "14.7536", "GCP_Z": "24.3652", }, +{"GCP_Id": "193", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "2652", "GCP_X": "-24.3889", "GCP_Y": "14.7606", "GCP_Z": "24.3652", }, +{"GCP_Id": "194", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "3536", "GCP_X": "-24.3513", "GCP_Y": "14.7677", "GCP_Z": "24.3652", }, +{"GCP_Id": "195", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "4420", "GCP_X": "-24.3139", "GCP_Y": "14.7746", "GCP_Z": "24.3652", }, +{"GCP_Id": "196", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "5304", "GCP_X": "-24.2767", "GCP_Y": "14.7816", "GCP_Z": "24.3652", }, +{"GCP_Id": "197", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "6188", "GCP_X": "-24.2396", "GCP_Y": "14.7885", "GCP_Z": "24.3652", }, +{"GCP_Id": "198", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "7072", "GCP_X": "-24.2026", "GCP_Y": "14.7954", "GCP_Z": "24.3652", }, +{"GCP_Id": "199", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "7956", "GCP_X": "-24.1658", "GCP_Y": "14.8023", "GCP_Z": "24.3652", }, +{"GCP_Id": "200", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "8840", "GCP_X": "-24.1291", "GCP_Y": "14.8091", "GCP_Z": "24.3652", }, +{"GCP_Id": "201", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "9724", "GCP_X": "-24.0926", "GCP_Y": "14.8159", "GCP_Z": "24.3652", }, +{"GCP_Id": "202", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "10608", "GCP_X": "-24.0562", "GCP_Y": "14.8227", "GCP_Z": "24.3652", }, +{"GCP_Id": "203", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "11492", "GCP_X": "-24.0199", "GCP_Y": "14.8294", "GCP_Z": "24.3652", }, +{"GCP_Id": "204", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "12376", "GCP_X": "-23.9837", "GCP_Y": "14.8361", "GCP_Z": "24.3652", }, +{"GCP_Id": "205", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "13260", "GCP_X": "-23.9477", "GCP_Y": "14.8428", "GCP_Z": "24.3652", }, +{"GCP_Id": "206", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "14144", "GCP_X": "-23.9118", "GCP_Y": "14.8494", "GCP_Z": "24.3652", }, +{"GCP_Id": "207", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "15028", "GCP_X": "-23.8759", "GCP_Y": "14.8561", "GCP_Z": "24.3652", }, +{"GCP_Id": "208", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "15912", "GCP_X": "-23.8403", "GCP_Y": "14.8627", "GCP_Z": "24.3652", }, +{"GCP_Id": "209", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "16796", "GCP_X": "-23.8047", "GCP_Y": "14.8692", "GCP_Z": "24.3652", }, +{"GCP_Id": "210", "GCP_Info": "", "GCP_Row": "6606", "GCP_Col": "17662", "GCP_X": "-23.7699", "GCP_Y": "14.8756", "GCP_Z": "24.3652", }, +{"GCP_Id": "211", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "0", "GCP_X": "-24.5077", "GCP_Y": "14.766", "GCP_Z": "29.8161", }, +{"GCP_Id": "212", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "884", "GCP_X": "-24.4696", "GCP_Y": "14.7731", "GCP_Z": "29.8161", }, +{"GCP_Id": "213", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "1768", "GCP_X": "-24.4318", "GCP_Y": "14.7802", "GCP_Z": "29.8161", }, +{"GCP_Id": "214", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "2652", "GCP_X": "-24.3941", "GCP_Y": "14.7873", "GCP_Z": "29.8161", }, +{"GCP_Id": "215", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "3536", "GCP_X": "-24.3565", "GCP_Y": "14.7943", "GCP_Z": "29.8161", }, +{"GCP_Id": "216", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "4420", "GCP_X": "-24.3191", "GCP_Y": "14.8013", "GCP_Z": "29.8161", }, +{"GCP_Id": "217", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "5304", "GCP_X": "-24.2819", "GCP_Y": "14.8082", "GCP_Z": "29.8161", }, +{"GCP_Id": "218", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "6188", "GCP_X": "-24.2448", "GCP_Y": "14.8152", "GCP_Z": "29.8161", }, +{"GCP_Id": "219", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "7072", "GCP_X": "-24.2078", "GCP_Y": "14.8221", "GCP_Z": "29.8161", }, +{"GCP_Id": "220", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "7956", "GCP_X": "-24.171", "GCP_Y": "14.8289", "GCP_Z": "29.8161", }, +{"GCP_Id": "221", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "8840", "GCP_X": "-24.1343", "GCP_Y": "14.8357", "GCP_Z": "29.8161", }, +{"GCP_Id": "222", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "9724", "GCP_X": "-24.0978", "GCP_Y": "14.8425", "GCP_Z": "29.8161", }, +{"GCP_Id": "223", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "10608", "GCP_X": "-24.0613", "GCP_Y": "14.8493", "GCP_Z": "29.8161", }, +{"GCP_Id": "224", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "11492", "GCP_X": "-24.0251", "GCP_Y": "14.856", "GCP_Z": "29.8161", }, +{"GCP_Id": "225", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "12376", "GCP_X": "-23.9889", "GCP_Y": "14.8627", "GCP_Z": "29.8161", }, +{"GCP_Id": "226", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "13260", "GCP_X": "-23.9528", "GCP_Y": "14.8694", "GCP_Z": "29.8161", }, +{"GCP_Id": "227", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "14144", "GCP_X": "-23.9169", "GCP_Y": "14.8761", "GCP_Z": "29.8161", }, +{"GCP_Id": "228", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "15028", "GCP_X": "-23.8811", "GCP_Y": "14.8827", "GCP_Z": "29.8161", }, +{"GCP_Id": "229", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "15912", "GCP_X": "-23.8454", "GCP_Y": "14.8893", "GCP_Z": "29.8161", }, +{"GCP_Id": "230", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "16796", "GCP_X": "-23.8098", "GCP_Y": "14.8958", "GCP_Z": "29.8161", }, +{"GCP_Id": "231", "GCP_Info": "", "GCP_Row": "7340", "GCP_Col": "17662", "GCP_X": "-23.7751", "GCP_Y": "14.9023", "GCP_Z": "29.8161", }, +{"GCP_Id": "232", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "0", "GCP_X": "-24.5129", "GCP_Y": "14.7926", "GCP_Z": "31.0957", }, +{"GCP_Id": "233", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "884", "GCP_X": "-24.4749", "GCP_Y": "14.7998", "GCP_Z": "31.0957", }, +{"GCP_Id": "234", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "1768", "GCP_X": "-24.437", "GCP_Y": "14.8069", "GCP_Z": "31.0957", }, +{"GCP_Id": "235", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "2652", "GCP_X": "-24.3993", "GCP_Y": "14.8139", "GCP_Z": "31.0957", }, +{"GCP_Id": "236", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "3536", "GCP_X": "-24.3618", "GCP_Y": "14.8209", "GCP_Z": "31.0957", }, +{"GCP_Id": "237", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "4420", "GCP_X": "-24.3244", "GCP_Y": "14.8279", "GCP_Z": "31.0957", }, +{"GCP_Id": "238", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "5304", "GCP_X": "-24.2871", "GCP_Y": "14.8349", "GCP_Z": "31.0957", }, +{"GCP_Id": "239", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "6188", "GCP_X": "-24.25", "GCP_Y": "14.8418", "GCP_Z": "31.0957", }, +{"GCP_Id": "240", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "7072", "GCP_X": "-24.2131", "GCP_Y": "14.8487", "GCP_Z": "31.0957", }, +{"GCP_Id": "241", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "7956", "GCP_X": "-24.1762", "GCP_Y": "14.8555", "GCP_Z": "31.0957", }, +{"GCP_Id": "242", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "8840", "GCP_X": "-24.1395", "GCP_Y": "14.8624", "GCP_Z": "31.0957", }, +{"GCP_Id": "243", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "9724", "GCP_X": "-24.103", "GCP_Y": "14.8692", "GCP_Z": "31.0957", }, +{"GCP_Id": "244", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "10608", "GCP_X": "-24.0666", "GCP_Y": "14.8759", "GCP_Z": "31.0957", }, +{"GCP_Id": "245", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "11492", "GCP_X": "-24.0303", "GCP_Y": "14.8827", "GCP_Z": "31.0957", }, +{"GCP_Id": "246", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "12376", "GCP_X": "-23.9941", "GCP_Y": "14.8894", "GCP_Z": "31.0957", }, +{"GCP_Id": "247", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "13260", "GCP_X": "-23.958", "GCP_Y": "14.896", "GCP_Z": "31.0957", }, +{"GCP_Id": "248", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "14144", "GCP_X": "-23.9221", "GCP_Y": "14.9027", "GCP_Z": "31.0957", }, +{"GCP_Id": "249", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "15028", "GCP_X": "-23.8863", "GCP_Y": "14.9093", "GCP_Z": "31.0957", }, +{"GCP_Id": "250", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "15912", "GCP_X": "-23.8506", "GCP_Y": "14.9159", "GCP_Z": "31.0957", }, +{"GCP_Id": "251", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "16796", "GCP_X": "-23.815", "GCP_Y": "14.9225", "GCP_Z": "31.0957", }, +{"GCP_Id": "252", "GCP_Info": "", "GCP_Row": "8074", "GCP_Col": "17662", "GCP_X": "-23.7803", "GCP_Y": "14.9289", "GCP_Z": "31.0957", }, +{"GCP_Id": "253", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "0", "GCP_X": "-24.518", "GCP_Y": "14.8193", "GCP_Z": "51.6349", }, +{"GCP_Id": "254", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "884", "GCP_X": "-24.48", "GCP_Y": "14.8264", "GCP_Z": "51.6349", }, +{"GCP_Id": "255", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "1768", "GCP_X": "-24.4421", "GCP_Y": "14.8335", "GCP_Z": "51.6349", }, +{"GCP_Id": "256", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "2652", "GCP_X": "-24.4044", "GCP_Y": "14.8406", "GCP_Z": "51.6349", }, +{"GCP_Id": "257", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "3536", "GCP_X": "-24.3669", "GCP_Y": "14.8476", "GCP_Z": "51.6349", }, +{"GCP_Id": "258", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "4420", "GCP_X": "-24.3295", "GCP_Y": "14.8546", "GCP_Z": "51.6349", }, +{"GCP_Id": "259", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "5304", "GCP_X": "-24.2922", "GCP_Y": "14.8615", "GCP_Z": "51.6349", }, +{"GCP_Id": "260", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "6188", "GCP_X": "-24.2551", "GCP_Y": "14.8685", "GCP_Z": "51.6349", }, +{"GCP_Id": "261", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "7072", "GCP_X": "-24.2181", "GCP_Y": "14.8754", "GCP_Z": "51.6349", }, +{"GCP_Id": "262", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "7956", "GCP_X": "-24.1813", "GCP_Y": "14.8822", "GCP_Z": "51.6349", }, +{"GCP_Id": "263", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "8840", "GCP_X": "-24.1446", "GCP_Y": "14.889", "GCP_Z": "51.6349", }, +{"GCP_Id": "264", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "9724", "GCP_X": "-24.108", "GCP_Y": "14.8958", "GCP_Z": "51.6349", }, +{"GCP_Id": "265", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "10608", "GCP_X": "-24.0716", "GCP_Y": "14.9026", "GCP_Z": "51.6349", }, +{"GCP_Id": "266", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "11492", "GCP_X": "-24.0353", "GCP_Y": "14.9093", "GCP_Z": "51.6349", }, +{"GCP_Id": "267", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "12376", "GCP_X": "-23.9991", "GCP_Y": "14.916", "GCP_Z": "51.6349", }, +{"GCP_Id": "268", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "13260", "GCP_X": "-23.9631", "GCP_Y": "14.9227", "GCP_Z": "51.6349", }, +{"GCP_Id": "269", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "14144", "GCP_X": "-23.9271", "GCP_Y": "14.9293", "GCP_Z": "51.6349", }, +{"GCP_Id": "270", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "15028", "GCP_X": "-23.8913", "GCP_Y": "14.936", "GCP_Z": "51.6349", }, +{"GCP_Id": "271", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "15912", "GCP_X": "-23.8556", "GCP_Y": "14.9425", "GCP_Z": "51.6349", }, +{"GCP_Id": "272", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "16796", "GCP_X": "-23.82", "GCP_Y": "14.9491", "GCP_Z": "51.6349", }, +{"GCP_Id": "273", "GCP_Info": "", "GCP_Row": "8808", "GCP_Col": "17662", "GCP_X": "-23.7853", "GCP_Y": "14.9555", "GCP_Z": "51.6349", }, +{"GCP_Id": "274", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "0", "GCP_X": "-24.5228", "GCP_Y": "14.846", "GCP_Z": "104.761", }, +{"GCP_Id": "275", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "884", "GCP_X": "-24.4847", "GCP_Y": "14.8532", "GCP_Z": "104.761", }, +{"GCP_Id": "276", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "1768", "GCP_X": "-24.4469", "GCP_Y": "14.8603", "GCP_Z": "104.761", }, +{"GCP_Id": "277", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "2652", "GCP_X": "-24.4092", "GCP_Y": "14.8673", "GCP_Z": "104.761", }, +{"GCP_Id": "278", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "3536", "GCP_X": "-24.3716", "GCP_Y": "14.8743", "GCP_Z": "104.761", }, +{"GCP_Id": "279", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "4420", "GCP_X": "-24.3342", "GCP_Y": "14.8813", "GCP_Z": "104.761", }, +{"GCP_Id": "280", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "5304", "GCP_X": "-24.2969", "GCP_Y": "14.8883", "GCP_Z": "104.761", }, +{"GCP_Id": "281", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "6188", "GCP_X": "-24.2598", "GCP_Y": "14.8952", "GCP_Z": "104.761", }, +{"GCP_Id": "282", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "7072", "GCP_X": "-24.2229", "GCP_Y": "14.9021", "GCP_Z": "104.761", }, +{"GCP_Id": "283", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "7956", "GCP_X": "-24.186", "GCP_Y": "14.9089", "GCP_Z": "104.761", }, +{"GCP_Id": "284", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "8840", "GCP_X": "-24.1493", "GCP_Y": "14.9157", "GCP_Z": "104.761", }, +{"GCP_Id": "285", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "9724", "GCP_X": "-24.1128", "GCP_Y": "14.9225", "GCP_Z": "104.761", }, +{"GCP_Id": "286", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "10608", "GCP_X": "-24.0763", "GCP_Y": "14.9293", "GCP_Z": "104.761", }, +{"GCP_Id": "287", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "11492", "GCP_X": "-24.04", "GCP_Y": "14.936", "GCP_Z": "104.761", }, +{"GCP_Id": "288", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "12376", "GCP_X": "-24.0039", "GCP_Y": "14.9427", "GCP_Z": "104.761", }, +{"GCP_Id": "289", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "13260", "GCP_X": "-23.9678", "GCP_Y": "14.9494", "GCP_Z": "104.761", }, +{"GCP_Id": "290", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "14144", "GCP_X": "-23.9319", "GCP_Y": "14.956", "GCP_Z": "104.761", }, +{"GCP_Id": "291", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "15028", "GCP_X": "-23.8961", "GCP_Y": "14.9627", "GCP_Z": "104.761", }, +{"GCP_Id": "292", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "15912", "GCP_X": "-23.8604", "GCP_Y": "14.9692", "GCP_Z": "104.761", }, +{"GCP_Id": "293", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "16796", "GCP_X": "-23.8248", "GCP_Y": "14.9758", "GCP_Z": "104.761", }, +{"GCP_Id": "294", "GCP_Info": "", "GCP_Row": "9542", "GCP_Col": "17662", "GCP_X": "-23.79", "GCP_Y": "14.9822", "GCP_Z": "104.761", }, +{"GCP_Id": "295", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "0", "GCP_X": "-24.5274", "GCP_Y": "14.8728", "GCP_Z": "168.261", }, +{"GCP_Id": "296", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "884", "GCP_X": "-24.4894", "GCP_Y": "14.8799", "GCP_Z": "168.261", }, +{"GCP_Id": "297", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "1768", "GCP_X": "-24.4515", "GCP_Y": "14.887", "GCP_Z": "168.261", }, +{"GCP_Id": "298", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "2652", "GCP_X": "-24.4138", "GCP_Y": "14.8941", "GCP_Z": "168.261", }, +{"GCP_Id": "299", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "3536", "GCP_X": "-24.3763", "GCP_Y": "14.9011", "GCP_Z": "168.261", }, +{"GCP_Id": "300", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "4420", "GCP_X": "-24.3389", "GCP_Y": "14.9081", "GCP_Z": "168.261", }, +{"GCP_Id": "301", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "5304", "GCP_X": "-24.3016", "GCP_Y": "14.915", "GCP_Z": "168.261", }, +{"GCP_Id": "302", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "6188", "GCP_X": "-24.2645", "GCP_Y": "14.9219", "GCP_Z": "168.261", }, +{"GCP_Id": "303", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "7072", "GCP_X": "-24.2275", "GCP_Y": "14.9288", "GCP_Z": "168.261", }, +{"GCP_Id": "304", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "7956", "GCP_X": "-24.1907", "GCP_Y": "14.9357", "GCP_Z": "168.261", }, +{"GCP_Id": "305", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "8840", "GCP_X": "-24.154", "GCP_Y": "14.9425", "GCP_Z": "168.261", }, +{"GCP_Id": "306", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "9724", "GCP_X": "-24.1174", "GCP_Y": "14.9493", "GCP_Z": "168.261", }, +{"GCP_Id": "307", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "10608", "GCP_X": "-24.081", "GCP_Y": "14.956", "GCP_Z": "168.261", }, +{"GCP_Id": "308", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "11492", "GCP_X": "-24.0447", "GCP_Y": "14.9628", "GCP_Z": "168.261", }, +{"GCP_Id": "309", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "12376", "GCP_X": "-24.0085", "GCP_Y": "14.9694", "GCP_Z": "168.261", }, +{"GCP_Id": "310", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "13260", "GCP_X": "-23.9725", "GCP_Y": "14.9761", "GCP_Z": "168.261", }, +{"GCP_Id": "311", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "14144", "GCP_X": "-23.9365", "GCP_Y": "14.9828", "GCP_Z": "168.261", }, +{"GCP_Id": "312", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "15028", "GCP_X": "-23.9007", "GCP_Y": "14.9894", "GCP_Z": "168.261", }, +{"GCP_Id": "313", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "15912", "GCP_X": "-23.865", "GCP_Y": "14.996", "GCP_Z": "168.261", }, +{"GCP_Id": "314", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "16796", "GCP_X": "-23.8294", "GCP_Y": "15.0025", "GCP_Z": "168.261", }, +{"GCP_Id": "315", "GCP_Info": "", "GCP_Row": "10276", "GCP_Col": "17662", "GCP_X": "-23.7947", "GCP_Y": "15.0089", "GCP_Z": "168.261", }, +{"GCP_Id": "316", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "0", "GCP_X": "-24.5312", "GCP_Y": "14.8997", "GCP_Z": "320.049", }, +{"GCP_Id": "317", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "884", "GCP_X": "-24.4932", "GCP_Y": "14.9068", "GCP_Z": "320.049", }, +{"GCP_Id": "318", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "1768", "GCP_X": "-24.4553", "GCP_Y": "14.9139", "GCP_Z": "320.049", }, +{"GCP_Id": "319", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "2652", "GCP_X": "-24.4176", "GCP_Y": "14.921", "GCP_Z": "320.049", }, +{"GCP_Id": "320", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "3536", "GCP_X": "-24.3801", "GCP_Y": "14.928", "GCP_Z": "320.049", }, +{"GCP_Id": "321", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "4420", "GCP_X": "-24.3427", "GCP_Y": "14.935", "GCP_Z": "320.049", }, +{"GCP_Id": "322", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "5304", "GCP_X": "-24.3054", "GCP_Y": "14.9419", "GCP_Z": "320.049", }, +{"GCP_Id": "323", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "6188", "GCP_X": "-24.2683", "GCP_Y": "14.9488", "GCP_Z": "320.049", }, +{"GCP_Id": "324", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "7072", "GCP_X": "-24.2313", "GCP_Y": "14.9557", "GCP_Z": "320.049", }, +{"GCP_Id": "325", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "7956", "GCP_X": "-24.1945", "GCP_Y": "14.9625", "GCP_Z": "320.049", }, +{"GCP_Id": "326", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "8840", "GCP_X": "-24.1578", "GCP_Y": "14.9694", "GCP_Z": "320.049", }, +{"GCP_Id": "327", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "9724", "GCP_X": "-24.1213", "GCP_Y": "14.9761", "GCP_Z": "320.049", }, +{"GCP_Id": "328", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "10608", "GCP_X": "-24.0848", "GCP_Y": "14.9829", "GCP_Z": "320.049", }, +{"GCP_Id": "329", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "11492", "GCP_X": "-24.0485", "GCP_Y": "14.9896", "GCP_Z": "320.049", }, +{"GCP_Id": "330", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "12376", "GCP_X": "-24.0124", "GCP_Y": "14.9963", "GCP_Z": "320.049", }, +{"GCP_Id": "331", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "13260", "GCP_X": "-23.9763", "GCP_Y": "15.003", "GCP_Z": "320.049", }, +{"GCP_Id": "332", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "14144", "GCP_X": "-23.9404", "GCP_Y": "15.0096", "GCP_Z": "320.049", }, +{"GCP_Id": "333", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "15028", "GCP_X": "-23.9046", "GCP_Y": "15.0162", "GCP_Z": "320.049", }, +{"GCP_Id": "334", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "15912", "GCP_X": "-23.8689", "GCP_Y": "15.0228", "GCP_Z": "320.049", }, +{"GCP_Id": "335", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "16796", "GCP_X": "-23.8333", "GCP_Y": "15.0294", "GCP_Z": "320.049", }, +{"GCP_Id": "336", "GCP_Info": "", "GCP_Row": "11010", "GCP_Col": "17662", "GCP_X": "-23.7985", "GCP_Y": "15.0358", "GCP_Z": "320.049", }, +{"GCP_Id": "337", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "0", "GCP_X": "-24.535", "GCP_Y": "14.9266", "GCP_Z": "471.837", }, +{"GCP_Id": "338", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "884", "GCP_X": "-24.497", "GCP_Y": "14.9337", "GCP_Z": "471.837", }, +{"GCP_Id": "339", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "1768", "GCP_X": "-24.4591", "GCP_Y": "14.9408", "GCP_Z": "471.837", }, +{"GCP_Id": "340", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "2652", "GCP_X": "-24.4214", "GCP_Y": "14.9479", "GCP_Z": "471.837", }, +{"GCP_Id": "341", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "3536", "GCP_X": "-24.3839", "GCP_Y": "14.9549", "GCP_Z": "471.837", }, +{"GCP_Id": "342", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "4420", "GCP_X": "-24.3465", "GCP_Y": "14.9619", "GCP_Z": "471.837", }, +{"GCP_Id": "343", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "5304", "GCP_X": "-24.3092", "GCP_Y": "14.9688", "GCP_Z": "471.837", }, +{"GCP_Id": "344", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "6188", "GCP_X": "-24.2721", "GCP_Y": "14.9757", "GCP_Z": "471.837", }, +{"GCP_Id": "345", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "7072", "GCP_X": "-24.2352", "GCP_Y": "14.9826", "GCP_Z": "471.837", }, +{"GCP_Id": "346", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "7956", "GCP_X": "-24.1983", "GCP_Y": "14.9894", "GCP_Z": "471.837", }, +{"GCP_Id": "347", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "8840", "GCP_X": "-24.1617", "GCP_Y": "14.9962", "GCP_Z": "471.837", }, +{"GCP_Id": "348", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "9724", "GCP_X": "-24.1251", "GCP_Y": "15.003", "GCP_Z": "471.837", }, +{"GCP_Id": "349", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "10608", "GCP_X": "-24.0887", "GCP_Y": "15.0098", "GCP_Z": "471.837", }, +{"GCP_Id": "350", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "11492", "GCP_X": "-24.0524", "GCP_Y": "15.0165", "GCP_Z": "471.837", }, +{"GCP_Id": "351", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "12376", "GCP_X": "-24.0162", "GCP_Y": "15.0232", "GCP_Z": "471.837", }, +{"GCP_Id": "352", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "13260", "GCP_X": "-23.9802", "GCP_Y": "15.0299", "GCP_Z": "471.837", }, +{"GCP_Id": "353", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "14144", "GCP_X": "-23.9443", "GCP_Y": "15.0365", "GCP_Z": "471.837", }, +{"GCP_Id": "354", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "15028", "GCP_X": "-23.9084", "GCP_Y": "15.0431", "GCP_Z": "471.837", }, +{"GCP_Id": "355", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "15912", "GCP_X": "-23.8728", "GCP_Y": "15.0497", "GCP_Z": "471.837", }, +{"GCP_Id": "356", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "16796", "GCP_X": "-23.8372", "GCP_Y": "15.0562", "GCP_Z": "471.837", }, +{"GCP_Id": "357", "GCP_Info": "", "GCP_Row": "11744", "GCP_Col": "17662", "GCP_X": "-23.8024", "GCP_Y": "15.0626", "GCP_Z": "471.837", }, +{"GCP_Id": "358", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "0", "GCP_X": "-24.5413", "GCP_Y": "14.9531", "GCP_Z": "368.864", }, +{"GCP_Id": "359", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "884", "GCP_X": "-24.5033", "GCP_Y": "14.9602", "GCP_Z": "368.864", }, +{"GCP_Id": "360", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "1768", "GCP_X": "-24.4654", "GCP_Y": "14.9673", "GCP_Z": "368.864", }, +{"GCP_Id": "361", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "2652", "GCP_X": "-24.4277", "GCP_Y": "14.9743", "GCP_Z": "368.864", }, +{"GCP_Id": "362", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "3536", "GCP_X": "-24.3901", "GCP_Y": "14.9813", "GCP_Z": "368.864", }, +{"GCP_Id": "363", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "4420", "GCP_X": "-24.3527", "GCP_Y": "14.9883", "GCP_Z": "368.864", }, +{"GCP_Id": "364", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "5304", "GCP_X": "-24.3155", "GCP_Y": "14.9953", "GCP_Z": "368.864", }, +{"GCP_Id": "365", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "6188", "GCP_X": "-24.2783", "GCP_Y": "15.0022", "GCP_Z": "368.864", }, +{"GCP_Id": "366", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "7072", "GCP_X": "-24.2414", "GCP_Y": "15.009", "GCP_Z": "368.864", }, +{"GCP_Id": "367", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "7956", "GCP_X": "-24.2045", "GCP_Y": "15.0159", "GCP_Z": "368.864", }, +{"GCP_Id": "368", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "8840", "GCP_X": "-24.1678", "GCP_Y": "15.0227", "GCP_Z": "368.864", }, +{"GCP_Id": "369", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "9724", "GCP_X": "-24.1313", "GCP_Y": "15.0295", "GCP_Z": "368.864", }, +{"GCP_Id": "370", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "10608", "GCP_X": "-24.0948", "GCP_Y": "15.0362", "GCP_Z": "368.864", }, +{"GCP_Id": "371", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "11492", "GCP_X": "-24.0585", "GCP_Y": "15.0429", "GCP_Z": "368.864", }, +{"GCP_Id": "372", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "12376", "GCP_X": "-24.0224", "GCP_Y": "15.0496", "GCP_Z": "368.864", }, +{"GCP_Id": "373", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "13260", "GCP_X": "-23.9863", "GCP_Y": "15.0563", "GCP_Z": "368.864", }, +{"GCP_Id": "374", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "14144", "GCP_X": "-23.9504", "GCP_Y": "15.0629", "GCP_Z": "368.864", }, +{"GCP_Id": "375", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "15028", "GCP_X": "-23.9145", "GCP_Y": "15.0695", "GCP_Z": "368.864", }, +{"GCP_Id": "376", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "15912", "GCP_X": "-23.8788", "GCP_Y": "15.0761", "GCP_Z": "368.864", }, +{"GCP_Id": "377", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "16796", "GCP_X": "-23.8433", "GCP_Y": "15.0827", "GCP_Z": "368.864", }, +{"GCP_Id": "378", "GCP_Info": "", "GCP_Row": "12478", "GCP_Col": "17662", "GCP_X": "-23.8085", "GCP_Y": "15.0891", "GCP_Z": "368.864", }, +{"GCP_Id": "379", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "0", "GCP_X": "-24.5481", "GCP_Y": "14.9794", "GCP_Z": "216.943", }, +{"GCP_Id": "380", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "884", "GCP_X": "-24.51", "GCP_Y": "14.9866", "GCP_Z": "216.943", }, +{"GCP_Id": "381", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "1768", "GCP_X": "-24.4721", "GCP_Y": "14.9936", "GCP_Z": "216.943", }, +{"GCP_Id": "382", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "2652", "GCP_X": "-24.4344", "GCP_Y": "15.0007", "GCP_Z": "216.943", }, +{"GCP_Id": "383", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "3536", "GCP_X": "-24.3968", "GCP_Y": "15.0077", "GCP_Z": "216.943", }, +{"GCP_Id": "384", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "4420", "GCP_X": "-24.3594", "GCP_Y": "15.0147", "GCP_Z": "216.943", }, +{"GCP_Id": "385", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "5304", "GCP_X": "-24.3222", "GCP_Y": "15.0216", "GCP_Z": "216.943", }, +{"GCP_Id": "386", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "6188", "GCP_X": "-24.285", "GCP_Y": "15.0285", "GCP_Z": "216.943", }, +{"GCP_Id": "387", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "7072", "GCP_X": "-24.248", "GCP_Y": "15.0354", "GCP_Z": "216.943", }, +{"GCP_Id": "388", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "7956", "GCP_X": "-24.2112", "GCP_Y": "15.0422", "GCP_Z": "216.943", }, +{"GCP_Id": "389", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "8840", "GCP_X": "-24.1745", "GCP_Y": "15.0491", "GCP_Z": "216.943", }, +{"GCP_Id": "390", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "9724", "GCP_X": "-24.1379", "GCP_Y": "15.0558", "GCP_Z": "216.943", }, +{"GCP_Id": "391", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "10608", "GCP_X": "-24.1015", "GCP_Y": "15.0626", "GCP_Z": "216.943", }, +{"GCP_Id": "392", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "11492", "GCP_X": "-24.0651", "GCP_Y": "15.0693", "GCP_Z": "216.943", }, +{"GCP_Id": "393", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "12376", "GCP_X": "-24.0289", "GCP_Y": "15.076", "GCP_Z": "216.943", }, +{"GCP_Id": "394", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "13260", "GCP_X": "-23.9929", "GCP_Y": "15.0827", "GCP_Z": "216.943", }, +{"GCP_Id": "395", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "14144", "GCP_X": "-23.9569", "GCP_Y": "15.0893", "GCP_Z": "216.943", }, +{"GCP_Id": "396", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "15028", "GCP_X": "-23.9211", "GCP_Y": "15.0959", "GCP_Z": "216.943", }, +{"GCP_Id": "397", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "15912", "GCP_X": "-23.8854", "GCP_Y": "15.1025", "GCP_Z": "216.943", }, +{"GCP_Id": "398", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "16796", "GCP_X": "-23.8498", "GCP_Y": "15.109", "GCP_Z": "216.943", }, +{"GCP_Id": "399", "GCP_Info": "", "GCP_Row": "13212", "GCP_Col": "17662", "GCP_X": "-23.815", "GCP_Y": "15.1154", "GCP_Z": "216.943", }, +{"GCP_Id": "400", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "0", "GCP_X": "-24.554", "GCP_Y": "15.0059", "GCP_Z": "152", }, +{"GCP_Id": "401", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "884", "GCP_X": "-24.5159", "GCP_Y": "15.0131", "GCP_Z": "152", }, +{"GCP_Id": "402", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "1768", "GCP_X": "-24.4781", "GCP_Y": "15.0202", "GCP_Z": "152", }, +{"GCP_Id": "403", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "2652", "GCP_X": "-24.4403", "GCP_Y": "15.0272", "GCP_Z": "152", }, +{"GCP_Id": "404", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "3536", "GCP_X": "-24.4027", "GCP_Y": "15.0342", "GCP_Z": "152", }, +{"GCP_Id": "405", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "4420", "GCP_X": "-24.3653", "GCP_Y": "15.0412", "GCP_Z": "152", }, +{"GCP_Id": "406", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "5304", "GCP_X": "-24.328", "GCP_Y": "15.0481", "GCP_Z": "152", }, +{"GCP_Id": "407", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "6188", "GCP_X": "-24.2909", "GCP_Y": "15.055", "GCP_Z": "152", }, +{"GCP_Id": "408", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "7072", "GCP_X": "-24.2539", "GCP_Y": "15.0619", "GCP_Z": "152", }, +{"GCP_Id": "409", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "7956", "GCP_X": "-24.217", "GCP_Y": "15.0688", "GCP_Z": "152", }, +{"GCP_Id": "410", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "8840", "GCP_X": "-24.1803", "GCP_Y": "15.0756", "GCP_Z": "152", }, +{"GCP_Id": "411", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "9724", "GCP_X": "-24.1437", "GCP_Y": "15.0824", "GCP_Z": "152", }, +{"GCP_Id": "412", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "10608", "GCP_X": "-24.1073", "GCP_Y": "15.0891", "GCP_Z": "152", }, +{"GCP_Id": "413", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "11492", "GCP_X": "-24.0709", "GCP_Y": "15.0958", "GCP_Z": "152", }, +{"GCP_Id": "414", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "12376", "GCP_X": "-24.0347", "GCP_Y": "15.1025", "GCP_Z": "152", }, +{"GCP_Id": "415", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "13260", "GCP_X": "-23.9987", "GCP_Y": "15.1092", "GCP_Z": "152", }, +{"GCP_Id": "416", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "14144", "GCP_X": "-23.9627", "GCP_Y": "15.1158", "GCP_Z": "152", }, +{"GCP_Id": "417", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "15028", "GCP_X": "-23.9268", "GCP_Y": "15.1224", "GCP_Z": "152", }, +{"GCP_Id": "418", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "15912", "GCP_X": "-23.8911", "GCP_Y": "15.129", "GCP_Z": "152", }, +{"GCP_Id": "419", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "16796", "GCP_X": "-23.8555", "GCP_Y": "15.1356", "GCP_Z": "152", }, +{"GCP_Id": "420", "GCP_Info": "", "GCP_Row": "13946", "GCP_Col": "17662", "GCP_X": "-23.8207", "GCP_Y": "15.1419", "GCP_Z": "152", }, +{"GCP_Id": "421", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "0", "GCP_X": "-24.5593", "GCP_Y": "15.0326", "GCP_Z": "152", }, +{"GCP_Id": "422", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "884", "GCP_X": "-24.5212", "GCP_Y": "15.0397", "GCP_Z": "152", }, +{"GCP_Id": "423", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "1768", "GCP_X": "-24.4833", "GCP_Y": "15.0468", "GCP_Z": "152", }, +{"GCP_Id": "424", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "2652", "GCP_X": "-24.4456", "GCP_Y": "15.0538", "GCP_Z": "152", }, +{"GCP_Id": "425", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "3536", "GCP_X": "-24.408", "GCP_Y": "15.0608", "GCP_Z": "152", }, +{"GCP_Id": "426", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "4420", "GCP_X": "-24.3706", "GCP_Y": "15.0678", "GCP_Z": "152", }, +{"GCP_Id": "427", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "5304", "GCP_X": "-24.3333", "GCP_Y": "15.0748", "GCP_Z": "152", }, +{"GCP_Id": "428", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "6188", "GCP_X": "-24.2961", "GCP_Y": "15.0817", "GCP_Z": "152", }, +{"GCP_Id": "429", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "7072", "GCP_X": "-24.2591", "GCP_Y": "15.0885", "GCP_Z": "152", }, +{"GCP_Id": "430", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "7956", "GCP_X": "-24.2223", "GCP_Y": "15.0954", "GCP_Z": "152", }, +{"GCP_Id": "431", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "8840", "GCP_X": "-24.1855", "GCP_Y": "15.1022", "GCP_Z": "152", }, +{"GCP_Id": "432", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "9724", "GCP_X": "-24.149", "GCP_Y": "15.109", "GCP_Z": "152", }, +{"GCP_Id": "433", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "10608", "GCP_X": "-24.1125", "GCP_Y": "15.1157", "GCP_Z": "152", }, +{"GCP_Id": "434", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "11492", "GCP_X": "-24.0762", "GCP_Y": "15.1224", "GCP_Z": "152", }, +{"GCP_Id": "435", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "12376", "GCP_X": "-24.0399", "GCP_Y": "15.1291", "GCP_Z": "152", }, +{"GCP_Id": "436", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "13260", "GCP_X": "-24.0039", "GCP_Y": "15.1358", "GCP_Z": "152", }, +{"GCP_Id": "437", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "14144", "GCP_X": "-23.9679", "GCP_Y": "15.1424", "GCP_Z": "152", }, +{"GCP_Id": "438", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "15028", "GCP_X": "-23.932", "GCP_Y": "15.149", "GCP_Z": "152", }, +{"GCP_Id": "439", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "15912", "GCP_X": "-23.8963", "GCP_Y": "15.1556", "GCP_Z": "152", }, +{"GCP_Id": "440", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "16796", "GCP_X": "-23.8607", "GCP_Y": "15.1622", "GCP_Z": "152", }, +{"GCP_Id": "441", "GCP_Info": "", "GCP_Row": "14680", "GCP_Col": "17662", "GCP_X": "-23.8259", "GCP_Y": "15.1686", "GCP_Z": "152", }, +{"GCP_Id": "442", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "0", "GCP_X": "-24.5648", "GCP_Y": "15.0592", "GCP_Z": "131.464", }, +{"GCP_Id": "443", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "884", "GCP_X": "-24.5267", "GCP_Y": "15.0663", "GCP_Z": "131.464", }, +{"GCP_Id": "444", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "1768", "GCP_X": "-24.4888", "GCP_Y": "15.0734", "GCP_Z": "131.464", }, +{"GCP_Id": "445", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "2652", "GCP_X": "-24.4511", "GCP_Y": "15.0804", "GCP_Z": "131.464", }, +{"GCP_Id": "446", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "3536", "GCP_X": "-24.4135", "GCP_Y": "15.0874", "GCP_Z": "131.464", }, +{"GCP_Id": "447", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "4420", "GCP_X": "-24.376", "GCP_Y": "15.0944", "GCP_Z": "131.464", }, +{"GCP_Id": "448", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "5304", "GCP_X": "-24.3387", "GCP_Y": "15.1014", "GCP_Z": "131.464", }, +{"GCP_Id": "449", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "6188", "GCP_X": "-24.3016", "GCP_Y": "15.1083", "GCP_Z": "131.464", }, +{"GCP_Id": "450", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "7072", "GCP_X": "-24.2646", "GCP_Y": "15.1151", "GCP_Z": "131.464", }, +{"GCP_Id": "451", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "7956", "GCP_X": "-24.2277", "GCP_Y": "15.122", "GCP_Z": "131.464", }, +{"GCP_Id": "452", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "8840", "GCP_X": "-24.191", "GCP_Y": "15.1288", "GCP_Z": "131.464", }, +{"GCP_Id": "453", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "9724", "GCP_X": "-24.1544", "GCP_Y": "15.1356", "GCP_Z": "131.464", }, +{"GCP_Id": "454", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "10608", "GCP_X": "-24.1179", "GCP_Y": "15.1423", "GCP_Z": "131.464", }, +{"GCP_Id": "455", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "11492", "GCP_X": "-24.0816", "GCP_Y": "15.149", "GCP_Z": "131.464", }, +{"GCP_Id": "456", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "12376", "GCP_X": "-24.0453", "GCP_Y": "15.1557", "GCP_Z": "131.464", }, +{"GCP_Id": "457", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "13260", "GCP_X": "-24.0093", "GCP_Y": "15.1624", "GCP_Z": "131.464", }, +{"GCP_Id": "458", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "14144", "GCP_X": "-23.9733", "GCP_Y": "15.169", "GCP_Z": "131.464", }, +{"GCP_Id": "459", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "15028", "GCP_X": "-23.9374", "GCP_Y": "15.1756", "GCP_Z": "131.464", }, +{"GCP_Id": "460", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "15912", "GCP_X": "-23.9017", "GCP_Y": "15.1822", "GCP_Z": "131.464", }, +{"GCP_Id": "461", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "16796", "GCP_X": "-23.8661", "GCP_Y": "15.1887", "GCP_Z": "131.464", }, +{"GCP_Id": "462", "GCP_Info": "", "GCP_Row": "15414", "GCP_Col": "17662", "GCP_X": "-23.8313", "GCP_Y": "15.1951", "GCP_Z": "131.464", }, +{"GCP_Id": "463", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "0", "GCP_X": "-24.5707", "GCP_Y": "15.0857", "GCP_Z": "64.3945", }, +{"GCP_Id": "464", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "884", "GCP_X": "-24.5326", "GCP_Y": "15.0928", "GCP_Z": "64.3945", }, +{"GCP_Id": "465", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "1768", "GCP_X": "-24.4947", "GCP_Y": "15.0999", "GCP_Z": "64.3945", }, +{"GCP_Id": "466", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "2652", "GCP_X": "-24.457", "GCP_Y": "15.1069", "GCP_Z": "64.3945", }, +{"GCP_Id": "467", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "3536", "GCP_X": "-24.4194", "GCP_Y": "15.1139", "GCP_Z": "64.3945", }, +{"GCP_Id": "468", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "4420", "GCP_X": "-24.3819", "GCP_Y": "15.1209", "GCP_Z": "64.3945", }, +{"GCP_Id": "469", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "5304", "GCP_X": "-24.3446", "GCP_Y": "15.1279", "GCP_Z": "64.3945", }, +{"GCP_Id": "470", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "6188", "GCP_X": "-24.3075", "GCP_Y": "15.1348", "GCP_Z": "64.3945", }, +{"GCP_Id": "471", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "7072", "GCP_X": "-24.2704", "GCP_Y": "15.1416", "GCP_Z": "64.3945", }, +{"GCP_Id": "472", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "7956", "GCP_X": "-24.2336", "GCP_Y": "15.1485", "GCP_Z": "64.3945", }, +{"GCP_Id": "473", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "8840", "GCP_X": "-24.1968", "GCP_Y": "15.1553", "GCP_Z": "64.3945", }, +{"GCP_Id": "474", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "9724", "GCP_X": "-24.1602", "GCP_Y": "15.1621", "GCP_Z": "64.3945", }, +{"GCP_Id": "475", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "10608", "GCP_X": "-24.1237", "GCP_Y": "15.1688", "GCP_Z": "64.3945", }, +{"GCP_Id": "476", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "11492", "GCP_X": "-24.0874", "GCP_Y": "15.1755", "GCP_Z": "64.3945", }, +{"GCP_Id": "477", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "12376", "GCP_X": "-24.0512", "GCP_Y": "15.1822", "GCP_Z": "64.3945", }, +{"GCP_Id": "478", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "13260", "GCP_X": "-24.0151", "GCP_Y": "15.1889", "GCP_Z": "64.3945", }, +{"GCP_Id": "479", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "14144", "GCP_X": "-23.9791", "GCP_Y": "15.1955", "GCP_Z": "64.3945", }, +{"GCP_Id": "480", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "15028", "GCP_X": "-23.9432", "GCP_Y": "15.2021", "GCP_Z": "64.3945", }, +{"GCP_Id": "481", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "15912", "GCP_X": "-23.9075", "GCP_Y": "15.2087", "GCP_Z": "64.3945", }, +{"GCP_Id": "482", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "16796", "GCP_X": "-23.8718", "GCP_Y": "15.2153", "GCP_Z": "64.3945", }, +{"GCP_Id": "483", "GCP_Info": "", "GCP_Row": "16148", "GCP_Col": "17662", "GCP_X": "-23.837", "GCP_Y": "15.2216", "GCP_Z": "64.3945", }, +{"GCP_Id": "484", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "0", "GCP_X": "-24.5766", "GCP_Y": "15.1122", "GCP_Z": "0", }, +{"GCP_Id": "485", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "884", "GCP_X": "-24.5386", "GCP_Y": "15.1193", "GCP_Z": "0", }, +{"GCP_Id": "486", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "1768", "GCP_X": "-24.5006", "GCP_Y": "15.1264", "GCP_Z": "0", }, +{"GCP_Id": "487", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "2652", "GCP_X": "-24.4629", "GCP_Y": "15.1335", "GCP_Z": "0", }, +{"GCP_Id": "488", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "3536", "GCP_X": "-24.4253", "GCP_Y": "15.1405", "GCP_Z": "0", }, +{"GCP_Id": "489", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "4420", "GCP_X": "-24.3878", "GCP_Y": "15.1474", "GCP_Z": "0", }, +{"GCP_Id": "490", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "5304", "GCP_X": "-24.3505", "GCP_Y": "15.1544", "GCP_Z": "0", }, +{"GCP_Id": "491", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "6188", "GCP_X": "-24.3133", "GCP_Y": "15.1613", "GCP_Z": "0", }, +{"GCP_Id": "492", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "7072", "GCP_X": "-24.2763", "GCP_Y": "15.1682", "GCP_Z": "0", }, +{"GCP_Id": "493", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "7956", "GCP_X": "-24.2394", "GCP_Y": "15.175", "GCP_Z": "0", }, +{"GCP_Id": "494", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "8840", "GCP_X": "-24.2026", "GCP_Y": "15.1818", "GCP_Z": "0", }, +{"GCP_Id": "495", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "9724", "GCP_X": "-24.166", "GCP_Y": "15.1886", "GCP_Z": "0", }, +{"GCP_Id": "496", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "10608", "GCP_X": "-24.1295", "GCP_Y": "15.1953", "GCP_Z": "0", }, +{"GCP_Id": "497", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "11492", "GCP_X": "-24.0932", "GCP_Y": "15.2021", "GCP_Z": "0", }, +{"GCP_Id": "498", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "12376", "GCP_X": "-24.0569", "GCP_Y": "15.2087", "GCP_Z": "0", }, +{"GCP_Id": "499", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "13260", "GCP_X": "-24.0208", "GCP_Y": "15.2154", "GCP_Z": "0", }, +{"GCP_Id": "500", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "14144", "GCP_X": "-23.9849", "GCP_Y": "15.222", "GCP_Z": "0", }, +{"GCP_Id": "501", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "15028", "GCP_X": "-23.949", "GCP_Y": "15.2286", "GCP_Z": "0", }, +{"GCP_Id": "502", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "15912", "GCP_X": "-23.9132", "GCP_Y": "15.2352", "GCP_Z": "0", }, +{"GCP_Id": "503", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "16796", "GCP_X": "-23.8776", "GCP_Y": "15.2418", "GCP_Z": "0", }, +{"GCP_Id": "504", "GCP_Info": "", "GCP_Row": "16882", "GCP_Col": "17662", "GCP_X": "-23.8428", "GCP_Y": "15.2482", "GCP_Z": "0", }, +{"GCP_Id": "505", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "0", "GCP_X": "-24.5819", "GCP_Y": "15.1388", "GCP_Z": "0", }, +{"GCP_Id": "506", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "884", "GCP_X": "-24.5438", "GCP_Y": "15.146", "GCP_Z": "0", }, +{"GCP_Id": "507", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "1768", "GCP_X": "-24.5059", "GCP_Y": "15.153", "GCP_Z": "0", }, +{"GCP_Id": "508", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "2652", "GCP_X": "-24.4681", "GCP_Y": "15.1601", "GCP_Z": "0", }, +{"GCP_Id": "509", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "3536", "GCP_X": "-24.4305", "GCP_Y": "15.1671", "GCP_Z": "0", }, +{"GCP_Id": "510", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "4420", "GCP_X": "-24.393", "GCP_Y": "15.1741", "GCP_Z": "0", }, +{"GCP_Id": "511", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "5304", "GCP_X": "-24.3557", "GCP_Y": "15.181", "GCP_Z": "0", }, +{"GCP_Id": "512", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "6188", "GCP_X": "-24.3186", "GCP_Y": "15.1879", "GCP_Z": "0", }, +{"GCP_Id": "513", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "7072", "GCP_X": "-24.2815", "GCP_Y": "15.1948", "GCP_Z": "0", }, +{"GCP_Id": "514", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "7956", "GCP_X": "-24.2446", "GCP_Y": "15.2016", "GCP_Z": "0", }, +{"GCP_Id": "515", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "8840", "GCP_X": "-24.2079", "GCP_Y": "15.2084", "GCP_Z": "0", }, +{"GCP_Id": "516", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "9724", "GCP_X": "-24.1713", "GCP_Y": "15.2152", "GCP_Z": "0", }, +{"GCP_Id": "517", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "10608", "GCP_X": "-24.1348", "GCP_Y": "15.222", "GCP_Z": "0", }, +{"GCP_Id": "518", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "11492", "GCP_X": "-24.0984", "GCP_Y": "15.2287", "GCP_Z": "0", }, +{"GCP_Id": "519", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "12376", "GCP_X": "-24.0622", "GCP_Y": "15.2354", "GCP_Z": "0", }, +{"GCP_Id": "520", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "13260", "GCP_X": "-24.026", "GCP_Y": "15.242", "GCP_Z": "0", }, +{"GCP_Id": "521", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "14144", "GCP_X": "-23.9901", "GCP_Y": "15.2487", "GCP_Z": "0", }, +{"GCP_Id": "522", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "15028", "GCP_X": "-23.9542", "GCP_Y": "15.2553", "GCP_Z": "0", }, +{"GCP_Id": "523", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "15912", "GCP_X": "-23.9184", "GCP_Y": "15.2618", "GCP_Z": "0", }, +{"GCP_Id": "524", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "16796", "GCP_X": "-23.8828", "GCP_Y": "15.2684", "GCP_Z": "0", }, +{"GCP_Id": "525", "GCP_Info": "", "GCP_Row": "17616", "GCP_Col": "17662", "GCP_X": "-23.848", "GCP_Y": "15.2748", "GCP_Z": "0", }, +{"GCP_Id": "526", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "0", "GCP_X": "-24.5872", "GCP_Y": "15.1655", "GCP_Z": "0", }, +{"GCP_Id": "527", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "884", "GCP_X": "-24.5491", "GCP_Y": "15.1726", "GCP_Z": "0", }, +{"GCP_Id": "528", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "1768", "GCP_X": "-24.5112", "GCP_Y": "15.1797", "GCP_Z": "0", }, +{"GCP_Id": "529", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "2652", "GCP_X": "-24.4734", "GCP_Y": "15.1867", "GCP_Z": "0", }, +{"GCP_Id": "530", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "3536", "GCP_X": "-24.4358", "GCP_Y": "15.1937", "GCP_Z": "0", }, +{"GCP_Id": "531", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "4420", "GCP_X": "-24.3983", "GCP_Y": "15.2007", "GCP_Z": "0", }, +{"GCP_Id": "532", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "5304", "GCP_X": "-24.361", "GCP_Y": "15.2076", "GCP_Z": "0", }, +{"GCP_Id": "533", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "6188", "GCP_X": "-24.3238", "GCP_Y": "15.2145", "GCP_Z": "0", }, +{"GCP_Id": "534", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "7072", "GCP_X": "-24.2868", "GCP_Y": "15.2214", "GCP_Z": "0", }, +{"GCP_Id": "535", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "7956", "GCP_X": "-24.2499", "GCP_Y": "15.2283", "GCP_Z": "0", }, +{"GCP_Id": "536", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "8840", "GCP_X": "-24.2131", "GCP_Y": "15.2351", "GCP_Z": "0", }, +{"GCP_Id": "537", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "9724", "GCP_X": "-24.1765", "GCP_Y": "15.2418", "GCP_Z": "0", }, +{"GCP_Id": "538", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "10608", "GCP_X": "-24.14", "GCP_Y": "15.2486", "GCP_Z": "0", }, +{"GCP_Id": "539", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "11492", "GCP_X": "-24.1036", "GCP_Y": "15.2553", "GCP_Z": "0", }, +{"GCP_Id": "540", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "12376", "GCP_X": "-24.0674", "GCP_Y": "15.262", "GCP_Z": "0", }, +{"GCP_Id": "541", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "13260", "GCP_X": "-24.0313", "GCP_Y": "15.2686", "GCP_Z": "0", }, +{"GCP_Id": "542", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "14144", "GCP_X": "-23.9953", "GCP_Y": "15.2753", "GCP_Z": "0", }, +{"GCP_Id": "543", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "15028", "GCP_X": "-23.9594", "GCP_Y": "15.2819", "GCP_Z": "0", }, +{"GCP_Id": "544", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "15912", "GCP_X": "-23.9236", "GCP_Y": "15.2884", "GCP_Z": "0", }, +{"GCP_Id": "545", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "16796", "GCP_X": "-23.888", "GCP_Y": "15.295", "GCP_Z": "0", }, +{"GCP_Id": "546", "GCP_Info": "", "GCP_Row": "18350", "GCP_Col": "17662", "GCP_X": "-23.8531", "GCP_Y": "15.3014", "GCP_Z": "0", }, +{"GCP_Id": "547", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "0", "GCP_X": "-24.5925", "GCP_Y": "15.1921", "GCP_Z": "0", }, +{"GCP_Id": "548", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "884", "GCP_X": "-24.5544", "GCP_Y": "15.1992", "GCP_Z": "0", }, +{"GCP_Id": "549", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "1768", "GCP_X": "-24.5164", "GCP_Y": "15.2063", "GCP_Z": "0", }, +{"GCP_Id": "550", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "2652", "GCP_X": "-24.4787", "GCP_Y": "15.2134", "GCP_Z": "0", }, +{"GCP_Id": "551", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "3536", "GCP_X": "-24.441", "GCP_Y": "15.2204", "GCP_Z": "0", }, +{"GCP_Id": "552", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "4420", "GCP_X": "-24.4036", "GCP_Y": "15.2273", "GCP_Z": "0", }, +{"GCP_Id": "553", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "5304", "GCP_X": "-24.3662", "GCP_Y": "15.2343", "GCP_Z": "0", }, +{"GCP_Id": "554", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "6188", "GCP_X": "-24.329", "GCP_Y": "15.2412", "GCP_Z": "0", }, +{"GCP_Id": "555", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "7072", "GCP_X": "-24.292", "GCP_Y": "15.248", "GCP_Z": "0", }, +{"GCP_Id": "556", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "7956", "GCP_X": "-24.2551", "GCP_Y": "15.2549", "GCP_Z": "0", }, +{"GCP_Id": "557", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "8840", "GCP_X": "-24.2183", "GCP_Y": "15.2617", "GCP_Z": "0", }, +{"GCP_Id": "558", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "9724", "GCP_X": "-24.1817", "GCP_Y": "15.2685", "GCP_Z": "0", }, +{"GCP_Id": "559", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "10608", "GCP_X": "-24.1452", "GCP_Y": "15.2752", "GCP_Z": "0", }, +{"GCP_Id": "560", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "11492", "GCP_X": "-24.1088", "GCP_Y": "15.2819", "GCP_Z": "0", }, +{"GCP_Id": "561", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "12376", "GCP_X": "-24.0726", "GCP_Y": "15.2886", "GCP_Z": "0", }, +{"GCP_Id": "562", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "13260", "GCP_X": "-24.0365", "GCP_Y": "15.2953", "GCP_Z": "0", }, +{"GCP_Id": "563", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "14144", "GCP_X": "-24.0005", "GCP_Y": "15.3019", "GCP_Z": "0", }, +{"GCP_Id": "564", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "15028", "GCP_X": "-23.9646", "GCP_Y": "15.3085", "GCP_Z": "0", }, +{"GCP_Id": "565", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "15912", "GCP_X": "-23.9288", "GCP_Y": "15.3151", "GCP_Z": "0", }, +{"GCP_Id": "566", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "16796", "GCP_X": "-23.8932", "GCP_Y": "15.3216", "GCP_Z": "0", }, +{"GCP_Id": "567", "GCP_Info": "", "GCP_Row": "19084", "GCP_Col": "17662", "GCP_X": "-23.8583", "GCP_Y": "15.328", "GCP_Z": "0", }, +{"GCP_Id": "568", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "0", "GCP_X": "-24.5978", "GCP_Y": "15.2188", "GCP_Z": "0", }, +{"GCP_Id": "569", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "884", "GCP_X": "-24.5597", "GCP_Y": "15.2259", "GCP_Z": "0", }, +{"GCP_Id": "570", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "1768", "GCP_X": "-24.5217", "GCP_Y": "15.2329", "GCP_Z": "0", }, +{"GCP_Id": "571", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "2652", "GCP_X": "-24.4839", "GCP_Y": "15.24", "GCP_Z": "0", }, +{"GCP_Id": "572", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "3536", "GCP_X": "-24.4463", "GCP_Y": "15.247", "GCP_Z": "0", }, +{"GCP_Id": "573", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "4420", "GCP_X": "-24.4088", "GCP_Y": "15.254", "GCP_Z": "0", }, +{"GCP_Id": "574", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "5304", "GCP_X": "-24.3715", "GCP_Y": "15.2609", "GCP_Z": "0", }, +{"GCP_Id": "575", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "6188", "GCP_X": "-24.3343", "GCP_Y": "15.2678", "GCP_Z": "0", }, +{"GCP_Id": "576", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "7072", "GCP_X": "-24.2972", "GCP_Y": "15.2747", "GCP_Z": "0", }, +{"GCP_Id": "577", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "7956", "GCP_X": "-24.2603", "GCP_Y": "15.2815", "GCP_Z": "0", }, +{"GCP_Id": "578", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "8840", "GCP_X": "-24.2236", "GCP_Y": "15.2883", "GCP_Z": "0", }, +{"GCP_Id": "579", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "9724", "GCP_X": "-24.1869", "GCP_Y": "15.2951", "GCP_Z": "0", }, +{"GCP_Id": "580", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "10608", "GCP_X": "-24.1504", "GCP_Y": "15.3018", "GCP_Z": "0", }, +{"GCP_Id": "581", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "11492", "GCP_X": "-24.1141", "GCP_Y": "15.3085", "GCP_Z": "0", }, +{"GCP_Id": "582", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "12376", "GCP_X": "-24.0778", "GCP_Y": "15.3152", "GCP_Z": "0", }, +{"GCP_Id": "583", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "13260", "GCP_X": "-24.0417", "GCP_Y": "15.3219", "GCP_Z": "0", }, +{"GCP_Id": "584", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "14144", "GCP_X": "-24.0057", "GCP_Y": "15.3285", "GCP_Z": "0", }, +{"GCP_Id": "585", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "15028", "GCP_X": "-23.9698", "GCP_Y": "15.3351", "GCP_Z": "0", }, +{"GCP_Id": "586", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "15912", "GCP_X": "-23.934", "GCP_Y": "15.3417", "GCP_Z": "0", }, +{"GCP_Id": "587", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "16796", "GCP_X": "-23.8983", "GCP_Y": "15.3482", "GCP_Z": "0", }, +{"GCP_Id": "588", "GCP_Info": "", "GCP_Row": "19818", "GCP_Col": "17662", "GCP_X": "-23.8635", "GCP_Y": "15.3546", "GCP_Z": "0", }, +{"GCP_Id": "589", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "0", "GCP_X": "-24.603", "GCP_Y": "15.2454", "GCP_Z": "0", }, +{"GCP_Id": "590", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "884", "GCP_X": "-24.5649", "GCP_Y": "15.2525", "GCP_Z": "0", }, +{"GCP_Id": "591", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "1768", "GCP_X": "-24.527", "GCP_Y": "15.2596", "GCP_Z": "0", }, +{"GCP_Id": "592", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "2652", "GCP_X": "-24.4892", "GCP_Y": "15.2666", "GCP_Z": "0", }, +{"GCP_Id": "593", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "3536", "GCP_X": "-24.4516", "GCP_Y": "15.2736", "GCP_Z": "0", }, +{"GCP_Id": "594", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "4420", "GCP_X": "-24.4141", "GCP_Y": "15.2806", "GCP_Z": "0", }, +{"GCP_Id": "595", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "5304", "GCP_X": "-24.3767", "GCP_Y": "15.2875", "GCP_Z": "0", }, +{"GCP_Id": "596", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "6188", "GCP_X": "-24.3395", "GCP_Y": "15.2944", "GCP_Z": "0", }, +{"GCP_Id": "597", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "7072", "GCP_X": "-24.3025", "GCP_Y": "15.3013", "GCP_Z": "0", }, +{"GCP_Id": "598", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "7956", "GCP_X": "-24.2656", "GCP_Y": "15.3081", "GCP_Z": "0", }, +{"GCP_Id": "599", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "8840", "GCP_X": "-24.2288", "GCP_Y": "15.3149", "GCP_Z": "0", }, +{"GCP_Id": "600", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "9724", "GCP_X": "-24.1922", "GCP_Y": "15.3217", "GCP_Z": "0", }, +{"GCP_Id": "601", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "10608", "GCP_X": "-24.1557", "GCP_Y": "15.3284", "GCP_Z": "0", }, +{"GCP_Id": "602", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "11492", "GCP_X": "-24.1193", "GCP_Y": "15.3352", "GCP_Z": "0", }, +{"GCP_Id": "603", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "12376", "GCP_X": "-24.083", "GCP_Y": "15.3418", "GCP_Z": "0", }, +{"GCP_Id": "604", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "13260", "GCP_X": "-24.0469", "GCP_Y": "15.3485", "GCP_Z": "0", }, +{"GCP_Id": "605", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "14144", "GCP_X": "-24.0109", "GCP_Y": "15.3551", "GCP_Z": "0", }, +{"GCP_Id": "606", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "15028", "GCP_X": "-23.975", "GCP_Y": "15.3617", "GCP_Z": "0", }, +{"GCP_Id": "607", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "15912", "GCP_X": "-23.9392", "GCP_Y": "15.3683", "GCP_Z": "0", }, +{"GCP_Id": "608", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "16796", "GCP_X": "-23.9035", "GCP_Y": "15.3748", "GCP_Z": "0", }, +{"GCP_Id": "609", "GCP_Info": "", "GCP_Row": "20552", "GCP_Col": "17662", "GCP_X": "-23.8687", "GCP_Y": "15.3812", "GCP_Z": "0", }, +{"GCP_Id": "610", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "0", "GCP_X": "-24.6083", "GCP_Y": "15.272", "GCP_Z": "0", }, +{"GCP_Id": "611", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "884", "GCP_X": "-24.5702", "GCP_Y": "15.2791", "GCP_Z": "0", }, +{"GCP_Id": "612", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "1768", "GCP_X": "-24.5323", "GCP_Y": "15.2862", "GCP_Z": "0", }, +{"GCP_Id": "613", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "2652", "GCP_X": "-24.4945", "GCP_Y": "15.2933", "GCP_Z": "0", }, +{"GCP_Id": "614", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "3536", "GCP_X": "-24.4568", "GCP_Y": "15.3003", "GCP_Z": "0", }, +{"GCP_Id": "615", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "4420", "GCP_X": "-24.4193", "GCP_Y": "15.3072", "GCP_Z": "0", }, +{"GCP_Id": "616", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "5304", "GCP_X": "-24.382", "GCP_Y": "15.3142", "GCP_Z": "0", }, +{"GCP_Id": "617", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "6188", "GCP_X": "-24.3448", "GCP_Y": "15.3211", "GCP_Z": "0", }, +{"GCP_Id": "618", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "7072", "GCP_X": "-24.3077", "GCP_Y": "15.3279", "GCP_Z": "0", }, +{"GCP_Id": "619", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "7956", "GCP_X": "-24.2708", "GCP_Y": "15.3348", "GCP_Z": "0", }, +{"GCP_Id": "620", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "8840", "GCP_X": "-24.234", "GCP_Y": "15.3416", "GCP_Z": "0", }, +{"GCP_Id": "621", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "9724", "GCP_X": "-24.1974", "GCP_Y": "15.3483", "GCP_Z": "0", }, +{"GCP_Id": "622", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "10608", "GCP_X": "-24.1609", "GCP_Y": "15.3551", "GCP_Z": "0", }, +{"GCP_Id": "623", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "11492", "GCP_X": "-24.1245", "GCP_Y": "15.3618", "GCP_Z": "0", }, +{"GCP_Id": "624", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "12376", "GCP_X": "-24.0882", "GCP_Y": "15.3685", "GCP_Z": "0", }, +{"GCP_Id": "625", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "13260", "GCP_X": "-24.0521", "GCP_Y": "15.3751", "GCP_Z": "0", }, +{"GCP_Id": "626", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "14144", "GCP_X": "-24.0161", "GCP_Y": "15.3817", "GCP_Z": "0", }, +{"GCP_Id": "627", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "15028", "GCP_X": "-23.9802", "GCP_Y": "15.3883", "GCP_Z": "0", }, +{"GCP_Id": "628", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "15912", "GCP_X": "-23.9444", "GCP_Y": "15.3949", "GCP_Z": "0", }, +{"GCP_Id": "629", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "16796", "GCP_X": "-23.9087", "GCP_Y": "15.4014", "GCP_Z": "0", }, +{"GCP_Id": "630", "GCP_Info": "", "GCP_Row": "21286", "GCP_Col": "17662", "GCP_X": "-23.8739", "GCP_Y": "15.4078", "GCP_Z": "0", }, +{"GCP_Id": "631", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "0", "GCP_X": "-24.6136", "GCP_Y": "15.2987", "GCP_Z": "0", }, +{"GCP_Id": "632", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "884", "GCP_X": "-24.5755", "GCP_Y": "15.3058", "GCP_Z": "0", }, +{"GCP_Id": "633", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "1768", "GCP_X": "-24.5375", "GCP_Y": "15.3128", "GCP_Z": "0", }, +{"GCP_Id": "634", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "2652", "GCP_X": "-24.4997", "GCP_Y": "15.3199", "GCP_Z": "0", }, +{"GCP_Id": "635", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "3536", "GCP_X": "-24.4621", "GCP_Y": "15.3269", "GCP_Z": "0", }, +{"GCP_Id": "636", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "4420", "GCP_X": "-24.4246", "GCP_Y": "15.3339", "GCP_Z": "0", }, +{"GCP_Id": "637", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "5304", "GCP_X": "-24.3872", "GCP_Y": "15.3408", "GCP_Z": "0", }, +{"GCP_Id": "638", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "6188", "GCP_X": "-24.35", "GCP_Y": "15.3477", "GCP_Z": "0", }, +{"GCP_Id": "639", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "7072", "GCP_X": "-24.313", "GCP_Y": "15.3545", "GCP_Z": "0", }, +{"GCP_Id": "640", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "7956", "GCP_X": "-24.276", "GCP_Y": "15.3614", "GCP_Z": "0", }, +{"GCP_Id": "641", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "8840", "GCP_X": "-24.2393", "GCP_Y": "15.3682", "GCP_Z": "0", }, +{"GCP_Id": "642", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "9724", "GCP_X": "-24.2026", "GCP_Y": "15.3749", "GCP_Z": "0", }, +{"GCP_Id": "643", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "10608", "GCP_X": "-24.1661", "GCP_Y": "15.3817", "GCP_Z": "0", }, +{"GCP_Id": "644", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "11492", "GCP_X": "-24.1297", "GCP_Y": "15.3884", "GCP_Z": "0", }, +{"GCP_Id": "645", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "12376", "GCP_X": "-24.0934", "GCP_Y": "15.3951", "GCP_Z": "0", }, +{"GCP_Id": "646", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "13260", "GCP_X": "-24.0573", "GCP_Y": "15.4017", "GCP_Z": "0", }, +{"GCP_Id": "647", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "14144", "GCP_X": "-24.0213", "GCP_Y": "15.4083", "GCP_Z": "0", }, +{"GCP_Id": "648", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "15028", "GCP_X": "-23.9854", "GCP_Y": "15.4149", "GCP_Z": "0", }, +{"GCP_Id": "649", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "15912", "GCP_X": "-23.9496", "GCP_Y": "15.4215", "GCP_Z": "0", }, +{"GCP_Id": "650", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "16796", "GCP_X": "-23.9139", "GCP_Y": "15.428", "GCP_Z": "0", }, +{"GCP_Id": "651", "GCP_Info": "", "GCP_Row": "22020", "GCP_Col": "17662", "GCP_X": "-23.8791", "GCP_Y": "15.4344", "GCP_Z": "0", }, +{"GCP_Id": "652", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "0", "GCP_X": "-24.6189", "GCP_Y": "15.3253", "GCP_Z": "0", }, +{"GCP_Id": "653", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "884", "GCP_X": "-24.5808", "GCP_Y": "15.3324", "GCP_Z": "0", }, +{"GCP_Id": "654", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "1768", "GCP_X": "-24.5428", "GCP_Y": "15.3395", "GCP_Z": "0", }, +{"GCP_Id": "655", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "2652", "GCP_X": "-24.505", "GCP_Y": "15.3465", "GCP_Z": "0", }, +{"GCP_Id": "656", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "3536", "GCP_X": "-24.4673", "GCP_Y": "15.3535", "GCP_Z": "0", }, +{"GCP_Id": "657", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "4420", "GCP_X": "-24.4298", "GCP_Y": "15.3605", "GCP_Z": "0", }, +{"GCP_Id": "658", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "5304", "GCP_X": "-24.3925", "GCP_Y": "15.3674", "GCP_Z": "0", }, +{"GCP_Id": "659", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "6188", "GCP_X": "-24.3553", "GCP_Y": "15.3743", "GCP_Z": "0", }, +{"GCP_Id": "660", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "7072", "GCP_X": "-24.3182", "GCP_Y": "15.3812", "GCP_Z": "0", }, +{"GCP_Id": "661", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "7956", "GCP_X": "-24.2813", "GCP_Y": "15.388", "GCP_Z": "0", }, +{"GCP_Id": "662", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "8840", "GCP_X": "-24.2445", "GCP_Y": "15.3948", "GCP_Z": "0", }, +{"GCP_Id": "663", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "9724", "GCP_X": "-24.2078", "GCP_Y": "15.4016", "GCP_Z": "0", }, +{"GCP_Id": "664", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "10608", "GCP_X": "-24.1713", "GCP_Y": "15.4083", "GCP_Z": "0", }, +{"GCP_Id": "665", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "11492", "GCP_X": "-24.1349", "GCP_Y": "15.415", "GCP_Z": "0", }, +{"GCP_Id": "666", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "12376", "GCP_X": "-24.0986", "GCP_Y": "15.4217", "GCP_Z": "0", }, +{"GCP_Id": "667", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "13260", "GCP_X": "-24.0625", "GCP_Y": "15.4283", "GCP_Z": "0", }, +{"GCP_Id": "668", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "14144", "GCP_X": "-24.0265", "GCP_Y": "15.435", "GCP_Z": "0", }, +{"GCP_Id": "669", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "15028", "GCP_X": "-23.9906", "GCP_Y": "15.4416", "GCP_Z": "0", }, +{"GCP_Id": "670", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "15912", "GCP_X": "-23.9548", "GCP_Y": "15.4481", "GCP_Z": "0", }, +{"GCP_Id": "671", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "16796", "GCP_X": "-23.9191", "GCP_Y": "15.4547", "GCP_Z": "0", }, +{"GCP_Id": "672", "GCP_Info": "", "GCP_Row": "22754", "GCP_Col": "17662", "GCP_X": "-23.8842", "GCP_Y": "15.461", "GCP_Z": "0", }, +{"GCP_Id": "673", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "0", "GCP_X": "-24.6242", "GCP_Y": "15.3519", "GCP_Z": "0", }, +{"GCP_Id": "674", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "884", "GCP_X": "-24.586", "GCP_Y": "15.359", "GCP_Z": "0", }, +{"GCP_Id": "675", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "1768", "GCP_X": "-24.5481", "GCP_Y": "15.3661", "GCP_Z": "0", }, +{"GCP_Id": "676", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "2652", "GCP_X": "-24.5103", "GCP_Y": "15.3732", "GCP_Z": "0", }, +{"GCP_Id": "677", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "3536", "GCP_X": "-24.4726", "GCP_Y": "15.3801", "GCP_Z": "0", }, +{"GCP_Id": "678", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "4420", "GCP_X": "-24.4351", "GCP_Y": "15.3871", "GCP_Z": "0", }, +{"GCP_Id": "679", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "5304", "GCP_X": "-24.3977", "GCP_Y": "15.394", "GCP_Z": "0", }, +{"GCP_Id": "680", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "6188", "GCP_X": "-24.3605", "GCP_Y": "15.4009", "GCP_Z": "0", }, +{"GCP_Id": "681", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "7072", "GCP_X": "-24.3235", "GCP_Y": "15.4078", "GCP_Z": "0", }, +{"GCP_Id": "682", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "7956", "GCP_X": "-24.2865", "GCP_Y": "15.4146", "GCP_Z": "0", }, +{"GCP_Id": "683", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "8840", "GCP_X": "-24.2497", "GCP_Y": "15.4214", "GCP_Z": "0", }, +{"GCP_Id": "684", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "9724", "GCP_X": "-24.2131", "GCP_Y": "15.4282", "GCP_Z": "0", }, +{"GCP_Id": "685", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "10608", "GCP_X": "-24.1765", "GCP_Y": "15.4349", "GCP_Z": "0", }, +{"GCP_Id": "686", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "11492", "GCP_X": "-24.1401", "GCP_Y": "15.4416", "GCP_Z": "0", }, +{"GCP_Id": "687", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "12376", "GCP_X": "-24.1039", "GCP_Y": "15.4483", "GCP_Z": "0", }, +{"GCP_Id": "688", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "13260", "GCP_X": "-24.0677", "GCP_Y": "15.455", "GCP_Z": "0", }, +{"GCP_Id": "689", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "14144", "GCP_X": "-24.0317", "GCP_Y": "15.4616", "GCP_Z": "0", }, +{"GCP_Id": "690", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "15028", "GCP_X": "-23.9958", "GCP_Y": "15.4682", "GCP_Z": "0", }, +{"GCP_Id": "691", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "15912", "GCP_X": "-23.96", "GCP_Y": "15.4747", "GCP_Z": "0", }, +{"GCP_Id": "692", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "16796", "GCP_X": "-23.9243", "GCP_Y": "15.4813", "GCP_Z": "0", }, +{"GCP_Id": "693", "GCP_Info": "", "GCP_Row": "23488", "GCP_Col": "17662", "GCP_X": "-23.8894", "GCP_Y": "15.4876", "GCP_Z": "0", }, +{"GCP_Id": "694", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "0", "GCP_X": "-24.6294", "GCP_Y": "15.3786", "GCP_Z": "0", }, +{"GCP_Id": "695", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "884", "GCP_X": "-24.5913", "GCP_Y": "15.3857", "GCP_Z": "0", }, +{"GCP_Id": "696", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "1768", "GCP_X": "-24.5533", "GCP_Y": "15.3928", "GCP_Z": "0", }, +{"GCP_Id": "697", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "2652", "GCP_X": "-24.5155", "GCP_Y": "15.3998", "GCP_Z": "0", }, +{"GCP_Id": "698", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "3536", "GCP_X": "-24.4779", "GCP_Y": "15.4068", "GCP_Z": "0", }, +{"GCP_Id": "699", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "4420", "GCP_X": "-24.4403", "GCP_Y": "15.4137", "GCP_Z": "0", }, +{"GCP_Id": "700", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "5304", "GCP_X": "-24.403", "GCP_Y": "15.4207", "GCP_Z": "0", }, +{"GCP_Id": "701", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "6188", "GCP_X": "-24.3658", "GCP_Y": "15.4276", "GCP_Z": "0", }, +{"GCP_Id": "702", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "7072", "GCP_X": "-24.3287", "GCP_Y": "15.4344", "GCP_Z": "0", }, +{"GCP_Id": "703", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "7956", "GCP_X": "-24.2918", "GCP_Y": "15.4413", "GCP_Z": "0", }, +{"GCP_Id": "704", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "8840", "GCP_X": "-24.255", "GCP_Y": "15.4481", "GCP_Z": "0", }, +{"GCP_Id": "705", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "9724", "GCP_X": "-24.2183", "GCP_Y": "15.4548", "GCP_Z": "0", }, +{"GCP_Id": "706", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "10608", "GCP_X": "-24.1818", "GCP_Y": "15.4616", "GCP_Z": "0", }, +{"GCP_Id": "707", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "11492", "GCP_X": "-24.1453", "GCP_Y": "15.4683", "GCP_Z": "0", }, +{"GCP_Id": "708", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "12376", "GCP_X": "-24.1091", "GCP_Y": "15.4749", "GCP_Z": "0", }, +{"GCP_Id": "709", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "13260", "GCP_X": "-24.0729", "GCP_Y": "15.4816", "GCP_Z": "0", }, +{"GCP_Id": "710", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "14144", "GCP_X": "-24.0369", "GCP_Y": "15.4882", "GCP_Z": "0", }, +{"GCP_Id": "711", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "15028", "GCP_X": "-24.001", "GCP_Y": "15.4948", "GCP_Z": "0", }, +{"GCP_Id": "712", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "15912", "GCP_X": "-23.9651", "GCP_Y": "15.5013", "GCP_Z": "0", }, +{"GCP_Id": "713", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "16796", "GCP_X": "-23.9295", "GCP_Y": "15.5079", "GCP_Z": "0", }, +{"GCP_Id": "714", "GCP_Info": "", "GCP_Row": "24222", "GCP_Col": "17662", "GCP_X": "-23.8946", "GCP_Y": "15.5143", "GCP_Z": "0", }, +{"GCP_Id": "715", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "0", "GCP_X": "-24.6347", "GCP_Y": "15.4052", "GCP_Z": "0", }, +{"GCP_Id": "716", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "884", "GCP_X": "-24.5966", "GCP_Y": "15.4123", "GCP_Z": "0", }, +{"GCP_Id": "717", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "1768", "GCP_X": "-24.5586", "GCP_Y": "15.4194", "GCP_Z": "0", }, +{"GCP_Id": "718", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "2652", "GCP_X": "-24.5208", "GCP_Y": "15.4264", "GCP_Z": "0", }, +{"GCP_Id": "719", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "3536", "GCP_X": "-24.4831", "GCP_Y": "15.4334", "GCP_Z": "0", }, +{"GCP_Id": "720", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "4420", "GCP_X": "-24.4456", "GCP_Y": "15.4404", "GCP_Z": "0", }, +{"GCP_Id": "721", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "5304", "GCP_X": "-24.4082", "GCP_Y": "15.4473", "GCP_Z": "0", }, +{"GCP_Id": "722", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "6188", "GCP_X": "-24.371", "GCP_Y": "15.4542", "GCP_Z": "0", }, +{"GCP_Id": "723", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "7072", "GCP_X": "-24.3339", "GCP_Y": "15.4611", "GCP_Z": "0", }, +{"GCP_Id": "724", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "7956", "GCP_X": "-24.297", "GCP_Y": "15.4679", "GCP_Z": "0", }, +{"GCP_Id": "725", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "8840", "GCP_X": "-24.2602", "GCP_Y": "15.4747", "GCP_Z": "0", }, +{"GCP_Id": "726", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "9724", "GCP_X": "-24.2235", "GCP_Y": "15.4814", "GCP_Z": "0", }, +{"GCP_Id": "727", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "10608", "GCP_X": "-24.187", "GCP_Y": "15.4882", "GCP_Z": "0", }, +{"GCP_Id": "728", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "11492", "GCP_X": "-24.1506", "GCP_Y": "15.4949", "GCP_Z": "0", }, +{"GCP_Id": "729", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "12376", "GCP_X": "-24.1143", "GCP_Y": "15.5015", "GCP_Z": "0", }, +{"GCP_Id": "730", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "13260", "GCP_X": "-24.0781", "GCP_Y": "15.5082", "GCP_Z": "0", }, +{"GCP_Id": "731", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "14144", "GCP_X": "-24.0421", "GCP_Y": "15.5148", "GCP_Z": "0", }, +{"GCP_Id": "732", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "15028", "GCP_X": "-24.0061", "GCP_Y": "15.5214", "GCP_Z": "0", }, +{"GCP_Id": "733", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "15912", "GCP_X": "-23.9703", "GCP_Y": "15.528", "GCP_Z": "0", }, +{"GCP_Id": "734", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "16796", "GCP_X": "-23.9346", "GCP_Y": "15.5345", "GCP_Z": "0", }, +{"GCP_Id": "735", "GCP_Info": "", "GCP_Row": "24956", "GCP_Col": "17662", "GCP_X": "-23.8998", "GCP_Y": "15.5409", "GCP_Z": "0", }, +{"GCP_Id": "736", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "0", "GCP_X": "-24.64", "GCP_Y": "15.4318", "GCP_Z": "0", }, +{"GCP_Id": "737", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "884", "GCP_X": "-24.6019", "GCP_Y": "15.439", "GCP_Z": "0", }, +{"GCP_Id": "738", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "1768", "GCP_X": "-24.5639", "GCP_Y": "15.446", "GCP_Z": "0", }, +{"GCP_Id": "739", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "2652", "GCP_X": "-24.526", "GCP_Y": "15.453", "GCP_Z": "0", }, +{"GCP_Id": "740", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "3536", "GCP_X": "-24.4884", "GCP_Y": "15.46", "GCP_Z": "0", }, +{"GCP_Id": "741", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "4420", "GCP_X": "-24.4509", "GCP_Y": "15.467", "GCP_Z": "0", }, +{"GCP_Id": "742", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "5304", "GCP_X": "-24.4135", "GCP_Y": "15.4739", "GCP_Z": "0", }, +{"GCP_Id": "743", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "6188", "GCP_X": "-24.3763", "GCP_Y": "15.4808", "GCP_Z": "0", }, +{"GCP_Id": "744", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "7072", "GCP_X": "-24.3392", "GCP_Y": "15.4877", "GCP_Z": "0", }, +{"GCP_Id": "745", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "7956", "GCP_X": "-24.3022", "GCP_Y": "15.4945", "GCP_Z": "0", }, +{"GCP_Id": "746", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "8840", "GCP_X": "-24.2654", "GCP_Y": "15.5013", "GCP_Z": "0", }, +{"GCP_Id": "747", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "9724", "GCP_X": "-24.2287", "GCP_Y": "15.5081", "GCP_Z": "0", }, +{"GCP_Id": "748", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "10608", "GCP_X": "-24.1922", "GCP_Y": "15.5148", "GCP_Z": "0", }, +{"GCP_Id": "749", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "11492", "GCP_X": "-24.1558", "GCP_Y": "15.5215", "GCP_Z": "0", }, +{"GCP_Id": "750", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "12376", "GCP_X": "-24.1195", "GCP_Y": "15.5282", "GCP_Z": "0", }, +{"GCP_Id": "751", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "13260", "GCP_X": "-24.0833", "GCP_Y": "15.5348", "GCP_Z": "0", }, +{"GCP_Id": "752", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "14144", "GCP_X": "-24.0473", "GCP_Y": "15.5414", "GCP_Z": "0", }, +{"GCP_Id": "753", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "15028", "GCP_X": "-24.0113", "GCP_Y": "15.548", "GCP_Z": "0", }, +{"GCP_Id": "754", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "15912", "GCP_X": "-23.9755", "GCP_Y": "15.5546", "GCP_Z": "0", }, +{"GCP_Id": "755", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "16796", "GCP_X": "-23.9398", "GCP_Y": "15.5611", "GCP_Z": "0", }, +{"GCP_Id": "756", "GCP_Info": "", "GCP_Row": "25690", "GCP_Col": "17662", "GCP_X": "-23.905", "GCP_Y": "15.5675", "GCP_Z": "0", }, +{"GCP_Id": "757", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "0", "GCP_X": "-24.6453", "GCP_Y": "15.4585", "GCP_Z": "0", }, +{"GCP_Id": "758", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "884", "GCP_X": "-24.6071", "GCP_Y": "15.4656", "GCP_Z": "0", }, +{"GCP_Id": "759", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "1768", "GCP_X": "-24.5691", "GCP_Y": "15.4727", "GCP_Z": "0", }, +{"GCP_Id": "760", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "2652", "GCP_X": "-24.5313", "GCP_Y": "15.4797", "GCP_Z": "0", }, +{"GCP_Id": "761", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "3536", "GCP_X": "-24.4936", "GCP_Y": "15.4867", "GCP_Z": "0", }, +{"GCP_Id": "762", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "4420", "GCP_X": "-24.4561", "GCP_Y": "15.4936", "GCP_Z": "0", }, +{"GCP_Id": "763", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "5304", "GCP_X": "-24.4187", "GCP_Y": "15.5006", "GCP_Z": "0", }, +{"GCP_Id": "764", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "6188", "GCP_X": "-24.3815", "GCP_Y": "15.5074", "GCP_Z": "0", }, +{"GCP_Id": "765", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "7072", "GCP_X": "-24.3444", "GCP_Y": "15.5143", "GCP_Z": "0", }, +{"GCP_Id": "766", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "7956", "GCP_X": "-24.3075", "GCP_Y": "15.5211", "GCP_Z": "0", }, +{"GCP_Id": "767", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "8840", "GCP_X": "-24.2706", "GCP_Y": "15.5279", "GCP_Z": "0", }, +{"GCP_Id": "768", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "9724", "GCP_X": "-24.234", "GCP_Y": "15.5347", "GCP_Z": "0", }, +{"GCP_Id": "769", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "10608", "GCP_X": "-24.1974", "GCP_Y": "15.5414", "GCP_Z": "0", }, +{"GCP_Id": "770", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "11492", "GCP_X": "-24.161", "GCP_Y": "15.5481", "GCP_Z": "0", }, +{"GCP_Id": "771", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "12376", "GCP_X": "-24.1247", "GCP_Y": "15.5548", "GCP_Z": "0", }, +{"GCP_Id": "772", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "13260", "GCP_X": "-24.0885", "GCP_Y": "15.5614", "GCP_Z": "0", }, +{"GCP_Id": "773", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "14144", "GCP_X": "-24.0525", "GCP_Y": "15.568", "GCP_Z": "0", }, +{"GCP_Id": "774", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "15028", "GCP_X": "-24.0165", "GCP_Y": "15.5746", "GCP_Z": "0", }, +{"GCP_Id": "775", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "15912", "GCP_X": "-23.9807", "GCP_Y": "15.5812", "GCP_Z": "0", }, +{"GCP_Id": "776", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "16796", "GCP_X": "-23.945", "GCP_Y": "15.5877", "GCP_Z": "0", }, +{"GCP_Id": "777", "GCP_Info": "", "GCP_Row": "26424", "GCP_Col": "17662", "GCP_X": "-23.9101", "GCP_Y": "15.5941", "GCP_Z": "0", }, +{"GCP_Id": "778", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "0", "GCP_X": "-24.6506", "GCP_Y": "15.4851", "GCP_Z": "0", }, +{"GCP_Id": "779", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "884", "GCP_X": "-24.6124", "GCP_Y": "15.4922", "GCP_Z": "0", }, +{"GCP_Id": "780", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "1768", "GCP_X": "-24.5744", "GCP_Y": "15.4993", "GCP_Z": "0", }, +{"GCP_Id": "781", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "2652", "GCP_X": "-24.5366", "GCP_Y": "15.5063", "GCP_Z": "0", }, +{"GCP_Id": "782", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "3536", "GCP_X": "-24.4989", "GCP_Y": "15.5133", "GCP_Z": "0", }, +{"GCP_Id": "783", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "4420", "GCP_X": "-24.4614", "GCP_Y": "15.5203", "GCP_Z": "0", }, +{"GCP_Id": "784", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "5304", "GCP_X": "-24.424", "GCP_Y": "15.5272", "GCP_Z": "0", }, +{"GCP_Id": "785", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "6188", "GCP_X": "-24.3867", "GCP_Y": "15.5341", "GCP_Z": "0", }, +{"GCP_Id": "786", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "7072", "GCP_X": "-24.3496", "GCP_Y": "15.5409", "GCP_Z": "0", }, +{"GCP_Id": "787", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "7956", "GCP_X": "-24.3127", "GCP_Y": "15.5478", "GCP_Z": "0", }, +{"GCP_Id": "788", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "8840", "GCP_X": "-24.2759", "GCP_Y": "15.5545", "GCP_Z": "0", }, +{"GCP_Id": "789", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "9724", "GCP_X": "-24.2392", "GCP_Y": "15.5613", "GCP_Z": "0", }, +{"GCP_Id": "790", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "10608", "GCP_X": "-24.2026", "GCP_Y": "15.568", "GCP_Z": "0", }, +{"GCP_Id": "791", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "11492", "GCP_X": "-24.1662", "GCP_Y": "15.5747", "GCP_Z": "0", }, +{"GCP_Id": "792", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "12376", "GCP_X": "-24.1299", "GCP_Y": "15.5814", "GCP_Z": "0", }, +{"GCP_Id": "793", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "13260", "GCP_X": "-24.0937", "GCP_Y": "15.588", "GCP_Z": "0", }, +{"GCP_Id": "794", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "14144", "GCP_X": "-24.0577", "GCP_Y": "15.5947", "GCP_Z": "0", }, +{"GCP_Id": "795", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "15028", "GCP_X": "-24.0217", "GCP_Y": "15.6012", "GCP_Z": "0", }, +{"GCP_Id": "796", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "15912", "GCP_X": "-23.9859", "GCP_Y": "15.6078", "GCP_Z": "0", }, +{"GCP_Id": "797", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "16796", "GCP_X": "-23.9502", "GCP_Y": "15.6143", "GCP_Z": "0", }, +{"GCP_Id": "798", "GCP_Info": "", "GCP_Row": "27158", "GCP_Col": "17662", "GCP_X": "-23.9153", "GCP_Y": "15.6207", "GCP_Z": "0", }, +{"GCP_Id": "799", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "0", "GCP_X": "-24.6558", "GCP_Y": "15.5118", "GCP_Z": "0", }, +{"GCP_Id": "800", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "884", "GCP_X": "-24.6177", "GCP_Y": "15.5189", "GCP_Z": "0", }, +{"GCP_Id": "801", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "1768", "GCP_X": "-24.5797", "GCP_Y": "15.5259", "GCP_Z": "0", }, +{"GCP_Id": "802", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "2652", "GCP_X": "-24.5418", "GCP_Y": "15.5329", "GCP_Z": "0", }, +{"GCP_Id": "803", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "3536", "GCP_X": "-24.5042", "GCP_Y": "15.5399", "GCP_Z": "0", }, +{"GCP_Id": "804", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "4420", "GCP_X": "-24.4666", "GCP_Y": "15.5469", "GCP_Z": "0", }, +{"GCP_Id": "805", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "5304", "GCP_X": "-24.4292", "GCP_Y": "15.5538", "GCP_Z": "0", }, +{"GCP_Id": "806", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "6188", "GCP_X": "-24.392", "GCP_Y": "15.5607", "GCP_Z": "0", }, +{"GCP_Id": "807", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "7072", "GCP_X": "-24.3549", "GCP_Y": "15.5676", "GCP_Z": "0", }, +{"GCP_Id": "808", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "7956", "GCP_X": "-24.3179", "GCP_Y": "15.5744", "GCP_Z": "0", }, +{"GCP_Id": "809", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "8840", "GCP_X": "-24.2811", "GCP_Y": "15.5812", "GCP_Z": "0", }, +{"GCP_Id": "810", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "9724", "GCP_X": "-24.2444", "GCP_Y": "15.5879", "GCP_Z": "0", }, +{"GCP_Id": "811", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "10608", "GCP_X": "-24.2078", "GCP_Y": "15.5947", "GCP_Z": "0", }, +{"GCP_Id": "812", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "11492", "GCP_X": "-24.1714", "GCP_Y": "15.6014", "GCP_Z": "0", }, +{"GCP_Id": "813", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "12376", "GCP_X": "-24.1351", "GCP_Y": "15.608", "GCP_Z": "0", }, +{"GCP_Id": "814", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "13260", "GCP_X": "-24.0989", "GCP_Y": "15.6147", "GCP_Z": "0", }, +{"GCP_Id": "815", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "14144", "GCP_X": "-24.0629", "GCP_Y": "15.6213", "GCP_Z": "0", }, +{"GCP_Id": "816", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "15028", "GCP_X": "-24.0269", "GCP_Y": "15.6279", "GCP_Z": "0", }, +{"GCP_Id": "817", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "15912", "GCP_X": "-23.9911", "GCP_Y": "15.6344", "GCP_Z": "0", }, +{"GCP_Id": "818", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "16796", "GCP_X": "-23.9554", "GCP_Y": "15.6409", "GCP_Z": "0", }, +{"GCP_Id": "819", "GCP_Info": "", "GCP_Row": "27892", "GCP_Col": "17662", "GCP_X": "-23.9205", "GCP_Y": "15.6473", "GCP_Z": "0", }, +{"GCP_Id": "820", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "0", "GCP_X": "-24.6611", "GCP_Y": "15.5384", "GCP_Z": "0", }, +{"GCP_Id": "821", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "884", "GCP_X": "-24.623", "GCP_Y": "15.5455", "GCP_Z": "0", }, +{"GCP_Id": "822", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "1768", "GCP_X": "-24.585", "GCP_Y": "15.5526", "GCP_Z": "0", }, +{"GCP_Id": "823", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "2652", "GCP_X": "-24.5471", "GCP_Y": "15.5596", "GCP_Z": "0", }, +{"GCP_Id": "824", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "3536", "GCP_X": "-24.5094", "GCP_Y": "15.5666", "GCP_Z": "0", }, +{"GCP_Id": "825", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "4420", "GCP_X": "-24.4719", "GCP_Y": "15.5735", "GCP_Z": "0", }, +{"GCP_Id": "826", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "5304", "GCP_X": "-24.4345", "GCP_Y": "15.5804", "GCP_Z": "0", }, +{"GCP_Id": "827", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "6188", "GCP_X": "-24.3972", "GCP_Y": "15.5873", "GCP_Z": "0", }, +{"GCP_Id": "828", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "7072", "GCP_X": "-24.3601", "GCP_Y": "15.5942", "GCP_Z": "0", }, +{"GCP_Id": "829", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "7956", "GCP_X": "-24.3232", "GCP_Y": "15.601", "GCP_Z": "0", }, +{"GCP_Id": "830", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "8840", "GCP_X": "-24.2863", "GCP_Y": "15.6078", "GCP_Z": "0", }, +{"GCP_Id": "831", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "9724", "GCP_X": "-24.2496", "GCP_Y": "15.6145", "GCP_Z": "0", }, +{"GCP_Id": "832", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "10608", "GCP_X": "-24.2131", "GCP_Y": "15.6213", "GCP_Z": "0", }, +{"GCP_Id": "833", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "11492", "GCP_X": "-24.1766", "GCP_Y": "15.628", "GCP_Z": "0", }, +{"GCP_Id": "834", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "12376", "GCP_X": "-24.1403", "GCP_Y": "15.6346", "GCP_Z": "0", }, +{"GCP_Id": "835", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "13260", "GCP_X": "-24.1041", "GCP_Y": "15.6413", "GCP_Z": "0", }, +{"GCP_Id": "836", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "14144", "GCP_X": "-24.0681", "GCP_Y": "15.6479", "GCP_Z": "0", }, +{"GCP_Id": "837", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "15028", "GCP_X": "-24.0321", "GCP_Y": "15.6545", "GCP_Z": "0", }, +{"GCP_Id": "838", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "15912", "GCP_X": "-23.9963", "GCP_Y": "15.661", "GCP_Z": "0", }, +{"GCP_Id": "839", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "16796", "GCP_X": "-23.9606", "GCP_Y": "15.6676", "GCP_Z": "0", }, +{"GCP_Id": "840", "GCP_Info": "", "GCP_Row": "28626", "GCP_Col": "17662", "GCP_X": "-23.9257", "GCP_Y": "15.6739", "GCP_Z": "0", }, +{"GCP_Id": "841", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "0", "GCP_X": "-24.6664", "GCP_Y": "15.565", "GCP_Z": "0", }, +{"GCP_Id": "842", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "884", "GCP_X": "-24.6282", "GCP_Y": "15.5721", "GCP_Z": "0", }, +{"GCP_Id": "843", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "1768", "GCP_X": "-24.5902", "GCP_Y": "15.5792", "GCP_Z": "0", }, +{"GCP_Id": "844", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "2652", "GCP_X": "-24.5524", "GCP_Y": "15.5862", "GCP_Z": "0", }, +{"GCP_Id": "845", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "3536", "GCP_X": "-24.5147", "GCP_Y": "15.5932", "GCP_Z": "0", }, +{"GCP_Id": "846", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "4420", "GCP_X": "-24.4771", "GCP_Y": "15.6002", "GCP_Z": "0", }, +{"GCP_Id": "847", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "5304", "GCP_X": "-24.4397", "GCP_Y": "15.6071", "GCP_Z": "0", }, +{"GCP_Id": "848", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "6188", "GCP_X": "-24.4025", "GCP_Y": "15.614", "GCP_Z": "0", }, +{"GCP_Id": "849", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "7072", "GCP_X": "-24.3654", "GCP_Y": "15.6208", "GCP_Z": "0", }, +{"GCP_Id": "850", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "7956", "GCP_X": "-24.3284", "GCP_Y": "15.6276", "GCP_Z": "0", }, +{"GCP_Id": "851", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "8840", "GCP_X": "-24.2916", "GCP_Y": "15.6344", "GCP_Z": "0", }, +{"GCP_Id": "852", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "9724", "GCP_X": "-24.2549", "GCP_Y": "15.6412", "GCP_Z": "0", }, +{"GCP_Id": "853", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "10608", "GCP_X": "-24.2183", "GCP_Y": "15.6479", "GCP_Z": "0", }, +{"GCP_Id": "854", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "11492", "GCP_X": "-24.1818", "GCP_Y": "15.6546", "GCP_Z": "0", }, +{"GCP_Id": "855", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "12376", "GCP_X": "-24.1455", "GCP_Y": "15.6613", "GCP_Z": "0", }, +{"GCP_Id": "856", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "13260", "GCP_X": "-24.1093", "GCP_Y": "15.6679", "GCP_Z": "0", }, +{"GCP_Id": "857", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "14144", "GCP_X": "-24.0733", "GCP_Y": "15.6745", "GCP_Z": "0", }, +{"GCP_Id": "858", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "15028", "GCP_X": "-24.0373", "GCP_Y": "15.6811", "GCP_Z": "0", }, +{"GCP_Id": "859", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "15912", "GCP_X": "-24.0015", "GCP_Y": "15.6876", "GCP_Z": "0", }, +{"GCP_Id": "860", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "16796", "GCP_X": "-23.9657", "GCP_Y": "15.6942", "GCP_Z": "0", }, +{"GCP_Id": "861", "GCP_Info": "", "GCP_Row": "29360", "GCP_Col": "17662", "GCP_X": "-23.9309", "GCP_Y": "15.7005", "GCP_Z": "0", }, +{"GCP_Id": "862", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "0", "GCP_X": "-24.6717", "GCP_Y": "15.5917", "GCP_Z": "0", }, +{"GCP_Id": "863", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "884", "GCP_X": "-24.6335", "GCP_Y": "15.5988", "GCP_Z": "0", }, +{"GCP_Id": "864", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "1768", "GCP_X": "-24.5955", "GCP_Y": "15.6058", "GCP_Z": "0", }, +{"GCP_Id": "865", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "2652", "GCP_X": "-24.5576", "GCP_Y": "15.6128", "GCP_Z": "0", }, +{"GCP_Id": "866", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "3536", "GCP_X": "-24.5199", "GCP_Y": "15.6198", "GCP_Z": "0", }, +{"GCP_Id": "867", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "4420", "GCP_X": "-24.4824", "GCP_Y": "15.6268", "GCP_Z": "0", }, +{"GCP_Id": "868", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "5304", "GCP_X": "-24.445", "GCP_Y": "15.6337", "GCP_Z": "0", }, +{"GCP_Id": "869", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "6188", "GCP_X": "-24.4077", "GCP_Y": "15.6406", "GCP_Z": "0", }, +{"GCP_Id": "870", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "7072", "GCP_X": "-24.3706", "GCP_Y": "15.6474", "GCP_Z": "0", }, +{"GCP_Id": "871", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "7956", "GCP_X": "-24.3336", "GCP_Y": "15.6543", "GCP_Z": "0", }, +{"GCP_Id": "872", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "8840", "GCP_X": "-24.2968", "GCP_Y": "15.661", "GCP_Z": "0", }, +{"GCP_Id": "873", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "9724", "GCP_X": "-24.2601", "GCP_Y": "15.6678", "GCP_Z": "0", }, +{"GCP_Id": "874", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "10608", "GCP_X": "-24.2235", "GCP_Y": "15.6745", "GCP_Z": "0", }, +{"GCP_Id": "875", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "11492", "GCP_X": "-24.1871", "GCP_Y": "15.6812", "GCP_Z": "0", }, +{"GCP_Id": "876", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "12376", "GCP_X": "-24.1507", "GCP_Y": "15.6879", "GCP_Z": "0", }, +{"GCP_Id": "877", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "13260", "GCP_X": "-24.1145", "GCP_Y": "15.6945", "GCP_Z": "0", }, +{"GCP_Id": "878", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "14144", "GCP_X": "-24.0785", "GCP_Y": "15.7011", "GCP_Z": "0", }, +{"GCP_Id": "879", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "15028", "GCP_X": "-24.0425", "GCP_Y": "15.7077", "GCP_Z": "0", }, +{"GCP_Id": "880", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "15912", "GCP_X": "-24.0067", "GCP_Y": "15.7143", "GCP_Z": "0", }, +{"GCP_Id": "881", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "16796", "GCP_X": "-23.9709", "GCP_Y": "15.7208", "GCP_Z": "0", }, +{"GCP_Id": "882", "GCP_Info": "", "GCP_Row": "30094", "GCP_Col": "17662", "GCP_X": "-23.936", "GCP_Y": "15.7271", "GCP_Z": "0", }, +{"GCP_Id": "883", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "0", "GCP_X": "-24.677", "GCP_Y": "15.6183", "GCP_Z": "0", }, +{"GCP_Id": "884", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "884", "GCP_X": "-24.6388", "GCP_Y": "15.6254", "GCP_Z": "0", }, +{"GCP_Id": "885", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "1768", "GCP_X": "-24.6008", "GCP_Y": "15.6325", "GCP_Z": "0", }, +{"GCP_Id": "886", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "2652", "GCP_X": "-24.5629", "GCP_Y": "15.6395", "GCP_Z": "0", }, +{"GCP_Id": "887", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "3536", "GCP_X": "-24.5252", "GCP_Y": "15.6465", "GCP_Z": "0", }, +{"GCP_Id": "888", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "4420", "GCP_X": "-24.4876", "GCP_Y": "15.6534", "GCP_Z": "0", }, +{"GCP_Id": "889", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "5304", "GCP_X": "-24.4502", "GCP_Y": "15.6603", "GCP_Z": "0", }, +{"GCP_Id": "890", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "6188", "GCP_X": "-24.413", "GCP_Y": "15.6672", "GCP_Z": "0", }, +{"GCP_Id": "891", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "7072", "GCP_X": "-24.3758", "GCP_Y": "15.6741", "GCP_Z": "0", }, +{"GCP_Id": "892", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "7956", "GCP_X": "-24.3389", "GCP_Y": "15.6809", "GCP_Z": "0", }, +{"GCP_Id": "893", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "8840", "GCP_X": "-24.302", "GCP_Y": "15.6877", "GCP_Z": "0", }, +{"GCP_Id": "894", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "9724", "GCP_X": "-24.2653", "GCP_Y": "15.6944", "GCP_Z": "0", }, +{"GCP_Id": "895", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "10608", "GCP_X": "-24.2287", "GCP_Y": "15.7011", "GCP_Z": "0", }, +{"GCP_Id": "896", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "11492", "GCP_X": "-24.1923", "GCP_Y": "15.7078", "GCP_Z": "0", }, +{"GCP_Id": "897", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "12376", "GCP_X": "-24.1559", "GCP_Y": "15.7145", "GCP_Z": "0", }, +{"GCP_Id": "898", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "13260", "GCP_X": "-24.1197", "GCP_Y": "15.7211", "GCP_Z": "0", }, +{"GCP_Id": "899", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "14144", "GCP_X": "-24.0837", "GCP_Y": "15.7277", "GCP_Z": "0", }, +{"GCP_Id": "900", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "15028", "GCP_X": "-24.0477", "GCP_Y": "15.7343", "GCP_Z": "0", }, +{"GCP_Id": "901", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "15912", "GCP_X": "-24.0118", "GCP_Y": "15.7409", "GCP_Z": "0", }, +{"GCP_Id": "902", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "16796", "GCP_X": "-23.9761", "GCP_Y": "15.7474", "GCP_Z": "0", }, +{"GCP_Id": "903", "GCP_Info": "", "GCP_Row": "30828", "GCP_Col": "17662", "GCP_X": "-23.9412", "GCP_Y": "15.7538", "GCP_Z": "0", }, +{"GCP_Id": "904", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "0", "GCP_X": "-24.679", "GCP_Y": "15.6284", "GCP_Z": "0", }, +{"GCP_Id": "905", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "884", "GCP_X": "-24.6408", "GCP_Y": "15.6354", "GCP_Z": "0", }, +{"GCP_Id": "906", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "1768", "GCP_X": "-24.6027", "GCP_Y": "15.6425", "GCP_Z": "0", }, +{"GCP_Id": "907", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "2652", "GCP_X": "-24.5649", "GCP_Y": "15.6495", "GCP_Z": "0", }, +{"GCP_Id": "908", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "3536", "GCP_X": "-24.5272", "GCP_Y": "15.6565", "GCP_Z": "0", }, +{"GCP_Id": "909", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "4420", "GCP_X": "-24.4896", "GCP_Y": "15.6635", "GCP_Z": "0", }, +{"GCP_Id": "910", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "5304", "GCP_X": "-24.4522", "GCP_Y": "15.6704", "GCP_Z": "0", }, +{"GCP_Id": "911", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "6188", "GCP_X": "-24.4149", "GCP_Y": "15.6773", "GCP_Z": "0", }, +{"GCP_Id": "912", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "7072", "GCP_X": "-24.3778", "GCP_Y": "15.6841", "GCP_Z": "0", }, +{"GCP_Id": "913", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "7956", "GCP_X": "-24.3408", "GCP_Y": "15.6909", "GCP_Z": "0", }, +{"GCP_Id": "914", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "8840", "GCP_X": "-24.304", "GCP_Y": "15.6977", "GCP_Z": "0", }, +{"GCP_Id": "915", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "9724", "GCP_X": "-24.2673", "GCP_Y": "15.7045", "GCP_Z": "0", }, +{"GCP_Id": "916", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "10608", "GCP_X": "-24.2307", "GCP_Y": "15.7112", "GCP_Z": "0", }, +{"GCP_Id": "917", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "11492", "GCP_X": "-24.1942", "GCP_Y": "15.7179", "GCP_Z": "0", }, +{"GCP_Id": "918", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "12376", "GCP_X": "-24.1579", "GCP_Y": "15.7245", "GCP_Z": "0", }, +{"GCP_Id": "919", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "13260", "GCP_X": "-24.1217", "GCP_Y": "15.7312", "GCP_Z": "0", }, +{"GCP_Id": "920", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "14144", "GCP_X": "-24.0856", "GCP_Y": "15.7378", "GCP_Z": "0", }, +{"GCP_Id": "921", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "15028", "GCP_X": "-24.0497", "GCP_Y": "15.7444", "GCP_Z": "0", }, +{"GCP_Id": "922", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "15912", "GCP_X": "-24.0138", "GCP_Y": "15.7509", "GCP_Z": "0", }, +{"GCP_Id": "923", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "16796", "GCP_X": "-23.9781", "GCP_Y": "15.7574", "GCP_Z": "0", }, +{"GCP_Id": "924", "GCP_Info": "", "GCP_Row": "31105", "GCP_Col": "17662", "GCP_X": "-23.9432", "GCP_Y": "15.7638", "GCP_Z": "0", }, +]} \ No newline at end of file diff --git a/Data/Input/ioTuotbXMLMetadataSupplierTest.xml b/Data/Input/ioTuotbXMLMetadataSupplierTest.xml new file mode 100644 index 0000000000000000000000000000000000000000..19e9433dc81b851a64bcb02fc45b47d3060126e2 --- /dev/null +++ b/Data/Input/ioTuotbXMLMetadataSupplierTest.xml @@ -0,0 +1,92 @@ +<?xml version="1.0" ?> +<OTB> + <version>3.18</version> + <build>18-05-2013</build> + <platform>Linux</platform> + <application> + <name>OrthoRectification</name> + <descr>This application allows ortho-rectifying optical images from supported sensors.
</descr> + <doc> + <name>Ortho-rectification</name> + <longdescr>An inverse sensor model is built from the input image metadata to convert geographical to raw geometry coordinates. This inverse sensor model is then combined with the chosen map projection to build a global coordinate mapping grid. Last, this grid is used to resample using the chosen interpolation algorithm. A Digital Elevation Model can be specified to account for terrain deformations. 
In case of SPOT5 images, the sensor model can be approximated by an RPC model in order to speed-up computation.</longdescr> + <authors>OTB-Team</authors> + <limitations>Supported sensors are Pleiades, SPOT5 (TIF format), Ikonos, Quickbird, Worldview2, GeoEye.</limitations> + <seealso>Ortho-rectification chapter from the OTB Software Guide</seealso> + <tags> + <tag>Geometry</tag> + </tags> + </doc> + <parameter mandatory="true"> + <key>io.in</key> + <type>InputImage</type> + <name>Input Image</name> + <value>/media/ssh/pc-inglada/media/TeraDisk2/LargeInput/QUICKBIRD/TOULOUSE/000000128955_01_P001_PAN/02APR01105228-P1BS-000000128955_01_P001.TIF</value> + </parameter> + <parameter mandatory="true"> + <key>io.out</key> + <type>OutputImage</type> + <name>Output Image</name> + <value>/home/rashad/repos/orfeo/build/OTB_/test-build/Testing/Temporary/apTvPrOrthorectifTest_UTM_OutXML1.tif</value> + </parameter> + <parameter mandatory="true"> + <key>map</key> + <type>Choice</type> + <name>Output Cartographic Map Projection</name> + <value>utm</value> + </parameter> + <parameter mandatory="true"> + <key>outputs.ulx</key> + <type>Float</type> + <name>Upper Left X</name> + <value>374100.8125</value> + </parameter> + <parameter mandatory="true"> + <key>outputs.uly</key> + <type>Float</type> + <name>Upper Left Y</name> + <value>4829185</value> + </parameter> + <parameter mandatory="true"> + <key>outputs.sizex</key> + <type>Int</type> + <name>Size X</name> + <value>500</value> + </parameter> + <parameter mandatory="true"> + <key>outputs.sizey</key> + <type>Int</type> + <name>Size Y</name> + <value>500</value> + </parameter> + <parameter mandatory="true"> + <key>outputs.spacingx</key> + <type>Float</type> + <name>Pixel Size X</name> + <value>0.5</value> + </parameter> + <parameter mandatory="true"> + <key>outputs.spacingy</key> + <type>Float</type> + <name>Pixel Size Y</name> + <value>-0.5</value> + </parameter> + <parameter mandatory="false"> + <key>elev.dem</key> + <type>Directory</type> + <name>DEM directory</name> + <value>/home/rashad/repos/orfeo/OTB-Data/Input/DEM/srtm_directory/</value> + </parameter> + <parameter mandatory="true"> + <key>interpolator</key> + <type>Choice</type> + <name>Interpolation</name> + <value>linear</value> + </parameter> + <parameter mandatory="false"> + <key>opt.gridspacing</key> + <type>Float</type> + <name>Resampling grid spacing</name> + <value>4</value> + </parameter> + </application> +</OTB> diff --git a/Documentation/Cookbook/_static/html/versions.html b/Documentation/Cookbook/_static/html/versions.html index d9c2deb6067af73b839f13eb0846f730e9213b37..dc6c5f6161d777d3d86be037aaed64995b33cd5c 100644 --- a/Documentation/Cookbook/_static/html/versions.html +++ b/Documentation/Cookbook/_static/html/versions.html @@ -12,6 +12,7 @@ <dd><a href="https://www.orfeo-toolbox.org/CookBook-6.6.1/">6.6.1</a></dd> <dd><a href="https://www.orfeo-toolbox.org/CookBook-7.0/">7.0.0</a></dd> <dd><a href="https://www.orfeo-toolbox.org/CookBook-7.1/">7.1.0</a></dd> + <dd><a href="https://www.orfeo-toolbox.org/CookBook-7.2/">7.2.0</a></dd> <dd><a href="https://www.orfeo-toolbox.org/CookBook-develop/">develop</a></dd> </dl> </div> diff --git a/Modules/Adapters/OSSIMAdapters/include/otbImageKeywordlist.h b/Modules/Adapters/OSSIMAdapters/include/otbImageKeywordlist.h index c290a1d070f9f078d0b7d7b2b6a91e536e7c0cf1..78f6f4138e98a457973541f1e549e8ebabd2c7c5 100644 --- a/Modules/Adapters/OSSIMAdapters/include/otbImageKeywordlist.h +++ b/Modules/Adapters/OSSIMAdapters/include/otbImageKeywordlist.h @@ -138,6 +138,14 @@ public: bool operator==(const Self&) const; inline bool operator!=(const Self&) const; + /** Read an ImageKeywordlist from a geom file + * without calling ossim */ + bool ReadGeometry(const std::string & path); + + /** Write an ImageKeywordlist to a geom file + * without calling ossim */ + void WriteGeometry(const std::string& filename) const; + protected: /** Methods invoked by Print() to print information about the object * Typically not called by the user (use Print() @@ -163,6 +171,8 @@ OTBOSSIMAdapters_EXPORT ImageKeywordlist ReadGeometryFromGEOMFile(const std::str OTBOSSIMAdapters_EXPORT ImageKeywordlist ReadGeometryFromRPCTag(const std::string& filename); +/** Write the content of the ImageKeywordlist into a geom file + * \deprecated : use ImageKeywordlist::WriteGeomtry instead */ OTBOSSIMAdapters_EXPORT void WriteGeometry(const ImageKeywordlist& otb_kwl, const std::string& filename); inline bool ImageKeywordlist::operator!=(const Self& p) const diff --git a/Modules/Adapters/OSSIMAdapters/src/otbImageKeywordlist.cxx b/Modules/Adapters/OSSIMAdapters/src/otbImageKeywordlist.cxx index 453d246534c0ea5b2268abcc5005ba14bc19e08b..b3d0889e7834ed8da68880f8419dafb8b50ada4d 100644 --- a/Modules/Adapters/OSSIMAdapters/src/otbImageKeywordlist.cxx +++ b/Modules/Adapters/OSSIMAdapters/src/otbImageKeywordlist.cxx @@ -456,5 +456,23 @@ void WriteGeometry(const ImageKeywordlist& otb_kwl, const std::string& filename) } } +bool ImageKeywordlist::ReadGeometry(const std::string & path) +{ + // The geom files used in OTB are simpler than what OSSIM actually supports + // It is basically a list of 'key: value' lines + // if the value contains special character like \n, \r, or if it has whitespaces + // at the beginning or at the end, the value is enclosed in triple double-quotes + // ("""value""") + // TODO + return false; +} + +void ImageKeywordlist::WriteGeometry(const std::string& filename) const +{ + // Write the image keyword list if any (without using ossimKeywordlist) + // values in the keywordlist matching the regex '\n|\r| $|^ ' must be + // encapsulated with triple double-quotes (""") + // TODO +} } // namespace otb diff --git a/Modules/Core/Common/include/otbStringUtilities.h b/Modules/Core/Common/include/otbStringUtilities.h new file mode 100644 index 0000000000000000000000000000000000000000..b18fe076bfd6634c519e61d736166d0ac119b5ac --- /dev/null +++ b/Modules/Core/Common/include/otbStringUtilities.h @@ -0,0 +1,833 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef otbStringUtilities_h +#define otbStringUtilities_h + +#include <algorithm> +#include <iterator> +#include <cassert> +#include <cstring> +#include <ostream> +#include <sstream> +#include <typeinfo> +#include <stdexcept> +#include <cctype> +#include <cstdarg> +#include <cmath> +#include <string> +#include "OTBCommonExport.h" + +namespace otb { + +/**\name String view + functions */ +//@{ +/** String view class. + * Class inspired by C++17 `std::string_view` and `gsl::string_span`. + * + * This idea is to bring efficiency and correctness to C++ functions that take + * strings. A function that receives a `string_view` can receive any kind of + * string flavour and guarantee 0-copy. + * + * The only side effect to be aware of: no terminal-0 is to be expected. i.e. a + * `string_view` data cannot be passed freely to a function with a C API that + * expect a null-terminated string. + * + * @invariant there is no guarantee `data()[size()] == '\0'`. It may happen + * though depending on the constructor used. + */ +struct string_view +{ + typedef char const value_type; + typedef char const& reference; + typedef char const& const_reference; + typedef char const* const_pointer; + typedef char const* pointer; + typedef std::size_t size_type; + +private: + /** Strict view iterator.*/ + struct char_iterator + { + typedef char const value_type; + typedef char const& reference; + typedef char const* pointer; + typedef std::size_t size_type; + typedef std::ptrdiff_t difference_type; + typedef std::random_access_iterator_tag iterator_category; + + explicit char_iterator(const_pointer p) : m_ptr(p) {} + char_iterator & operator++() { ++m_ptr; return *this; } + char_iterator operator++(int) { char_iterator tmp(*this); ++m_ptr; return tmp; } + char_iterator & operator--() { --m_ptr; return *this; } + char_iterator operator--(int) { char_iterator tmp(*this); --m_ptr; return tmp; } + const_reference operator*() const { return *m_ptr; } + + char_iterator & operator+=(difference_type off) { m_ptr += off; return *this; } + char_iterator & operator-=(difference_type off) { m_ptr -= off; return *this; } + + friend char_iterator operator+(char_iterator lhs, difference_type off) { return lhs += off; } + friend char_iterator operator+(difference_type off, char_iterator rhs) { return rhs += off; } + friend char_iterator operator-(char_iterator lhs, difference_type off) { return lhs -= off; } + friend char_iterator operator-(difference_type off, char_iterator rhs) { return rhs -= off; } + + friend difference_type operator-(char_iterator lhs, char_iterator rhs) { return lhs.m_ptr - rhs.m_ptr; } + + friend bool operator==(char_iterator lhs, char_iterator rhs) { + return lhs.m_ptr == rhs.m_ptr; + } + friend bool operator!=(char_iterator lhs, char_iterator rhs) { + return lhs.m_ptr != rhs.m_ptr; + } + friend bool operator<(char_iterator lhs, char_iterator rhs) { + return lhs.m_ptr < rhs.m_ptr; + } + private: + friend bool operator<=(char_iterator lhs, char_iterator rhs) { + return lhs.m_ptr <= rhs.m_ptr; + } + private: + const_pointer m_ptr; + }; + +public: + // typedef char_iterator iterator; + typedef char_iterator const_iterator; + // typedef std::reverse_iterator<char_iterator> reverse_iterator; + typedef std::reverse_iterator<char_iterator> const_reverse_iterator; + + /** Constructor from a standard string. + *@post `data()[size()] == '\0'` + */ + string_view(std::string const& s) + : m_size(s.size()), m_first(s.c_str()) + {} + /** Constructor from an array of characters. + * @post `data()[size()] == '\0'` <= the array is built with this kind of + * syntax: `char const a[]="foobar";` + */ + template <std::size_t N> + string_view(char const (&array)[N]) + : m_size(N), m_first(&array[0]) + {} + /** Constructor from a pointer to a 0-terminated raw string. + * @post `data()[size()] == '\0'` + */ + string_view(char const* ptr) + : m_size(std::strlen(ptr)), m_first(ptr) + {} +#if 0 + string_view(char const* first, char const* last) + : m_size(last-first), m_first(first) + { + assert(first <= last); + } +#endif + /** Constructor from an input iterator and a size. + * @post there is no guarantee `data()[size()] == '\0'`. + */ + template <typename II> + string_view(II first, size_type size_) + : m_size(size_), m_first(first) + {} + + /** Constructor from a pair of input iterators. + * @post there is no guarantee `data()[size()] == '\0'`. + */ + template <typename II> + string_view(II first, II last) + : m_size(last-first), m_first(first) + { + assert(first <= last); + } + + /** Builds a peculiar empty view to points to nullptr. */ + static string_view null() { return string_view(build_empty());} + + /** Tells whether a view is within another view. + * This functions doesn't test whether the characters from a view are found + * in the same relative positions in another view. + */ + bool belongs_to(char const* first, char const* last) const { + return first <= &*begin() && &*end() <= last; + } + template <std::size_t N> + bool belongs_to(char const (&array)[N]) const { + // N-1 because of terminal 0 + return belongs_to(&array[0], &array[N-1]); + } + bool belongs_to(char const* ptr) const { + return belongs_to(&ptr[0], &ptr[std::strlen(ptr)]); + } + template <typename String> + bool belongs_to(String const& s) const{ + return belongs_to(s.data(), s.data() + s.size()); + } + + size_type size () const { return m_size; } + bool empty () const { return m_size == 0; } + + // iterator begin () { return iterator(m_first); } + // iterator end () { return iterator(m_first+m_size); } + const_iterator begin () const { return m_first; } + const_iterator end () const { return m_first+m_size; } + const_iterator cbegin () const { return m_first; } + const_iterator cend () const { return m_first+m_size; } + + // reverse_iterator rbegin () { return reverse_iterator(m_first+m_size); } + // reverse_iterator rend () { return reverse_iterator(m_first); } + const_reverse_iterator rbegin () const { return const_reverse_iterator(m_first+m_size); } + const_reverse_iterator rend () const { return const_reverse_iterator(m_first); } + const_reverse_iterator crbegin() const { return const_reverse_iterator(m_first+m_size); } + const_reverse_iterator crend () const { return const_reverse_iterator(m_first); } + + /** Indexed access. + * @pre `p < size(),` checked with an assertion. + */ + const_reference operator[](size_type p) { + assert(p < size()); + return *(m_first+p); + } + + /** Returns first character of the view. + * @pre `!empty()`, checked with an assertion. + */ + const_reference front() const { assert(!empty()); return *begin(); } + /** Returns last character of the view. + * @pre `!empty()`, checked with an assertion. + */ + const_reference back () const { assert(!empty()); return *(end()-1); } + + /** Returns a pointer to the first character of the view. + * @warning there is no guarantee `data()[size()] == '\0'` + */ + const_pointer data () const { return &*m_first; } + + /** Removes the n first characters. + * @pre `n <= size()`, checked with an assertion + * @post size is n characters more little + * @post `begin()` iterator is n characters right. + */ + void remove_prefix(std::size_t n) { assert(n <= m_size); m_first += n; m_size -= n; } + /** Removes the n last characters. + * @pre `n <= size()`, checked with an assertion + * @post size is n characters more little + * @post `end()` iterator is n characters left. + */ + void remove_suffix(std::size_t n) { assert(n <= m_size); m_size -= n; } +private: + struct build_empty{}; + string_view(build_empty) : m_size(0), m_first(NULL) {} + + std::size_t m_size; + const_iterator m_first; +}; + +inline +bool operator==(string_view const& lhs, string_view const& rhs) +{ + return lhs.size() == rhs.size() + && std::equal(lhs.begin(), lhs.end(), rhs.begin()); +} +inline +bool operator!=(string_view const& lhs, string_view const& rhs) +{ + return ! (lhs == rhs); +} + +inline +std::ostream & operator<<(std::ostream & os, const string_view & v) +{ + std::copy(v.begin(), v.end(), std::ostream_iterator<char>(os)); + return os ; +} + +inline +std::string operator+(string_view const& lhs, string_view const& rhs) +{ + std::string res(lhs.begin(), lhs.end()); + res.append(rhs.begin(), rhs.end()); + return res; +} + +/** Tells whether two views are exactly identical. */ +inline +bool is_same_view(string_view const& lhs, string_view const& rhs) +{ + return lhs.begin() == rhs.begin() && lhs.size() == rhs.size(); +} + +/** Tells whether the haystack string starts with the needle string. */ +inline +bool starts_with(string_view const& haystack, string_view const& needle) +{ + return needle.size() <= haystack.size() + && std::equal(needle.begin(), needle.end(), haystack.begin()); +} + +/** Tells whether the haystack string starts with the needle string. */ +inline +bool ends_with(string_view const& haystack, string_view const& needle) +{ + return needle.size() <= haystack.size() + && std::equal(needle.rbegin(), needle.rend(), haystack.rbegin()); +} + +/** Searches needle string within the haystack string. */ +inline +string_view find(string_view const& haystack, string_view const& needle) +{ + assert(!haystack.empty()); + assert(!needle.empty()); + const string_view::size_type size = needle.size(); + if (haystack.size() < size) { + // std::cout << "haystack size < needle size!!!"; + return string_view::null(); + } + string_view::const_iterator const end = haystack.end() - size +1; + // std::cout << "comp up to:" + // << static_cast<void const*>(&*end) << "(" << (*end) << ")" + // ; + string_view::const_iterator it = haystack.begin(); + for ( ; it != end ; ++it) { + string_view v(it, size); + assert(v.size() == size); + assert(v.belongs_to(haystack)); + // std::cout << " check " + // << static_cast<void const*>(v.data())<<"["<<v.size()<<"] VS " + // << static_cast<void const*>(needle.data())<<"["<<needle.size()<<"]" + // ; + if (v == needle) { + return v; + } + } + assert(it+size-1 == haystack.end()); + return string_view::null(); +} + +/** Tells whether the haystack string contains the needle string. */ +inline +bool contains(string_view const& haystack, string_view const& needle) +{ + return ! is_same_view(find(haystack, needle), string_view::null()); +} +//@} + +/**\name Splitting functions */ +//@{ + +/** Split parts iterator. + * Not meant to be used directly. + * @tparam Splitter split algorithm used. + * @see `part_range` + * @see `split_on()` + */ +template <typename Splitter> +struct part_iterator +{ + typedef string_view & reference; + typedef string_view const& const_reference; + typedef string_view const* const_pointer; + typedef std::forward_iterator_tag iterator_category; + + // build last + part_iterator(string_view const& global_string, Splitter s) + : m_global(global_string) + , m_splitter(s) + , m_crt(m_splitter(global_string)) + {} + struct theend {}; + part_iterator(string_view const& global_string, Splitter s, theend) + : m_global(global_string) + , m_splitter(s) + , m_crt(string_view::null()) + {} + + part_iterator & operator++() { + assert(m_crt.belongs_to(m_global) && "Invariant check failure"); + assert(! is_same_view(m_crt, string_view::null()) && "Don't iterate past end"); + if (m_crt.end() == m_global.end()) { + m_crt = string_view::null(); + } else { + string_view within(m_crt.end()+m_splitter.next_start(), m_global.end()); + m_crt = m_splitter(within); + } + return *this; + } + part_iterator operator++(int) { + part_iterator tmp(*this); + ++(*this); + return *this; + } + const_reference operator*() const { + return m_crt; + } + const_pointer operator->() const { + return &m_crt; + } + + friend bool operator==(part_iterator const& lhs, part_iterator const& rhs) { + // std::cout << "<<"<<lhs<<">> ==?== <<"<<rhs<<">>" << std::endl; + assert(is_same_view(lhs.m_global, rhs.m_global)); + return is_same_view(lhs.m_crt, rhs.m_crt); // TODO: too many tests + } + friend bool operator!=(part_iterator const& lhs, part_iterator const& rhs) { + return ! (lhs == rhs); + } +#if defined(BOOST_TEST_MODULE) + friend std::ostream & operator<<(std::ostream & os, const part_iterator & v) + { + return os << "split iterator on `" << v.m_crt + << "'("<<static_cast<void const*>(&*v.m_crt.begin()) <<"-"<<v.m_crt.size()<<")"<<", within `" + << v.m_global << "'"; + } +#endif +private: + string_view m_global; + Splitter m_splitter; + string_view m_crt; +}; + +namespace details { + inline std::size_t len(char) { return 1; } + template <std::size_t N> inline std::size_t len(char const (&)[N]) + { assert(N>0); return N-1; } + inline std::size_t len(char const* ptr) { return std::strlen(ptr); } + template <typename String> inline std::size_t len(String const& s) { return s.length(); } +} // details namespace + +/** Split parts range. + * Not meant to be used directly. + * @tparam Splitter split algorithm used. + * @see `part_iterator` + * @see `split_on()` + */ +template <typename Splitter> +struct part_range +{ + part_range(string_view const& global_string, Splitter s) + : m_first(global_string, s) + , m_last(global_string, s, typename const_iterator::theend()) + {} + typedef part_iterator<Splitter> const_iterator; + const_iterator const& begin() const { return m_first; } + const_iterator const& end () const { return m_last; } +private: + const_iterator const m_first; + const_iterator const m_last; +}; + +/** Split algorithm that splits on single characters. + * Not meant to be used directly + * @see `split_on()` + */ +struct splitter_on_delim +{ + splitter_on_delim(char delim) : m_delimiter(delim) {} + string_view operator()(string_view const& within) const { + string_view res(within.begin(), + std::find(within.begin(), within.end(), m_delimiter) + ); + return res ; + } + std::size_t next_start() const { return details::len(m_delimiter); } +private: + char m_delimiter; +}; + +/** Split entry point. + * @tparam String Type of the string split ( `std::string`, + * `string_view`, ...) + * @param[in] str string to be split + * @param[in] delim character delimiter used to split. + * @return a range of the parts found in `str`. + * + * Example of use: + * \code + typedef part_range<splitter_on_delim> range_type; + typedef typename range_type::const_iterator const_iterator; + const range_type parts = split_on(",abc,z,,,def,xy,,", ',') + const_iterator it = parts.begin(); + const_iterator end = parts.end(); + for ( ; it != end ; ++it) { + doStuff(*it); + } + * \endcode + */ +template <typename String> +part_range<splitter_on_delim> split_on(String const& str, char delim) { + return part_range<splitter_on_delim>(str, splitter_on_delim(delim)); +} +//@} + +/**\name string to number conversion */ +//@{ +/** + * \brief Generic string to whatever conversion -- failure means exception. + * Tries to decode a value from a string. + * \tparam T Type of the value decoded from the input string + * \param[in] v input string to convert + * \param[in] context context message for the exception thrown + * + * \return The value decoded + * \throw std::runtime_error if a value of type `T` cannot be decoded from the + * string. + * \note For efficiency reasons, the function has been specialized for integral + * floating point, and string types. + * \note That alternative to `ossimString::toXxxx()` function has been defined + * to support generic programming in `get()` and `add()` helper functions for + * keyword list. + * \see `to_with_default()` for the version that never fails, but returns a + * default value otherwise (being `T()` by default). + * + */ +template <typename T> +inline +T to(string_view const& v, string_view const& context) +{ + T res ; + std::stringstream ss; + if (ss << v && (ss >> res >> std::ws).eof()) { + return res; + } + throw std::runtime_error("Cannot decode "+v+" as "+ + typeid(T).name() + " while " + context); +} + +/** + * \brief Generic string to whatever conversion -- failure is hidden. + * Tries to decode a value from a string. + * \tparam T Type of the value decoded from the input string + * \param[in] v input string to convert + * \param[in] def default value returned in the conversion isn't possible + * + * \return The value decoded + * \return `def` if no value of type `T` can be decoded from `v`. + * \throw None + * \note For efficiency reasons, the function has been specialized for integral + * floating point, and string types. + * \note That alternative to `ossimString::toXxxx()` function has been defined + * to support generic programming in `get()` and `add()` helper functions for + * keyword list. + * \see `to()` for the version that fails by throwing exceptions. + */ +template <typename T> +inline +T to_with_default(string_view const& v, T const& def = T()) +{ + T res = def; + std::stringstream ss; + if (ss << v && (ss >> res >> std::ws).eof()) { + return res; + } + return def; +} + +namespace details { + /** + * \brief Internal generic string to integer conversion (w/ exception). + * Tries to convert the input string into a integer type. If the + * string doesn't represent an integer value, an exception is thrown. + * \tparam Int Integral type (In a perfect world, we'd used `enable_if` & + * co to restrict the code to integral types) + * \param[in] v input string + * \param[in] context context message for the exception thrown + * + * \return The string as an integer. + * \throw std::runtime_error is the number cannot be converted. + * \todo Use a failure_policy in order to factorize code flavour (returns + * default value or throw an exception) + */ + template <typename Int> inline Int to_integer(string_view const& v, string_view const& context) + { + // string_view::data() isn't compatible with strtol => we emulate it + + // TODO: handle HEX, OCT, BIN, locales? + string_view::const_iterator it = v.begin(); + string_view::const_iterator end = v.end(); + + bool is_negative = false; + Int res = 0; + if (it != end) { + switch (*it) { + case '-': is_negative = true; /*[[fallthrough]]*/ + case '+': ++it; + } + for ( ; it != end ; ++it) { + // only support arabic digits + if (!std::isdigit(*it)) { + throw std::runtime_error("Cannot decode "+v+" as integer while " + context); + } + res = 10 * res + *it - '0'; + } + } + return is_negative ? -res : res; + } + + /** + * \brief Internal generic string to integer conversion (w/o exception). + * Tries to convert the input string into a integer type. If the + * string doesn't represent an integer value, the default value will be + * returned. + * \tparam Int Integral type (In a perfect world, we'd used `enable_if` & + * co to restrict the code to integral types) + * \param[in] v input string + * \param[in] def default value returned in the conversion isn't possible + * + * \return The string as an integer. + * \return `def` if the string cannot be converted to an integer value. + * \throw None + */ + template <typename Int> inline Int to_integer(string_view const& v, Int const def) + { + // string_view::data() isn't compatible with strtol => we emulate it + + // TODO: handle HEX, OCT, BIN, locales? + string_view::const_iterator it = v.begin(); + string_view::const_iterator end = v.end(); + + bool is_negative = false; + Int res = 0; + if (it != end) { + switch (*it) { + case '-': is_negative = true; /*[[fallthrough]]*/ + case '+': ++it; + } + for ( ; it != end ; ++it) { + // only support arabic digits + if (!std::isdigit(*it)) { + return def; + } + res = 10 * res + *it - '0'; + } + } + return is_negative ? -res : res; + } + + /** + * \brief Internal generic string to unsigned integer conversion (w/ exception). + * Tries to convert the input string into a integer type. If the + * string doesn't represent an integer value, an exception is thrown. + * \tparam Int Integral type (In a perfect world, we'd used `enable_if` & + * co to restrict the code to integral types) + * \param[in] v input string + * \param[in] context context message for the exception thrown + * + * \return The string as an integer. + * \throw std::runtime_error is the number cannot be converted. + */ + template <typename Int> inline Int to_uinteger(string_view const& v, string_view const& context) + { + // string_view::data() isn't compatible with strtol => we emulate it + + // TODO: handle HEX, OCT, BIN, locales? + string_view::const_iterator it = v.begin(); + string_view::const_iterator end = v.end(); + + Int res = 0; + if (it != end) { + for ( ; it != end ; ++it) { + // only support arabic digits + if (!std::isdigit(*it)) { + throw std::runtime_error("Cannot decode "+v+" as integer while " + context); + } + res = 10 * res + *it - '0'; + } + } + return res; + } + + /** + * \brief Internal generic string to unsigned integer conversion (w/o exception). + * Tries to convert the input string into a integer type. If the + * string doesn't represent an integer value, the default value will be + * returned. + * \tparam Int Integral type (In a perfect world, we'd used `enable_if` & + * co to restrict the code to integral types) + * \param[in] v input string + * \param[in] def default value returned in the conversion isn't possible + * + * \return The string as an integer. + * \return `def` if the string cannot be converted to an integer value. + * \throw None + */ + template <typename Int> inline Int to_uinteger(string_view const& v, Int const def) + { + // string_view::data() isn't compatible with strtol => we emulate it + + // TODO: handle HEX, OCT, BIN, locales? + string_view::const_iterator it = v.begin(); + string_view::const_iterator end = v.end(); + + Int res = 0; + if (it != end) { + for ( ; it != end ; ++it) { + // only support arabic digits + if (!std::isdigit(*it)) { + return def; + } + res = 10 * res + *it - '0'; + } + } + return res; + } + + /** + * \brief Internal generic string to float conversion (w/ exception). + * Tries to convert the input string into a floating point type. If the + * string doesn't represent a floating point value, an exception is thrown. + * \tparam FloatType floating point type (`float`, `double`, `long double`) + * \param[in] v input string + * \param[in] context context message for the exception thrown + * + * \return The string as a float. The special `"nan"` string is converted to + * `ossim::nan()`. + * \throw std::runtime_error is the number cannot be converted. + */ + template <typename FloatType> inline FloatType to_float(string_view const& v, string_view const& context) + { + if (contains(v, "nan")) { + return std::nan(""); + } + FloatType res = FloatType(); // 0-construction + if (!v.empty()) { + std::stringstream ss; + if (! (ss << v && (ss >> res >> std::ws).eof())) { + throw std::runtime_error("Cannot decode "+v+" as float value while " + context); + } + } + return res; + } + + /** + * \brief Internal generic string to float conversion (w/o exception). + * Tries to convert the input string into a floating point type. If the + * string doesn't represent a floating point value, the default value will + * be returned. + * \tparam FloatType floating point type (`float`, `double`, `long double`) + * \param[in] v input string + * \param[in] def default value returned in the conversion isn't possible + * + * \return The string as a float. The special `"nan"` string is converted + * to `ossim::nan()`. + * \return `def` if the string cannot be converted to a floating point + * value. + * \throw None + */ + template <typename FloatType> inline FloatType to_float(string_view const& v, FloatType const def) + { + if (contains(v, "nan")) { + return std::nan(""); + } + FloatType res = FloatType(); // 0-construction + if (!v.empty()) { + std::stringstream ss; + if (! (ss << v && (ss >> res >> std::ws).eof())) { + return def; + } + } + return res; + } + + inline unsigned int decode_uint(string_view & v) + { + unsigned int res = 0; + for ( ; !v.empty() ; v.remove_prefix(1)) + { + // only support arabic digits + if (!std::isdigit(v.front())) + break; + res = 10 * res + v.front() - '0'; + } + return res; + } +} // otb::details namespace + +#define OTB_GENERATE_CONV(internal_to, type) \ + template <> inline type to<type>(string_view const& v, string_view const& context) \ + { return details::internal_to<type>(v, context); } \ + template <> inline type to_with_default<type>(string_view const& v, type const& def) \ + { return details::internal_to<type>(v, def); } +// Note: specialization doesn't support default arguments, but default argument +// T() will still work. + +OTB_GENERATE_CONV(to_integer, char); +OTB_GENERATE_CONV(to_uinteger, unsigned char); +OTB_GENERATE_CONV(to_integer, signed char); +OTB_GENERATE_CONV(to_uinteger, unsigned short); +OTB_GENERATE_CONV(to_integer, short); +OTB_GENERATE_CONV(to_integer, int); +OTB_GENERATE_CONV(to_uinteger, unsigned int); +OTB_GENERATE_CONV(to_integer, long); +OTB_GENERATE_CONV(to_uinteger, unsigned long); +#if defined(HAS_LONG_LONG) // TODO: add this configure option +OTB_GENERATE_CONV(to_integer, long long); +OTB_GENERATE_CONV(to_uinteger, unsigned long long); +#endif +OTB_GENERATE_CONV(to_float, float); +OTB_GENERATE_CONV(to_float, double); +OTB_GENERATE_CONV(to_float, long double); +#undef OTB_GENERATE_CONV + +template <> inline std::string to<std::string>(string_view const& v, string_view const& /*context*/) +{ return std::string(v.begin(), v.end()); } + +template <typename T> inline T const& to(T const& v, string_view const& /*context*/) { return v; } + +template <typename T> inline T const& to_with_default(T const& v, T const& /* default*/) { return v; } + +// template <> inline double to<double>(ossimplugins::string_view const& v) +// { return details::to_float<double>(v); } +//@} + +//~ OTBCommon_EXPORT int s_printf(char *str, std::size_t size, const char *format, ...); +//~ OTBCommon_EXPORT int vs_printf(char *str, std::size_t size, const char *format, std::va_list ap); +//~ +//~ template <std::size_t size> +//~ inline +//~ int s_printf(char (&str)[size], const char *format, ...) { + //~ std::va_list ap; + //~ va_start(ap, format); + //~ const int res = vs_printf(str, size, format, ap); + //~ va_end(ap); + //~ return res; +//~ } + +/** Strip left side of a string + * @brief returns a string_view with the leading characters removed + * @param[in] v string to be stripped + * @param[in] c string with characters to strip. + * @return the stripped string_view + */ +OTBCommon_EXPORT string_view lstrip(string_view const& v, string_view const& c ); + +/** Strip right side of a string + * @brief returns a string_view with the ending characters removed + * @param[in] v string to be stripped + * @param[in] c string with characters to strip. + * @return the stripped string_view + */ +OTBCommon_EXPORT string_view rstrip(string_view const& v, string_view const& c ); + + +} // otb namespace + + +#endif diff --git a/Modules/Core/Common/src/CMakeLists.txt b/Modules/Core/Common/src/CMakeLists.txt index 7f6d20d4278938ecaa23e91641c3bdaa707512a3..e019cf04a2f631bfe112f49890c399663f1ac5f1 100644 --- a/Modules/Core/Common/src/CMakeLists.txt +++ b/Modules/Core/Common/src/CMakeLists.txt @@ -28,6 +28,7 @@ set(OTBCommon_SRC otbWriterWatcherBase.cxx otbStopwatch.cxx otbStringToHTML.cxx + otbStringUtilities.cxx otbExtendedFilenameHelper.cxx otbLogger.cxx otbStandardOutputPrintCallback.cxx diff --git a/Modules/Core/Common/src/otbStringUtilities.cxx b/Modules/Core/Common/src/otbStringUtilities.cxx new file mode 100644 index 0000000000000000000000000000000000000000..dbe3112ac91c9b4a1db510d71dc096c2a2856a4e --- /dev/null +++ b/Modules/Core/Common/src/otbStringUtilities.cxx @@ -0,0 +1,44 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "otbStringUtilities.h" + +namespace otb +{ + +string_view lstrip(string_view const& v, string_view const& c ) +{ + string_view::const_iterator pos = std::find_first_of( + v.cbegin(), v.cend(), c.cbegin(), c.cend(), + [](char c1, char c2) -> bool { return bool(c1 != c2) ;}); + // Beware: returned string_view may be empty + return string_view(pos, v.cend()); +} + +string_view rstrip(string_view const& v, string_view const& c ) +{ + string_view::const_reverse_iterator pos = std::find_first_of( + v.crbegin(), v.crend(), c.cbegin(), c.cend(), + [](char c1, char c2) -> bool { return bool(c1 != c2) ;}); + // Beware: returned string_view may be empty + return string_view(v.cbegin(),&*pos - &(*v.cbegin())); +} + +} // end namespace otb diff --git a/Modules/Core/ImageBase/include/otbImage.h b/Modules/Core/ImageBase/include/otbImage.h index 0905f2a8b43353701b7919aa558d53944ec35fa3..312a4ce5cc7e20d59d874171d90f3a02d8cd1cac 100644 --- a/Modules/Core/ImageBase/include/otbImage.h +++ b/Modules/Core/ImageBase/include/otbImage.h @@ -31,6 +31,7 @@ #endif #include "otbImageMetadataInterfaceBase.h" +#include "otbImageCommons.h" #include "OTBImageBaseExport.h" namespace otb @@ -86,7 +87,9 @@ namespace otb */ template <class TPixel, unsigned int VImageDimension = 2> -class OTBImageBase_EXPORT_TEMPLATE Image : public itk::Image<TPixel, VImageDimension> +class OTBImageBase_EXPORT_TEMPLATE Image + : public itk::Image<TPixel, VImageDimension> + , public ImageCommons { public: /** Standard class typedefs. */ @@ -192,31 +195,18 @@ public: return NeighborhoodAccessorFunctorType(); } - /** Get the projection coordinate system of the image. */ - virtual std::string GetProjectionRef(void) const; - - virtual void SetProjectionRef(const std::string& wkt); - - - /** Get the GCP projection coordinates of the image. */ - virtual std::string GetGCPProjection(void) const; - - virtual unsigned int GetGCPCount(void) const; - - virtual OTB_GCP& GetGCPs(unsigned int GCPnum); - virtual const OTB_GCP& GetGCPs(unsigned int GCPnum) const; - - virtual std::string GetGCPId(unsigned int GCPnum) const; - virtual std::string GetGCPInfo(unsigned int GCPnum) const; - virtual double GetGCPRow(unsigned int GCPnum) const; - virtual double GetGCPCol(unsigned int GCPnum) const; - virtual double GetGCPX(unsigned int GCPnum) const; - virtual double GetGCPY(unsigned int GCPnum) const; - virtual double GetGCPZ(unsigned int GCPnum) const; /** Get the six coefficients of affine geoTtransform. */ virtual VectorType GetGeoTransform(void) const; + /** Get image corners. */ + // TODO: GenericRSTransform should be instanciated to translate from physical + // space to EPSG:4328 ? + VectorType GetUpperLeftCorner(void) const; + VectorType GetUpperRightCorner(void) const; + VectorType GetLowerLeftCorner(void) const; + VectorType GetLowerRightCorner(void) const; + /** Get signed spacing */ SpacingType GetSignedSpacing() const; @@ -232,12 +222,6 @@ public: virtual void SetSignedSpacing(SpacingType spacing); virtual void SetSignedSpacing(double spacing[VImageDimension]); - /** Get image corners. */ - virtual VectorType GetUpperLeftCorner(void) const; - virtual VectorType GetUpperRightCorner(void) const; - virtual VectorType GetLowerLeftCorner(void) const; - virtual VectorType GetLowerRightCorner(void) const; - /** Get image keyword list */ virtual ImageKeywordlistType GetImageKeywordlist(void); diff --git a/Modules/Core/ImageBase/include/otbImage.hxx b/Modules/Core/ImageBase/include/otbImage.hxx index bc1ead99139ca345644ec8960f66f0c0f6735aed..e9a63081d6c045785631903be05a6abfa78cc922 100644 --- a/Modules/Core/ImageBase/include/otbImage.hxx +++ b/Modules/Core/ImageBase/include/otbImage.hxx @@ -34,113 +34,6 @@ Image<TPixel, VImageDimension>::Image() { } -template <class TPixel, unsigned int VImageDimension> -std::string Image<TPixel, VImageDimension>::GetProjectionRef(void) const -{ - return (this->GetMetaDataInterface()->GetProjectionRef()); -} - -template <class TPixel, unsigned int VImageDimension> -void Image<TPixel, VImageDimension>::SetProjectionRef(const std::string& kwl) -{ - itk::EncapsulateMetaData<std::string>(this->GetMetaDataDictionary(), MetaDataKey::ProjectionRefKey, kwl); -} - -template <class TPixel, unsigned int VImageDimension> -std::string Image<TPixel, VImageDimension>::GetGCPProjection(void) const -{ - return (this->GetMetaDataInterface()->GetGCPProjection()); -} - -template <class TPixel, unsigned int VImageDimension> -unsigned int Image<TPixel, VImageDimension>::GetGCPCount(void) const -{ - return (this->GetMetaDataInterface()->GetGCPCount()); -} - -template <class TPixel, unsigned int VImageDimension> -OTB_GCP& Image<TPixel, VImageDimension>::GetGCPs(unsigned int GCPnum) -{ - return (this->GetMetaDataInterface()->GetGCPs(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -const OTB_GCP& Image<TPixel, VImageDimension>::GetGCPs(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPs(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -std::string Image<TPixel, VImageDimension>::GetGCPId(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPId(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -std::string Image<TPixel, VImageDimension>::GetGCPInfo(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPInfo(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -double Image<TPixel, VImageDimension>::GetGCPRow(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPRow(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -double Image<TPixel, VImageDimension>::GetGCPCol(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPCol(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -double Image<TPixel, VImageDimension>::GetGCPX(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPX(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -double Image<TPixel, VImageDimension>::GetGCPY(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPY(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -double Image<TPixel, VImageDimension>::GetGCPZ(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPZ(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -typename Image<TPixel, VImageDimension>::VectorType Image<TPixel, VImageDimension>::GetGeoTransform(void) const -{ - return (this->GetMetaDataInterface()->GetGeoTransform()); -} - -template <class TPixel, unsigned int VImageDimension> -typename Image<TPixel, VImageDimension>::VectorType Image<TPixel, VImageDimension>::GetUpperLeftCorner(void) const -{ - return (this->GetMetaDataInterface()->GetUpperLeftCorner()); -} - -template <class TPixel, unsigned int VImageDimension> -typename Image<TPixel, VImageDimension>::VectorType Image<TPixel, VImageDimension>::GetUpperRightCorner(void) const -{ - return (this->GetMetaDataInterface()->GetUpperRightCorner()); -} - -template <class TPixel, unsigned int VImageDimension> -typename Image<TPixel, VImageDimension>::VectorType Image<TPixel, VImageDimension>::GetLowerLeftCorner(void) const -{ - return (this->GetMetaDataInterface()->GetLowerLeftCorner()); -} - -template <class TPixel, unsigned int VImageDimension> -typename Image<TPixel, VImageDimension>::VectorType Image<TPixel, VImageDimension>::GetLowerRightCorner(void) const -{ - return (this->GetMetaDataInterface()->GetLowerRightCorner()); -} template <class TPixel, unsigned int VImageDimension> typename Image<TPixel, VImageDimension>::SpacingType Image<TPixel, VImageDimension>::GetSignedSpacing() const @@ -214,6 +107,21 @@ void Image<TPixel, VImageDimension>::CopyInformation(const itk::DataObject* data { Superclass::CopyInformation(data); this->itk::Object::SetMetaDataDictionary(data->GetMetaDataDictionary()); + const ImageCommons* imc = dynamic_cast<const ImageCommons*>(data); + if (imc != nullptr) + { + const auto & imd = imc->GetImageMetadata(); + + if (imd.Bands.size() > 0 && imd.Bands.size() != this->GetNumberOfComponentsPerPixel()) + { + SetImageMetadata(ImageMetadata(imd.GeometryKeys, imd.NumericKeys, imd.StringKeys, imd.LUT1DKeys, + imd.LUT2DKeys, imd.TimeKeys, imd.ExtraKeys, ImageMetadata::ImageMetadataBandsType(this->GetNumberOfComponentsPerPixel()))); + } + else + { + SetImageMetadata(imd); + } + } } template <class TPixel, unsigned int VImageDimension> @@ -224,6 +132,75 @@ typename Image<TPixel, VImageDimension>::ImageMetadataInterfacePointerType Image return m_ImageMetadataInterface; } + +template <class TPixel, unsigned int VImageDimension> +typename Image<TPixel, VImageDimension>::VectorType Image<TPixel, VImageDimension>::GetGeoTransform(void) const +{ + Image<TPixel, VImageDimension>::VectorType geoTransform(6); + + auto origin = this->GetOrigin(); + auto spacing = this->GetSpacing(); + auto direction = this->GetDirection(); + + // Note : OTB does not handle rotated geoTransform (see GDALImageIO) + geoTransform[0] = origin[0] - 0.5 * spacing[0] * direction[0][0]; + geoTransform[3] = origin[1] - 0.5 * spacing[1] * direction[1][1]; + geoTransform[1] = spacing[0] * direction[0][0]; + geoTransform[5] = spacing[1] * direction[1][1]; + geoTransform[2] = 0.; + geoTransform[4] = 0.; + return (geoTransform); +} + + +template <class TPixel, unsigned int VImageDimension> +typename Image<TPixel, VImageDimension>::VectorType +Image<TPixel, VImageDimension>::GetUpperLeftCorner(void) const +{ + PointType physicalPoint; + itk::ContinuousIndex<double, VImageDimension> index; + index.Fill(-0.5); + this->TransformContinuousIndexToPhysicalPoint (index, physicalPoint) ; + return {physicalPoint[0],physicalPoint[1]}; +} + +template <class TPixel, unsigned int VImageDimension> +typename Image<TPixel, VImageDimension>::VectorType +Image<TPixel, VImageDimension>::GetUpperRightCorner(void) const +{ + PointType physicalPoint; + itk::ContinuousIndex<double, VImageDimension> index; + index.Fill(-0.5); + index[0] = -0.5 + this->GetLargestPossibleRegion().GetSize()[0]; + this->TransformContinuousIndexToPhysicalPoint (index, physicalPoint) ; + return {physicalPoint[0],physicalPoint[1]}; +} + +template <class TPixel, unsigned int VImageDimension> +typename Image<TPixel, VImageDimension>::VectorType +Image<TPixel, VImageDimension>::GetLowerLeftCorner(void) const +{ + PointType physicalPoint; + itk::ContinuousIndex<double, VImageDimension> index; + index.Fill(-0.5); + index[1] = -0.5 + this->GetLargestPossibleRegion().GetSize()[1]; + this->TransformContinuousIndexToPhysicalPoint (index, physicalPoint) ; + return {physicalPoint[0],physicalPoint[1]}; +} + +template <class TPixel, unsigned int VImageDimension> +typename Image<TPixel, VImageDimension>::VectorType +Image<TPixel, VImageDimension>::GetLowerRightCorner(void) const +{ + PointType physicalPoint; + itk::ContinuousIndex<double, VImageDimension> index; + index.Fill(-0.5); + index[0] = -0.5 + this->GetLargestPossibleRegion().GetSize()[0]; + index[1] = -0.5 + this->GetLargestPossibleRegion().GetSize()[1]; + this->TransformContinuousIndexToPhysicalPoint (index, physicalPoint) ; + return {physicalPoint[0],physicalPoint[1]}; +} + template <class TPixel, unsigned int VImageDimension> void Image<TPixel, VImageDimension>::PrintSelf(std::ostream& os, itk::Indent indent) const { diff --git a/Modules/Core/ImageBase/include/otbImageCommons.h b/Modules/Core/ImageBase/include/otbImageCommons.h new file mode 100644 index 0000000000000000000000000000000000000000..db863ea5bba4c6ccc109b2541ffc4919db923c84 --- /dev/null +++ b/Modules/Core/ImageBase/include/otbImageCommons.h @@ -0,0 +1,75 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef otbImageCommons_h +#define otbImageCommons_h + +#include "otbImageMetadata.h" +#include "otbImageMetadataInterfaceBase.h" +#include "OTBImageBaseExport.h" + +namespace otb +{ + +class OTBImageBase_EXPORT ImageCommons +{ +public: + + void SetImageMetadata(ImageMetadata imd); + + void SetBandImageMetadata(ImageMetadata::ImageMetadataBandsType imd); + + const ImageMetadata & GetImageMetadata() const; + + // boilerplate code... + + /** Get the projection coordinate system of the image. */ + std::string GetProjectionRef(void) const; + + void SetProjectionRef(const std::string& wkt); + + /** Get the GCP projection coordinates of the image. */ + std::string GetGCPProjection(void) const; + + unsigned int GetGCPCount(void) const; + + // Removed non-const getter on GCPs + //~ GCP& GetGCPs(unsigned int GCPnum); + + const GCP& GetGCPs(unsigned int GCPnum) const; + + std::string GetGCPId(unsigned int GCPnum) const; + std::string GetGCPInfo(unsigned int GCPnum) const; + double GetGCPRow(unsigned int GCPnum) const; + double GetGCPCol(unsigned int GCPnum) const; + double GetGCPX(unsigned int GCPnum) const; + double GetGCPY(unsigned int GCPnum) const; + double GetGCPZ(unsigned int GCPnum) const; + + /** Returns true if a sensor geometric model is present */ + bool HasSensorGeometry() const; + +private: + ImageMetadata m_Imd; +}; + +} // end namespace otb + +#endif diff --git a/Modules/Core/ImageBase/include/otbImageIOBase.h b/Modules/Core/ImageBase/include/otbImageIOBase.h index 55699547c74428ae3d5d0630e58bdd7089ca5dfc..b0981215a63b8479d231f65fa42840deb7b2525d 100644 --- a/Modules/Core/ImageBase/include/otbImageIOBase.h +++ b/Modules/Core/ImageBase/include/otbImageIOBase.h @@ -22,6 +22,7 @@ #ifndef otbImageIOBase_h #define otbImageIOBase_h +#include "otbImageMetadata.h" #include "itkLightProcessObject.h" #include "itkIndent.h" #include "itkImageIORegion.h" @@ -442,6 +443,10 @@ public: /** Returns a const ref to the list of attached files*/ itkGetConstReferenceMacro(AttachedFileNames, std::vector<std::string>); + const ImageMetadata & GetImageMetadata(); + + void SetImageMetadata(ImageMetadata); + protected: ImageIOBase(); ~ImageIOBase() override; @@ -559,6 +564,14 @@ protected: /** List of files part of the same dataset as the input filename */ std::vector<std::string> m_AttachedFileNames; + /** Image metadata pre-parsed by the ImageIO */ + ImageMetadata m_Imd; + + /** Mapping between origin components and output components. Note that the buffer is + already mapped after calling the DoMapBuffer method. This attribute is useful to write + band related metadatas. */ + std::vector<unsigned int> m_BandList; + private: ImageIOBase(const Self&) = delete; void operator=(const Self&) = delete; diff --git a/Modules/Core/ImageBase/include/otbVectorImage.h b/Modules/Core/ImageBase/include/otbVectorImage.h index 9f08cc64fdab47563356b33fc7dfc0e869ac9fde..c77ec6ed35ad39e2dca82746a95bfab68cca4e86 100644 --- a/Modules/Core/ImageBase/include/otbVectorImage.h +++ b/Modules/Core/ImageBase/include/otbVectorImage.h @@ -30,6 +30,7 @@ #include "itkVectorImage.h" #endif #include "otbImageMetadataInterfaceBase.h" +#include "otbImageCommons.h" #include "OTBImageBaseExport.h" namespace otb @@ -41,7 +42,9 @@ namespace otb * \ingroup OTBImageBase */ template <class TPixel, unsigned int VImageDimension = 2> -class OTBImageBase_EXPORT_TEMPLATE VectorImage : public itk::VectorImage<TPixel, VImageDimension> +class OTBImageBase_EXPORT_TEMPLATE VectorImage + : public itk::VectorImage<TPixel, VImageDimension> + , public ImageCommons { public: /** Standard class typedefs. */ @@ -119,30 +122,18 @@ public: * of the index (0, 0). */ typedef typename Superclass::PointType PointType; - /** Get the projection coordinate system of the image. */ - virtual std::string GetProjectionRef(void) const; - - virtual void SetProjectionRef(const std::string& wkt); - - /** Get the GCP projection coordinates of the image. */ - virtual std::string GetGCPProjection(void) const; - - virtual unsigned int GetGCPCount(void) const; - - virtual OTB_GCP& GetGCPs(unsigned int GCPnum); - virtual const OTB_GCP& GetGCPs(unsigned int GCPnum) const; - - virtual std::string GetGCPId(unsigned int GCPnum) const; - virtual std::string GetGCPInfo(unsigned int GCPnum) const; - virtual double GetGCPRow(unsigned int GCPnum) const; - virtual double GetGCPCol(unsigned int GCPnum) const; - virtual double GetGCPX(unsigned int GCPnum) const; - virtual double GetGCPY(unsigned int GCPnum) const; - virtual double GetGCPZ(unsigned int GCPnum) const; - /** Get the six coefficients of affine geoTtransform. */ virtual VectorType GetGeoTransform(void) const; + /** Get image corners. */ + // TODO: GenericRSTransform should be instanciated to translate from physical + // space to EPSG:4328 ? + VectorType GetUpperLeftCorner(void) const; + VectorType GetUpperRightCorner(void) const; + VectorType GetLowerLeftCorner(void) const; + VectorType GetLowerRightCorner(void) const; + + /** Get signed spacing */ SpacingType GetSignedSpacing() const; @@ -150,18 +141,14 @@ public: virtual void SetSignedSpacing(SpacingType spacing); virtual void SetSignedSpacing(double spacing[VImageDimension]); - /** Get image corners. */ - virtual VectorType GetUpperLeftCorner(void) const; - virtual VectorType GetUpperRightCorner(void) const; - virtual VectorType GetLowerLeftCorner(void) const; - virtual VectorType GetLowerRightCorner(void) const; - /** Get image keyword list */ virtual ImageKeywordlistType GetImageKeywordlist(void); virtual const ImageKeywordlistType GetImageKeywordlist(void) const; virtual void SetImageKeywordList(const ImageKeywordlistType& kwl); + virtual void SetNumberOfComponentsPerPixel(unsigned int n) override; + /// Copy metadata from a DataObject void CopyInformation(const itk::DataObject*) override; diff --git a/Modules/Core/ImageBase/include/otbVectorImage.hxx b/Modules/Core/ImageBase/include/otbVectorImage.hxx index bbc379b0c85c89cc95b304347194357629cde0a3..531692f2a6e46d3418afa859d3544134bb996947 100644 --- a/Modules/Core/ImageBase/include/otbVectorImage.hxx +++ b/Modules/Core/ImageBase/include/otbVectorImage.hxx @@ -35,114 +35,6 @@ VectorImage<TPixel, VImageDimension>::VectorImage() { } -template <class TPixel, unsigned int VImageDimension> -std::string VectorImage<TPixel, VImageDimension>::GetProjectionRef(void) const -{ - return (this->GetMetaDataInterface()->GetProjectionRef()); -} - -template <class TPixel, unsigned int VImageDimension> -void VectorImage<TPixel, VImageDimension>::SetProjectionRef(const std::string& kwl) -{ - itk::EncapsulateMetaData<std::string>(this->GetMetaDataDictionary(), MetaDataKey::ProjectionRefKey, kwl); -} - - -template <class TPixel, unsigned int VImageDimension> -std::string VectorImage<TPixel, VImageDimension>::GetGCPProjection(void) const -{ - return (this->GetMetaDataInterface()->GetGCPProjection()); -} - -template <class TPixel, unsigned int VImageDimension> -unsigned int VectorImage<TPixel, VImageDimension>::GetGCPCount(void) const -{ - return (this->GetMetaDataInterface()->GetGCPCount()); -} - -template <class TPixel, unsigned int VImageDimension> -OTB_GCP& VectorImage<TPixel, VImageDimension>::GetGCPs(unsigned int GCPnum) -{ - return (this->GetMetaDataInterface()->GetGCPs(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -const OTB_GCP& VectorImage<TPixel, VImageDimension>::GetGCPs(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPs(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -std::string VectorImage<TPixel, VImageDimension>::GetGCPId(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPId(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -std::string VectorImage<TPixel, VImageDimension>::GetGCPInfo(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPInfo(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -double VectorImage<TPixel, VImageDimension>::GetGCPRow(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPRow(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -double VectorImage<TPixel, VImageDimension>::GetGCPCol(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPCol(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -double VectorImage<TPixel, VImageDimension>::GetGCPX(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPX(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -double VectorImage<TPixel, VImageDimension>::GetGCPY(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPY(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -double VectorImage<TPixel, VImageDimension>::GetGCPZ(unsigned int GCPnum) const -{ - return (this->GetMetaDataInterface()->GetGCPZ(GCPnum)); -} - -template <class TPixel, unsigned int VImageDimension> -typename VectorImage<TPixel, VImageDimension>::VectorType VectorImage<TPixel, VImageDimension>::GetGeoTransform(void) const -{ - return (this->GetMetaDataInterface()->GetGeoTransform()); -} - -template <class TPixel, unsigned int VImageDimension> -typename VectorImage<TPixel, VImageDimension>::VectorType VectorImage<TPixel, VImageDimension>::GetUpperLeftCorner(void) const -{ - return (this->GetMetaDataInterface()->GetUpperLeftCorner()); -} - -template <class TPixel, unsigned int VImageDimension> -typename VectorImage<TPixel, VImageDimension>::VectorType VectorImage<TPixel, VImageDimension>::GetUpperRightCorner(void) const -{ - return (this->GetMetaDataInterface()->GetUpperRightCorner()); -} - -template <class TPixel, unsigned int VImageDimension> -typename VectorImage<TPixel, VImageDimension>::VectorType VectorImage<TPixel, VImageDimension>::GetLowerLeftCorner(void) const -{ - return (this->GetMetaDataInterface()->GetLowerLeftCorner()); -} - -template <class TPixel, unsigned int VImageDimension> -typename VectorImage<TPixel, VImageDimension>::VectorType VectorImage<TPixel, VImageDimension>::GetLowerRightCorner(void) const -{ - return (this->GetMetaDataInterface()->GetLowerRightCorner()); -} template <class TPixel, unsigned int VImageDimension> typename VectorImage<TPixel, VImageDimension>::SpacingType VectorImage<TPixel, VImageDimension>::GetSignedSpacing() const @@ -216,6 +108,102 @@ void VectorImage<TPixel, VImageDimension>::CopyInformation(const itk::DataObject { Superclass::CopyInformation(data); this->itk::Object::SetMetaDataDictionary(data->GetMetaDataDictionary()); + const ImageCommons* imc = dynamic_cast<const ImageCommons*>(data); + if (imc != nullptr) + { + const auto & imd = imc->GetImageMetadata(); + // std::cout << "hello " << this->GetNumberOfComponentsPerPixel() << std::endl; + if (imd.Bands.size() > 0 && imd.Bands.size() != this->GetNumberOfComponentsPerPixel()) + { + SetImageMetadata(ImageMetadata(imd.GeometryKeys, imd.NumericKeys, imd.StringKeys, imd.LUT1DKeys, + imd.LUT2DKeys, imd.TimeKeys, imd.ExtraKeys, ImageMetadata::ImageMetadataBandsType(this->GetNumberOfComponentsPerPixel()))); + } + else + { + SetImageMetadata(imd); + } + } +} + + +template< typename TPixel, unsigned int VImageDimension > +void +VectorImage< TPixel, VImageDimension >::SetNumberOfComponentsPerPixel(unsigned int n) +{ + if (this->GetNumberOfComponentsPerPixel() != n) + { + SetBandImageMetadata(ImageMetadata::ImageMetadataBandsType(n)); + } + + Superclass::SetNumberOfComponentsPerPixel(n); +} + +template <class TPixel, unsigned int VImageDimension> +typename VectorImage<TPixel, VImageDimension>::VectorType VectorImage<TPixel, VImageDimension>::GetGeoTransform(void) const +{ + VectorImage<TPixel, VImageDimension>::VectorType geoTransform(6); + + auto origin = this->GetOrigin(); + auto spacing = this->GetSpacing(); + auto direction = this->GetDirection(); + + // Note : OTB does not handle rotated geoTransform (see GDALImageIO) + geoTransform[0] = origin[0] - 0.5 * spacing[0] * direction[0][0]; + geoTransform[3] = origin[1] - 0.5 * spacing[1] * direction[1][1]; + geoTransform[1] = spacing[0] * direction[0][0]; + geoTransform[5] = spacing[1] * direction[1][1]; + geoTransform[2] = 0.; + geoTransform[4] = 0.; + return (geoTransform); +} + + +template <class TPixel, unsigned int VImageDimension> +typename VectorImage<TPixel, VImageDimension>::VectorType +VectorImage<TPixel, VImageDimension>::GetUpperLeftCorner(void) const +{ + PointType physicalPoint; + itk::ContinuousIndex<double, VImageDimension> index; + index.Fill(-0.5); + this->TransformContinuousIndexToPhysicalPoint (index, physicalPoint) ; + return {physicalPoint[0],physicalPoint[1]}; +} + +template <class TPixel, unsigned int VImageDimension> +typename VectorImage<TPixel, VImageDimension>::VectorType +VectorImage<TPixel, VImageDimension>::GetUpperRightCorner(void) const +{ + PointType physicalPoint; + itk::ContinuousIndex<double, VImageDimension> index; + index.Fill(-0.5); + index[0] = -0.5 + this->GetLargestPossibleRegion().GetSize()[0]; + this->TransformContinuousIndexToPhysicalPoint (index, physicalPoint) ; + return {physicalPoint[0],physicalPoint[1]}; +} + +template <class TPixel, unsigned int VImageDimension> +typename VectorImage<TPixel, VImageDimension>::VectorType +VectorImage<TPixel, VImageDimension>::GetLowerLeftCorner(void) const +{ + PointType physicalPoint; + itk::ContinuousIndex<double, VImageDimension> index; + index.Fill(-0.5); + index[1] = -0.5 + this->GetLargestPossibleRegion().GetSize()[1]; + this->TransformContinuousIndexToPhysicalPoint (index, physicalPoint) ; + return {physicalPoint[0],physicalPoint[1]}; +} + +template <class TPixel, unsigned int VImageDimension> +typename VectorImage<TPixel, VImageDimension>::VectorType +VectorImage<TPixel, VImageDimension>::GetLowerRightCorner(void) const +{ + PointType physicalPoint; + itk::ContinuousIndex<double, VImageDimension> index; + index.Fill(-0.5); + index[0] = -0.5 + this->GetLargestPossibleRegion().GetSize()[0]; + index[1] = -0.5 + this->GetLargestPossibleRegion().GetSize()[1]; + this->TransformContinuousIndexToPhysicalPoint (index, physicalPoint) ; + return {physicalPoint[0],physicalPoint[1]}; } template <class TPixel, unsigned int VImageDimension> diff --git a/Modules/Core/ImageBase/src/CMakeLists.txt b/Modules/Core/ImageBase/src/CMakeLists.txt index 5bce747df06841c7b27e19bc15ef6617f2a6393c..beee26dc837a87a2c1d074119f8ed00244de75a1 100644 --- a/Modules/Core/ImageBase/src/CMakeLists.txt +++ b/Modules/Core/ImageBase/src/CMakeLists.txt @@ -22,6 +22,7 @@ set(OTBImageBase_SRC otbImageIOBase.cxx otbImage.cxx otbVectorImage.cxx + otbImageCommons.cxx ) add_library(OTBImageBase ${OTBImageBase_SRC}) diff --git a/Modules/Core/ImageBase/src/otbImageCommons.cxx b/Modules/Core/ImageBase/src/otbImageCommons.cxx new file mode 100644 index 0000000000000000000000000000000000000000..8923d0ba8ef3c76e756cff435d10b1bcc490434a --- /dev/null +++ b/Modules/Core/ImageBase/src/otbImageCommons.cxx @@ -0,0 +1,128 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "otbImageCommons.h" + +namespace otb +{ + +void ImageCommons::SetImageMetadata(ImageMetadata imd) +{ + m_Imd = std::move(imd); +} + +void ImageCommons::SetBandImageMetadata(ImageMetadata::ImageMetadataBandsType bands) +{ + m_Imd.Bands = std::move(bands); +} + +const ImageMetadata & ImageCommons::GetImageMetadata() const +{ + return m_Imd; +} + +std::string ImageCommons::GetProjectionRef(void) const +{ + // TODO: support EPSG and proj as fallback + return m_Imd.GetProjectionWKT(); +} + + +void ImageCommons::SetProjectionRef(const std::string& proj) +{ + // TODO: support EPSG and proj as fallback + m_Imd.Add(MDGeom::ProjectionWKT, proj); +} + + +std::string ImageCommons::GetGCPProjection(void) const +{ + if (m_Imd.Has(MDGeom::GCP)) + { + return m_Imd.GetGCPParam().GCPProjection; + } + return ""; +} + + +unsigned int ImageCommons::GetGCPCount(void) const +{ + if (m_Imd.Has(MDGeom::GCP)) + { + return m_Imd.GetGCPParam().GCPs.size(); + } + return 0; +} + + +const GCP& ImageCommons::GetGCPs(unsigned int GCPnum) const +{ + assert(GCPnum < GetGCPCount()); + return m_Imd.GetGCPParam().GCPs[GCPnum]; +} + + +std::string ImageCommons::GetGCPId(unsigned int GCPnum) const +{ + return GetGCPs(GCPnum).m_Id; +} + + +std::string ImageCommons::GetGCPInfo(unsigned int GCPnum) const +{ + return GetGCPs(GCPnum).m_Info; +} + + +double ImageCommons::GetGCPRow(unsigned int GCPnum) const +{ + return GetGCPs(GCPnum).m_GCPRow; +} + + +double ImageCommons::GetGCPCol(unsigned int GCPnum) const +{ + return GetGCPs(GCPnum).m_GCPCol; +} + + +double ImageCommons::GetGCPX(unsigned int GCPnum) const +{ + return GetGCPs(GCPnum).m_GCPX; +} + + +double ImageCommons::GetGCPY(unsigned int GCPnum) const +{ + return GetGCPs(GCPnum).m_GCPY; +} + + +double ImageCommons::GetGCPZ(unsigned int GCPnum) const +{ + return GetGCPs(GCPnum).m_GCPZ; +} + +bool ImageCommons::HasSensorGeometry() const +{ + return m_Imd.HasSensorGeometry(); +} + +} // end namespace otb diff --git a/Modules/Core/ImageBase/src/otbImageIOBase.cxx b/Modules/Core/ImageBase/src/otbImageIOBase.cxx index 35fb4884e2141473b7435ead86d1badeca046208..c069924acaad46cc556770dc31c2b8937bc91d5a 100644 --- a/Modules/Core/ImageBase/src/otbImageIOBase.cxx +++ b/Modules/Core/ImageBase/src/otbImageIOBase.cxx @@ -1194,6 +1194,8 @@ std::vector<double> ImageIOBase::GetDefaultDirection(unsigned int k) const void ImageIOBase::DoMapBuffer(void* buffer, size_t numberOfPixels, std::vector<unsigned int>& bandList) { + m_BandList = bandList; + size_t componentSize = this->GetComponentSize(); size_t inPixelSize = componentSize * this->GetNumberOfComponents(); size_t outPixelSize = componentSize * bandList.size(); @@ -1289,4 +1291,14 @@ void ImageIOBase::PrintSelf(std::ostream& os, itk::Indent indent) const } } +const ImageMetadata & ImageIOBase::GetImageMetadata() +{ + return m_Imd; +} + +void ImageIOBase::SetImageMetadata(ImageMetadata imd) +{ + m_Imd = std::move(imd); +} + } // namespace itk diff --git a/Modules/Core/ImageBase/test/otbImageTest.cxx b/Modules/Core/ImageBase/test/otbImageTest.cxx index e404e7a2007ea2dabec48e146c97b2de69893767..6d3974be35ed834c1facbd5275f31f1c12a58fae 100644 --- a/Modules/Core/ImageBase/test/otbImageTest.cxx +++ b/Modules/Core/ImageBase/test/otbImageTest.cxx @@ -79,11 +79,15 @@ int otbImageTest(int itkNotUsed(argc), char* argv[]) } InputImageType::VectorType tab = image->GetGeoTransform(); - + file << "Geo Transform " << std::endl; - for (unsigned int i = 0; i < tab.size(); ++i) + // Don't write the identity geotransform. + if (tab != InputImageType::VectorType({0,1,0,0,0,1})) { - file << " " << i << " -> " << tab[i] << std::endl; + for (unsigned int i = 0; i < tab.size(); ++i) + { + file << " " << i << " -> " << tab[i] << std::endl; + } } tab.clear(); diff --git a/Modules/Core/ImageBase/test/otbVectorImageTest.cxx b/Modules/Core/ImageBase/test/otbVectorImageTest.cxx index 37048696502cde1c28abde5a1906e3e06e96e9e5..991023e8f447aa1de3e792e9181a9f55a94cc56c 100644 --- a/Modules/Core/ImageBase/test/otbVectorImageTest.cxx +++ b/Modules/Core/ImageBase/test/otbVectorImageTest.cxx @@ -84,9 +84,13 @@ int otbVectorImageLegacyTest(int argc, char* argv[]) InputImageType::VectorType tab = image->GetGeoTransform(); file << "Geo Transform " << std::endl; - for (unsigned int i = 0; i < tab.size(); ++i) + // Don't write the identity geotransform. + if (tab != InputImageType::VectorType({0,1,0,0,0,1})) { - file << " " << i << " -> " << tab[i] << std::endl; + for (unsigned int i = 0; i < tab.size(); ++i) + { + file << " " << i << " -> " << tab[i] << std::endl; + } } tab.clear(); diff --git a/Modules/Core/ImageList/CMakeLists.txt b/Modules/Core/ImageList/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..22d28a9a890b2c55a6453be35e808bec680242a2 --- /dev/null +++ b/Modules/Core/ImageList/CMakeLists.txt @@ -0,0 +1,22 @@ +# +# Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) +# +# This file is part of Orfeo Toolbox +# +# https://www.orfeo-toolbox.org/ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +project(OTBImageList) +otb_module_impl() diff --git a/Modules/Core/ObjectList/include/otbImageList.h b/Modules/Core/ImageList/include/otbImageList.h similarity index 99% rename from Modules/Core/ObjectList/include/otbImageList.h rename to Modules/Core/ImageList/include/otbImageList.h index 04f908faebd904369e625b53cfbccef234a120cf..ee44054c48caecafecedc4c2ff0d73076980379e 100644 --- a/Modules/Core/ObjectList/include/otbImageList.h +++ b/Modules/Core/ImageList/include/otbImageList.h @@ -32,7 +32,7 @@ namespace otb * object list with the appropriate formalism (iterators, accessors). * \sa ObjectList * - * \ingroup OTBObjectList + * \ingroup OTBImageList */ template <class TImage> diff --git a/Modules/Core/ObjectList/include/otbImageList.hxx b/Modules/Core/ImageList/include/otbImageList.hxx similarity index 100% rename from Modules/Core/ObjectList/include/otbImageList.hxx rename to Modules/Core/ImageList/include/otbImageList.hxx diff --git a/Modules/Core/ObjectList/include/otbImageListSource.h b/Modules/Core/ImageList/include/otbImageListSource.h similarity index 98% rename from Modules/Core/ObjectList/include/otbImageListSource.h rename to Modules/Core/ImageList/include/otbImageListSource.h index c432eec6e259ce052e43d5f35c187a83a59b5c37..178def0675160c2e840f81f2648278bbf19385d5 100644 --- a/Modules/Core/ObjectList/include/otbImageListSource.h +++ b/Modules/Core/ImageList/include/otbImageListSource.h @@ -34,7 +34,7 @@ namespace otb * \ingroup Images * \ingroup Lists * - * \ingroup OTBObjectList + * \ingroup OTBImageList */ template <class TOutputImage> class ITK_EXPORT ImageListSource : public itk::ProcessObject diff --git a/Modules/Core/ObjectList/include/otbImageListSource.hxx b/Modules/Core/ImageList/include/otbImageListSource.hxx similarity index 100% rename from Modules/Core/ObjectList/include/otbImageListSource.hxx rename to Modules/Core/ImageList/include/otbImageListSource.hxx diff --git a/Modules/Core/ObjectList/include/otbImageListToImageFilter.h b/Modules/Core/ImageList/include/otbImageListToImageFilter.h similarity index 99% rename from Modules/Core/ObjectList/include/otbImageListToImageFilter.h rename to Modules/Core/ImageList/include/otbImageListToImageFilter.h index 4aea932b6653056fe7d830f20ba4278af71a4905..7fc2b0b1bbf8f61fdc6f871009053c625a50a54d 100644 --- a/Modules/Core/ObjectList/include/otbImageListToImageFilter.h +++ b/Modules/Core/ImageList/include/otbImageListToImageFilter.h @@ -34,7 +34,7 @@ namespace otb * \ingroup Images * \ingroup Lists * - * \ingroup OTBObjectList + * \ingroup OTBImageList */ template <class TInputImage, class TOutputImage> class ITK_EXPORT ImageListToImageFilter : public itk::ImageSource<TOutputImage> diff --git a/Modules/Core/ObjectList/include/otbImageListToImageFilter.hxx b/Modules/Core/ImageList/include/otbImageListToImageFilter.hxx similarity index 100% rename from Modules/Core/ObjectList/include/otbImageListToImageFilter.hxx rename to Modules/Core/ImageList/include/otbImageListToImageFilter.hxx diff --git a/Modules/Core/ObjectList/include/otbImageListToImageListApplyFilter.h b/Modules/Core/ImageList/include/otbImageListToImageListApplyFilter.h similarity index 99% rename from Modules/Core/ObjectList/include/otbImageListToImageListApplyFilter.h rename to Modules/Core/ImageList/include/otbImageListToImageListApplyFilter.h index 30b8c71e1b5708bc2ff8abcbd77f7da830da27aa..2335079a524f5159be64b3c09adf88a46e29a3d5 100644 --- a/Modules/Core/ObjectList/include/otbImageListToImageListApplyFilter.h +++ b/Modules/Core/ImageList/include/otbImageListToImageListApplyFilter.h @@ -41,7 +41,7 @@ namespace otb * * \ingroup Streamed * - * \ingroup OTBObjectList + * \ingroup OTBImageList */ template <class TInputImageList, class TOutputImageList, class TFilter> class ITK_EXPORT ImageListToImageListApplyFilter : public ImageListToImageListFilter<typename TInputImageList::ImageType, typename TOutputImageList::ImageType> diff --git a/Modules/Core/ObjectList/include/otbImageListToImageListApplyFilter.hxx b/Modules/Core/ImageList/include/otbImageListToImageListApplyFilter.hxx similarity index 100% rename from Modules/Core/ObjectList/include/otbImageListToImageListApplyFilter.hxx rename to Modules/Core/ImageList/include/otbImageListToImageListApplyFilter.hxx diff --git a/Modules/Core/ObjectList/include/otbImageListToImageListFilter.h b/Modules/Core/ImageList/include/otbImageListToImageListFilter.h similarity index 99% rename from Modules/Core/ObjectList/include/otbImageListToImageListFilter.h rename to Modules/Core/ImageList/include/otbImageListToImageListFilter.h index 6d269108d073a8faf62680fff54310644104d400..fb1ff13003870737c4557eea9cea4e46bc18b9c4 100644 --- a/Modules/Core/ObjectList/include/otbImageListToImageListFilter.h +++ b/Modules/Core/ImageList/include/otbImageListToImageListFilter.h @@ -31,7 +31,7 @@ namespace otb * \ingroup Images * \ingroup Lists * - * \ingroup OTBObjectList + * \ingroup OTBImageList */ template <class TInputImage, class TOutputImage> class ITK_EXPORT ImageListToImageListFilter : public ImageListSource<TOutputImage> diff --git a/Modules/Core/ObjectList/include/otbImageListToImageListFilter.hxx b/Modules/Core/ImageList/include/otbImageListToImageListFilter.hxx similarity index 100% rename from Modules/Core/ObjectList/include/otbImageListToImageListFilter.hxx rename to Modules/Core/ImageList/include/otbImageListToImageListFilter.hxx diff --git a/Modules/Core/ObjectList/include/otbImageListToSingleImageFilter.h b/Modules/Core/ImageList/include/otbImageListToSingleImageFilter.h similarity index 99% rename from Modules/Core/ObjectList/include/otbImageListToSingleImageFilter.h rename to Modules/Core/ImageList/include/otbImageListToSingleImageFilter.h index 32c47f0eadfadc9987dd59de1387ca61b8625ee7..05fe92261c3ecf83e99a13a9e3648918b2aa593a 100644 --- a/Modules/Core/ObjectList/include/otbImageListToSingleImageFilter.h +++ b/Modules/Core/ImageList/include/otbImageListToSingleImageFilter.h @@ -36,7 +36,7 @@ namespace otb * * \ingroup Streamed * - * \ingroup OTBObjectList + * \ingroup OTBImageList */ template <class TInputImageType> diff --git a/Modules/Core/ObjectList/include/otbImageListToSingleImageFilter.hxx b/Modules/Core/ImageList/include/otbImageListToSingleImageFilter.hxx similarity index 100% rename from Modules/Core/ObjectList/include/otbImageListToSingleImageFilter.hxx rename to Modules/Core/ImageList/include/otbImageListToSingleImageFilter.hxx diff --git a/Modules/Core/ObjectList/include/otbImageListToVectorImageFilter.h b/Modules/Core/ImageList/include/otbImageListToVectorImageFilter.h similarity index 99% rename from Modules/Core/ObjectList/include/otbImageListToVectorImageFilter.h rename to Modules/Core/ImageList/include/otbImageListToVectorImageFilter.h index 90e1a5228a7c9ff8e9b7443c62838622e84d4119..799c4285ede8cd7b825e650d231eb303e87ab1d3 100644 --- a/Modules/Core/ObjectList/include/otbImageListToVectorImageFilter.h +++ b/Modules/Core/ImageList/include/otbImageListToVectorImageFilter.h @@ -36,7 +36,7 @@ namespace otb * * \ingroup Streamed * - * \ingroup OTBObjectList + * \ingroup OTBImageList */ template <class TImageList, class TVectorImage> class ITK_EXPORT ImageListToVectorImageFilter : public ImageListToImageFilter<typename TImageList::ImageType, TVectorImage> diff --git a/Modules/Core/ObjectList/include/otbImageListToVectorImageFilter.hxx b/Modules/Core/ImageList/include/otbImageListToVectorImageFilter.hxx similarity index 86% rename from Modules/Core/ObjectList/include/otbImageListToVectorImageFilter.hxx rename to Modules/Core/ImageList/include/otbImageListToVectorImageFilter.hxx index 3209599475545e186477ccca2a67bc9f21addf4c..bc2884e5374e198daf38e1967e2288e9018f6828 100644 --- a/Modules/Core/ObjectList/include/otbImageListToVectorImageFilter.hxx +++ b/Modules/Core/ImageList/include/otbImageListToVectorImageFilter.hxx @@ -26,6 +26,7 @@ #include <vector> #include "otbMacro.h" #include "itkProgressReporter.h" +#include "otbImageMetadata.h" namespace otb { @@ -42,6 +43,27 @@ void ImageListToVectorImageFilter<TImageList, TVectorImage>::GenerateOutputInfor this->GetOutput()->CopyInformation(this->GetInput()->GetNthElement(0)); this->GetOutput()->SetNumberOfComponentsPerPixel(this->GetInput()->Size()); this->GetOutput()->SetLargestPossibleRegion(this->GetInput()->GetNthElement(0)->GetLargestPossibleRegion()); + + // Copy band specific metadata from the inputs to the output + ImageMetadata::ImageMetadataBandsType bandsImd; + InputImageListPointerType inputPtr = this->GetInput(); + typename InputImageListType::ConstIterator inputListIt = inputPtr->Begin(); + + while (inputListIt != inputPtr->End()) + { + const auto & imd = inputListIt.Get()->GetImageMetadata(); + if (imd.Bands.size()) + { + bandsImd.push_back(imd.Bands[0]); + } + else + { + bandsImd.push_back({}); + } + ++inputListIt; + } + + this->GetOutput()->SetBandImageMetadata(bandsImd); } } } diff --git a/Modules/Core/ObjectList/include/otbImageToImageListFilter.h b/Modules/Core/ImageList/include/otbImageToImageListFilter.h similarity index 99% rename from Modules/Core/ObjectList/include/otbImageToImageListFilter.h rename to Modules/Core/ImageList/include/otbImageToImageListFilter.h index dcd22d08c293e8e6b0f0081f1eabcfb284e25073..5a20c32deb2304979692995101eec4f4e60e7cdd 100644 --- a/Modules/Core/ObjectList/include/otbImageToImageListFilter.h +++ b/Modules/Core/ImageList/include/otbImageToImageListFilter.h @@ -33,7 +33,7 @@ namespace otb * \ingroup Images * \ingroup Lists * - * \ingroup OTBObjectList + * \ingroup OTBImageList */ template <class TInputImage, class TOutputImage> class ITK_EXPORT ImageToImageListFilter : public ImageListSource<TOutputImage> diff --git a/Modules/Core/ObjectList/include/otbImageToImageListFilter.hxx b/Modules/Core/ImageList/include/otbImageToImageListFilter.hxx similarity index 100% rename from Modules/Core/ObjectList/include/otbImageToImageListFilter.hxx rename to Modules/Core/ImageList/include/otbImageToImageListFilter.hxx diff --git a/Modules/Core/ObjectList/include/otbVectorImageToImageListFilter.h b/Modules/Core/ImageList/include/otbVectorImageToImageListFilter.h similarity index 99% rename from Modules/Core/ObjectList/include/otbVectorImageToImageListFilter.h rename to Modules/Core/ImageList/include/otbVectorImageToImageListFilter.h index 1a92ca9424f4ded4625025bd21fbfb90fc258f63..d44cad898a8188514a34d90af0c0f55748b405eb 100644 --- a/Modules/Core/ObjectList/include/otbVectorImageToImageListFilter.h +++ b/Modules/Core/ImageList/include/otbVectorImageToImageListFilter.h @@ -38,7 +38,7 @@ namespace otb * * \ingroup Streamed * - * \ingroup OTBObjectList + * \ingroup OTBImageList */ template <class TVectorImageType, class TImageList> class ITK_EXPORT VectorImageToImageListFilter : public ImageToImageListFilter<TVectorImageType, typename TImageList::ImageType> diff --git a/Modules/Core/ObjectList/include/otbVectorImageToImageListFilter.hxx b/Modules/Core/ImageList/include/otbVectorImageToImageListFilter.hxx similarity index 100% rename from Modules/Core/ObjectList/include/otbVectorImageToImageListFilter.hxx rename to Modules/Core/ImageList/include/otbVectorImageToImageListFilter.hxx diff --git a/Modules/Core/ImageList/otb-module.cmake b/Modules/Core/ImageList/otb-module.cmake new file mode 100644 index 0000000000000000000000000000000000000000..6aab2917666ed5c6441db1d2f0ccdad6bc2eb805 --- /dev/null +++ b/Modules/Core/ImageList/otb-module.cmake @@ -0,0 +1,41 @@ +# +# Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) +# +# This file is part of Orfeo Toolbox +# +# https://www.orfeo-toolbox.org/ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +set(DOCUMENTATION "This module contains classes that allow manipulating an +list of images with the appropriate formalism. For instance, it is possible to +apply a given scalar image filter to a list of images. or to produce an output +corresponding to the elements selected from an image list. and so on.") + +otb_module(OTBImageList + DEPENDS + OTBCommon + OTBITK + OTBObjectList + OTBMetadata + + TEST_DEPENDS + OTBImageBase + OTBImageIO + OTBTestKernel + OTBVectorDataBase + + DESCRIPTION + "${DOCUMENTATION}" +) diff --git a/Modules/Core/ImageList/test/CMakeLists.txt b/Modules/Core/ImageList/test/CMakeLists.txt new file mode 100644 index 0000000000000000000000000000000000000000..e7ea2c34b7db6241f364e69045ad1502ff7fb1e9 --- /dev/null +++ b/Modules/Core/ImageList/test/CMakeLists.txt @@ -0,0 +1,118 @@ +# +# Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) +# +# This file is part of Orfeo Toolbox +# +# https://www.orfeo-toolbox.org/ +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. +# + +otb_module_test() +set(OTBImageListTests + otbImageList.cxx + otbImageListToImageListApplyFilter.cxx + otbImageListToVectorImageFilter2.cxx + otbImageListToVectorImageFilter.cxx + otbVectorImageToImageListFilter.cxx + otbImageListTestDriver.cxx ) + +add_executable(otbImageListTestDriver ${OTBImageListTests}) +target_link_libraries(otbImageListTestDriver ${OTBImageList-Test_LIBRARIES}) +otb_module_target_label(otbImageListTestDriver) + +otb_add_test(NAME coTvImageList COMMAND otbImageListTestDriver + --compare-image ${NOTOL} ${INPUTDATA}/amst.png + ${TEMP}/amst.png + otbImageList + ${INPUTDATA}/amst.png + ${TEMP}/amst.png + ) + +otb_add_test(NAME bfTvImageListToImageListApplyFilter COMMAND otbImageListTestDriver + --compare-n-images ${EPSILON_7} 3 + ${BASELINE}/bfTvImageListToImageListApplyFilterBand1.png + ${TEMP}/bfTvImageListToImageListApplyFilterBand1.png + ${BASELINE}/bfTvImageListToImageListApplyFilterBand2.png + ${TEMP}/bfTvImageListToImageListApplyFilterBand2.png + ${BASELINE}/bfTvImageListToImageListApplyFilterBand3.png + ${TEMP}/bfTvImageListToImageListApplyFilterBand3.png + otbImageListToImageListApplyFilter + ${INPUTDATA}/poupees_c1.raw.hdr + ${INPUTDATA}/poupees_c2.raw.hdr + ${INPUTDATA}/poupees_c3.raw.hdr + ${TEMP}/bfTvImageListToImageListApplyFilterBand1.png + ${TEMP}/bfTvImageListToImageListApplyFilterBand2.png + ${TEMP}/bfTvImageListToImageListApplyFilterBand3.png + ) + +otb_add_test(NAME coTvImageListToVectorImageFilter2 COMMAND otbImageListTestDriver + otbImageListToVectorImageFilter2 + ${INPUTDATA}/poupees_c1.raw.hdr + ${INPUTDATA}/poupees_c2.raw.hdr + ${INPUTDATA}/poupees_c3.raw.hdr + ) + +otb_add_test(NAME coTvImageListToVectorImageFilter COMMAND otbImageListTestDriver + --compare-image ${EPSILON_7} + ${BASELINE}/bfTvImageListToVectorImageFilter.png + ${TEMP}/coTvImageListToVectorImageFilter.png + otbImageListToVectorImageFilter + ${INPUTDATA}/poupees_c1.raw.hdr + ${INPUTDATA}/poupees_c2.raw.hdr + ${INPUTDATA}/poupees_c3.raw.hdr + ${TEMP}/coTvImageListToVectorImageFilter.png + ) + +otb_add_test(NAME bfTvVectorImageToImageListFilter COMMAND otbImageListTestDriver + --compare-n-images ${EPSILON_7} 3 + ${BASELINE}/bfTvVectorImageToImageListFilterBand1.png + ${TEMP}/bfTvVectorImageToImageListFilterBand1.png + ${BASELINE}/bfTvVectorImageToImageListFilterBand2.png + ${TEMP}/bfTvVectorImageToImageListFilterBand2.png + ${BASELINE}/bfTvVectorImageToImageListFilterBand3.png + ${TEMP}/bfTvVectorImageToImageListFilterBand3.png + otbVectorImageToImageListFilter + ${INPUTDATA}/poupees.png + ${TEMP}/bfTvVectorImageToImageListFilterBand1.png + ${TEMP}/bfTvVectorImageToImageListFilterBand2.png + ${TEMP}/bfTvVectorImageToImageListFilterBand3.png + ) + +otb_add_test(NAME bfTvVectorImageToImageListFilterIt COMMAND otbImageListTestDriver + --compare-n-images ${EPSILON_7} 3 + ${BASELINE}/bfTvVectorImageToImageListFilterBand1.png + ${TEMP}/bfTvVectorImageToImageListFilterItBand1.png + ${BASELINE}/bfTvVectorImageToImageListFilterBand2.png + ${TEMP}/bfTvVectorImageToImageListFilterItBand2.png + ${BASELINE}/bfTvVectorImageToImageListFilterBand3.png + ${TEMP}/bfTvVectorImageToImageListFilterItBand3.png + otbVectorImageToImageListFilterIterator + ${INPUTDATA}/poupees.png + ${TEMP}/bfTvVectorImageToImageListFilterIt + png + ) + +otb_add_test(NAME bfTvVectorImageToImageListFilterIt2 COMMAND otbImageListTestDriver + --compare-n-images ${EPSILON_7} 3 + ${BASELINE}/bfTvVectorImageToImageListFilterBand1.png + ${TEMP}/bfTvVectorImageToImageListFilterIt2Band1.tif + ${BASELINE}/bfTvVectorImageToImageListFilterBand2.png + ${TEMP}/bfTvVectorImageToImageListFilterIt2Band2.tif + ${BASELINE}/bfTvVectorImageToImageListFilterBand3.png + ${TEMP}/bfTvVectorImageToImageListFilterIt2Band3.tif + otbVectorImageToImageListFilterIterator + ${INPUTDATA}/poupees.png + ${TEMP}/bfTvVectorImageToImageListFilterIt2 + tif + ) diff --git a/Modules/Core/ImageList/test/otbImageList.cxx b/Modules/Core/ImageList/test/otbImageList.cxx new file mode 100644 index 0000000000000000000000000000000000000000..2f05c512057f0d19470f4a909d44f9e36c19925f --- /dev/null +++ b/Modules/Core/ImageList/test/otbImageList.cxx @@ -0,0 +1,58 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "itkMacro.h" + +#include "otbImageFileReader.h" +#include "otbImageFileWriter.h" +#include "otbImageList.h" +#include "otbImage.h" + +int otbImageList(int itkNotUsed(argc), char* argv[]) +{ + const char* inputFilename = argv[1]; + const char* outputFilename = argv[2]; + const unsigned int Dimension = 2; + + typedef unsigned char InputPixelType; + typedef otb::Image<InputPixelType, Dimension> InputImageType; + typedef otb::ImageFileReader<InputImageType> ReaderType; + typedef otb::ImageFileWriter<InputImageType> WriterType; + typedef otb::ImageList<InputImageType> ImageListType; + + // Reading image + ReaderType::Pointer reader = ReaderType::New(); + reader->SetFileName(inputFilename); + reader->Update(); + + // Instantiating ImageList object + ImageListType::Pointer imageList = ImageListType::New(); + + // Appending one image to the list + imageList->PushBack(reader->GetOutput()); + + // Getting the image from the list and writing it to file + WriterType::Pointer writer = WriterType::New(); + writer->SetFileName(outputFilename); + writer->SetInput(imageList->Back()); + writer->Update(); + + return EXIT_SUCCESS; +} diff --git a/Modules/Core/ImageList/test/otbImageListTestDriver.cxx b/Modules/Core/ImageList/test/otbImageListTestDriver.cxx new file mode 100644 index 0000000000000000000000000000000000000000..f364e29da6af423baff972a0d75b1759f3341c30 --- /dev/null +++ b/Modules/Core/ImageList/test/otbImageListTestDriver.cxx @@ -0,0 +1,31 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "otbTestMain.h" + +void RegisterTests() +{ + REGISTER_TEST(otbImageList); + REGISTER_TEST(otbImageListToImageListApplyFilter); + REGISTER_TEST(otbImageListToVectorImageFilter2); + REGISTER_TEST(otbImageListToVectorImageFilter); + REGISTER_TEST(otbVectorImageToImageListFilter); + REGISTER_TEST(otbVectorImageToImageListFilterIterator); +} diff --git a/Modules/Core/ImageList/test/otbImageListToImageListApplyFilter.cxx b/Modules/Core/ImageList/test/otbImageListToImageListApplyFilter.cxx new file mode 100644 index 0000000000000000000000000000000000000000..1e23305404ce4c996d7c656135adccc34c69dea6 --- /dev/null +++ b/Modules/Core/ImageList/test/otbImageListToImageListApplyFilter.cxx @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "itkMacro.h" + +#include "otbImageListToImageListApplyFilter.h" +#include "otbImageList.h" +#include "otbImage.h" +#include "itkMeanImageFilter.h" +#include "otbImageFileReader.h" +#include "otbImageFileWriter.h" + +int otbImageListToImageListApplyFilter(int itkNotUsed(argc), char* argv[]) +{ + char* infname1 = argv[1]; + char* infname2 = argv[2]; + char* infname3 = argv[3]; + char* outfname1 = argv[4]; + char* outfname2 = argv[5]; + char* outfname3 = argv[6]; + + const unsigned int Dimension = 2; + typedef unsigned char PixelType; + typedef otb::Image<PixelType, Dimension> ImageType; + typedef otb::ImageList<ImageType> ImageListType; + typedef itk::MeanImageFilter<ImageType, ImageType> MeanFilterType; + + // IO + typedef otb::ImageFileReader<ImageType> ReaderType; + typedef otb::ImageFileWriter<ImageType> WriterType; + + typedef otb::ImageListToImageListApplyFilter<ImageListType, ImageListType, MeanFilterType> ImageListToImageListApplyFilterType; + + // Instantiating object + ImageListToImageListApplyFilterType::Pointer filter = ImageListToImageListApplyFilterType::New(); + + ReaderType::Pointer reader1, reader2, reader3; + + reader1 = ReaderType::New(); + reader1->SetFileName(infname1); + + reader2 = ReaderType::New(); + reader2->SetFileName(infname2); + + reader3 = ReaderType::New(); + reader3->SetFileName(infname3); + + ImageListType::Pointer imageList = ImageListType::New(); + imageList->PushBack(reader1->GetOutput()); + imageList->PushBack(reader2->GetOutput()); + imageList->PushBack(reader3->GetOutput()); + + MeanFilterType::Pointer meanFilter = MeanFilterType::New(); + + filter->SetInput(imageList); + filter->SetFilter(meanFilter); + filter->Update(); + + WriterType::Pointer writer = WriterType::New(); + writer->SetFileName(outfname1); + writer->SetInput(filter->GetOutput()->GetNthElement(0)); + writer->Update(); + + writer = WriterType::New(); + writer->SetFileName(outfname2); + writer->SetInput(filter->GetOutput()->GetNthElement(0)); + writer->Update(); + + writer = WriterType::New(); + writer->SetFileName(outfname3); + writer->SetInput(filter->GetOutput()->GetNthElement(0)); + writer->Update(); + + return EXIT_SUCCESS; +} diff --git a/Modules/Core/ImageList/test/otbImageListToVectorImageFilter.cxx b/Modules/Core/ImageList/test/otbImageListToVectorImageFilter.cxx new file mode 100644 index 0000000000000000000000000000000000000000..4bd4cb5e1515ceec2d35ee998b0297658ce35b6f --- /dev/null +++ b/Modules/Core/ImageList/test/otbImageListToVectorImageFilter.cxx @@ -0,0 +1,79 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "itkMacro.h" + +#include "otbImageListToVectorImageFilter.h" +#include "otbVectorImage.h" +#include "otbImage.h" +#include "otbImageList.h" +#include "otbImageFileReader.h" +#include "otbImageFileWriter.h" + +int otbImageListToVectorImageFilter(int itkNotUsed(argc), char* argv[]) +{ + const unsigned int Dimension = 2; + typedef unsigned char PixelType; + + char* infname1 = argv[1]; + char* infname2 = argv[2]; + char* infname3 = argv[3]; + char* outfname = argv[4]; + + typedef otb::Image<PixelType, Dimension> ImageType; + typedef otb::VectorImage<PixelType, Dimension> VectorImageType; + typedef otb::ImageList<ImageType> ImageListType; + + // IO + typedef otb::ImageFileReader<ImageType> ReaderType; + typedef otb::ImageFileWriter<VectorImageType> WriterType; + + typedef otb::ImageListToVectorImageFilter<ImageListType, VectorImageType> ImageListToVectorImageFilterType; + + // Instantiating object + ImageListToVectorImageFilterType::Pointer filter = ImageListToVectorImageFilterType::New(); + + // Building image list + + ReaderType::Pointer reader1, reader2, reader3; + + reader1 = ReaderType::New(); + reader1->SetFileName(infname1); + + reader2 = ReaderType::New(); + reader2->SetFileName(infname2); + + reader3 = ReaderType::New(); + reader3->SetFileName(infname3); + + ImageListType::Pointer imageList = ImageListType::New(); + imageList->PushBack(reader1->GetOutput()); + imageList->PushBack(reader2->GetOutput()); + imageList->PushBack(reader3->GetOutput()); + + filter->SetInput(imageList); + + WriterType::Pointer writer = WriterType::New(); + writer->SetInput(filter->GetOutput()); + writer->SetFileName(outfname); + writer->Update(); + + return EXIT_SUCCESS; +} diff --git a/Modules/Core/ImageList/test/otbImageListToVectorImageFilter2.cxx b/Modules/Core/ImageList/test/otbImageListToVectorImageFilter2.cxx new file mode 100644 index 0000000000000000000000000000000000000000..a2514d8659d1b0a707cd5ac2340c00abd8404a52 --- /dev/null +++ b/Modules/Core/ImageList/test/otbImageListToVectorImageFilter2.cxx @@ -0,0 +1,92 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "itkMacro.h" + +#include "otbImageListToVectorImageFilter.h" +#include "otbVectorImage.h" +#include "otbImage.h" +#include "otbImageList.h" +#include "otbImageFileReader.h" + +int otbImageListToVectorImageFilter2(int itkNotUsed(argc), char* argv[]) +{ + const unsigned int Dimension = 2; + typedef unsigned char PixelType; + + char* infname1 = argv[1]; + char* infname2 = argv[2]; + char* infname3 = argv[3]; + // char * outfname = argv[4]; + + typedef otb::Image<PixelType, Dimension> ImageType; + typedef otb::VectorImage<PixelType, Dimension> VectorImageType; + // typedef VectorImageType::Pointer VectorImagePointerType; + typedef otb::ImageList<ImageType> ImageListType; + + // IO + typedef otb::ImageFileReader<ImageType> ReaderType; + // typedef otb::ImageFileWriter<VectorImageType> WriterType; + + typedef otb::ImageListToVectorImageFilter<ImageListType, VectorImageType> ImageListToVectorImageFilterType; + + // Instantiating object + ImageListToVectorImageFilterType::Pointer filter = ImageListToVectorImageFilterType::New(); + + // Building image list + + ReaderType::Pointer reader1, reader2, reader3; + + reader1 = ReaderType::New(); + reader1->SetFileName(infname1); + + reader2 = ReaderType::New(); + reader2->SetFileName(infname2); + + reader3 = ReaderType::New(); + reader3->SetFileName(infname3); + + ImageListType::Pointer imageList = ImageListType::New(); + imageList->PushBack(reader1->GetOutput()); + imageList->PushBack(reader2->GetOutput()); + imageList->PushBack(reader3->GetOutput()); + + filter->SetInput(imageList); + + VectorImageType::Pointer m_OutputImage = VectorImageType::New(); + m_OutputImage = filter->GetOutput(); + + m_OutputImage->UpdateOutputInformation(); + + unsigned int nbComp1 = m_OutputImage->GetNumberOfComponentsPerPixel(); + + imageList->PopBack(); + + m_OutputImage->UpdateOutputInformation(); + + unsigned int nbComp2 = m_OutputImage->GetNumberOfComponentsPerPixel(); + std::cout << "component 1: " << nbComp1 << std::endl; + std::cout << "component 2: " << nbComp2 << std::endl; + + if (nbComp2 != nbComp1 - 1) + return EXIT_FAILURE; + + return EXIT_SUCCESS; +} diff --git a/Modules/Core/ImageList/test/otbVectorImageToImageListFilter.cxx b/Modules/Core/ImageList/test/otbVectorImageToImageListFilter.cxx new file mode 100644 index 0000000000000000000000000000000000000000..83fd9e353c65b9ae05790f58481167113ee0fbee --- /dev/null +++ b/Modules/Core/ImageList/test/otbVectorImageToImageListFilter.cxx @@ -0,0 +1,129 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "itkMacro.h" + +#include "otbVectorImageToImageListFilter.h" +#include "otbVectorImage.h" +#include "otbImageList.h" +#include "otbImage.h" +#include "otbImageFileReader.h" +#include "otbImageFileWriter.h" + +int otbVectorImageToImageListFilter(int itkNotUsed(argc), char* argv[]) +{ + const unsigned int Dimension = 2; + char* infname = argv[1]; + char* outfname1 = argv[2]; + char* outfname2 = argv[3]; + char* outfname3 = argv[4]; + + typedef unsigned char PixelType; + typedef otb::Image<PixelType, Dimension> ImageType; + typedef otb::VectorImage<PixelType, Dimension> VectorImageType; + typedef otb::ImageList<ImageType> ImageListType; + + // IO + typedef otb::ImageFileReader<VectorImageType> ReaderType; + typedef otb::ImageFileWriter<ImageType> WriterType; + + typedef otb::VectorImageToImageListFilter<VectorImageType, ImageListType> VectorImageToImageListFilterType; + + // Instantiating object + VectorImageToImageListFilterType::Pointer filter = VectorImageToImageListFilterType::New(); + + ReaderType::Pointer reader = ReaderType::New(); + reader->SetFileName(infname); + + filter->SetInput(reader->GetOutput()); + + filter->Update(); + + WriterType::Pointer writer = WriterType::New(); + writer->SetFileName(outfname1); + writer->SetInput(filter->GetOutput()->GetNthElement(0)); + writer->Update(); + + writer = WriterType::New(); + writer->SetFileName(outfname2); + writer->SetInput(filter->GetOutput()->GetNthElement(1)); + writer->Update(); + + writer = WriterType::New(); + writer->SetFileName(outfname3); + writer->SetInput(filter->GetOutput()->GetNthElement(2)); + writer->Update(); + + return EXIT_SUCCESS; +} + +int otbVectorImageToImageListFilterIterator(int itkNotUsed(argc), char* argv[]) +{ + const unsigned int Dimension = 2; + const char* infname = argv[1]; + const char* outputFilenamePrefix = argv[2]; + const char* outputFilenameSuffix = argv[3]; + + typedef unsigned char PixelType; + typedef otb::Image<PixelType, Dimension> ImageType; + typedef otb::VectorImage<PixelType, Dimension> VectorImageType; + typedef otb::ImageList<ImageType> ImageListType; + + // IO + typedef otb::ImageFileReader<VectorImageType> ReaderType; + typedef otb::ImageFileWriter<ImageType> WriterType; + + typedef otb::VectorImageToImageListFilter<VectorImageType, ImageListType> VectorImageToImageListFilterType; + + typedef VectorImageToImageListFilterType::OutputImageListType::Iterator ImageListIterator; + + // Instantiating object + + ReaderType::Pointer reader = ReaderType::New(); + reader->SetFileName(infname); + + VectorImageToImageListFilterType::Pointer filter = VectorImageToImageListFilterType::New(); + filter->SetInput(reader->GetOutput()); + // We need to do that to fill the Imagelist before update and use it as input of other filter + filter->UpdateOutputInformation(); + + ImageListIterator itOutput = filter->GetOutput()->Begin(); + + WriterType::Pointer writer = WriterType::New(); + + int i = 1; + + while ((itOutput != filter->GetOutput()->End())) + { + std::stringstream oss; + oss << outputFilenamePrefix << "Band" << i << "." << outputFilenameSuffix; + + writer->SetInput(itOutput.Get()); + + writer->SetFileName(oss.str()); + writer->SetNumberOfDivisionsTiledStreaming(8); + writer->Update(); + + ++itOutput; + ++i; + } + + return EXIT_SUCCESS; +} diff --git a/Modules/Core/Metadata/include/otbGeometryMetadata.h b/Modules/Core/Metadata/include/otbGeometryMetadata.h new file mode 100644 index 0000000000000000000000000000000000000000..ccd902ecce298e49760467685d104a208386760a --- /dev/null +++ b/Modules/Core/Metadata/include/otbGeometryMetadata.h @@ -0,0 +1,172 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef otbGeometryMetadata_h +#define otbGeometryMetadata_h + +#include "OTBMetadataExport.h" +#include "otbMetaDataKey.h" + + +#include <string> +#include <vector> +#include <sstream> + +namespace otb +{ + +/** \class GCP + * + * \brief This GCP class is used to manage the GCP parameters + * in OTB. + * + * + * \ingroup OTBMetadata + */ +class OTBMetadata_EXPORT GCP +{ +public: + /** Unique identifier, often numeric */ + std::string m_Id; + + /** Informational message or "" */ + std::string m_Info; + + /** Pixel (x) location of GCP on raster */ + double m_GCPCol; + + /** Line (y) location of GCP on raster */ + double m_GCPRow; + + /** X position of GCP in georeferenced space */ + double m_GCPX; + + /** Y position of GCP in georeferenced space */ + double m_GCPY; + + /** Elevation of GCP, or zero if not known */ + double m_GCPZ; + + GCP() = default; + GCP(std::string id, std::string info, double col, double row, double px, double py, double pz); + + void Print(std::ostream& os) const; + std::string ToJSON(bool multiline=false) const; +}; + +namespace Projection +{ + +/** \struct GCPParam + * + * \brief This structure handles the list of the GCP parameters + */ +struct OTBMetadata_EXPORT GCPParam +{ + std::string GCPProjection; + + std::vector<GCP> GCPs; + + // JSON export + std::string ToJSON(bool multiline=false) const; +}; + +/** \struct RPCParam + * + * \brief Coefficients for RPC model (quite similar to GDALRPCInfo) + * + * Details of the mathematical model: + * + * x = (longitude - LonOffset) / LonScale + * y = (latitude - LatOffset) / LatScale + * z = (Height - HeightOffset) / HeightScale + * rn = (Row - LineOffset) / LineScale + * cn = (Column - SampleOffset) / SampleScale + * + * rn = LineNum(x,y,z) / LineDen(x,y,z) + * cn = SampleNum(x,y,z) / SampleDen(x,y,z) + * + * Each cubic polynomial function LineNum, LineDen, SampleNum, SampleDen has + * 20 coefficients: + * + * c1 + (order 0) + * c2*x + c3*y + c4*z + (order 1) + * c5*x*y + c6*x*z + c7*y*z + c8*x^2 + c9*y^2 + c10*z^2 + (order 2) + * c11*x*y*z + c12*x^3 + c13*x*y^2 + c14*x*z^2 + c15*x^2*y + + * c16*y^3 + c17*y*z^2 + c18*x^2*z + c19*y^2*z + c20*z^3 (order 3) + * + * \ingroup OTBMetadata + */ +struct OTBMetadata_EXPORT RPCParam +{ + // Offsets + double LineOffset = 0.0; + double SampleOffset = 0.0; + double LatOffset = 0.0; + double LonOffset = 0.0; + double HeightOffset = 0.0; + + // Scales + double LineScale = 0.0; + double SampleScale = 0.0; + double LatScale = 0.0; + double LonScale = 0.0; + double HeightScale = 0.0; + + // Line numerator coefficients + double LineNum[20] = { + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; + + // Line denominator coefficients + double LineDen[20] = { + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; + + // Sample numerator coefficients + double SampleNum[20] = { + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; + + // Sample denominator coefficients + double SampleDen[20] = { + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, + 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0}; + + // JSON export + std::string ToJSON(bool multiline=false) const; + inline static std::string doubleArrayToString(const double* array) + { + std::ostringstream oss; + oss << "["; + for (int loop = 0 ; loop < 20 ; loop++) + oss << " \"" << array[loop] << "\", "; + oss << "]"; + return oss.str(); + }; + +}; + +} // end namespace Projection + +} // end namespace otb + +#endif + diff --git a/Modules/Core/Metadata/include/otbImageMetadata.h b/Modules/Core/Metadata/include/otbImageMetadata.h new file mode 100644 index 0000000000000000000000000000000000000000..f4d7b41c7ca8088ae34dc7e43ffdd6f64e67d6a5 --- /dev/null +++ b/Modules/Core/Metadata/include/otbImageMetadata.h @@ -0,0 +1,313 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef otbImageMetadata_h +#define otbImageMetadata_h + +#include "otbGeometryMetadata.h" +#include "otbSARMetadata.h" +#include "otbMetaDataKey.h" +#include "OTBMetadataExport.h" +#include "otbMacro.h" +#include "itkMath.h" + +#include <boost/any.hpp> +#include <vector> +#include <string> +#include <ctime> +#include <bitset> +#include <map> +#include <unordered_map> +//~ #include <stdexcept> + +namespace otb +{ + +/** \class ImageMetadataBase + * + * \brief Metadata hybrid dictionary + * + * Contains a dict of geometry parameters, several typed dictionaries for + * double, string, and other types. The different metadatas are retrieved + * with enum classes ( one for each type stored in the dictionary). + * + * \ingroup OTBMetadata + */ +class OTBMetadata_EXPORT ImageMetadataBase +{ +public: + /** type of dictionary used internally */ + template <class TKey, class TVal> + using DictType = std::map<TKey, TVal>; + + using Keywordlist = std::unordered_map<std::string, std::string>; + + /** Stack of geometry parameters, sorted by decreasing priority + * Cases with corresponding enum values: + * - projected + * * MDGeom::ProjectionWKT -> WKT (string) + * * MDGeom::ProjectionEPSG -> EPSG (integer) + * * MDGeom::ProjectionProj -> proj4 (string) + * - sensor + * * MDGeom::RPC -> RPCParam + * * MDGeom::SAR -> SARParam + * * MDGeom::Adjustment -> optional adjustment param (TBD) + * * MDGeom::GCP -> GCPParam + * * MDGeom::SensorGeometry -> other sensor model represented by a std::string (need a factory to deal with it) + * - epipolar ? + * + epipolar rectification grid + * + * Corner cases we may encounter: + * - sensor refinement: [RPC, GCP, adjustment] + * - piece-wise sensor model: [compound_RPC] ( handled as MDGeom::SensorGeometry) + * - raw georeferencing: [GCP] + * - Fine registration : [WKT, adjustment grid] + */ + DictType<MDGeom, boost::any> GeometryKeys; + + DictType<MDNum, double> NumericKeys; + + DictType<MDStr, std::string> StringKeys; + + DictType<MDL1D, MetaData::LUT1D> LUT1DKeys; + + DictType<MDL2D, MetaData::LUT2D> LUT2DKeys; + + DictType<MDTime, MetaData::Time> TimeKeys; + + DictType<std::string, std::string> ExtraKeys; + + // Constructor + ImageMetadataBase(); + ImageMetadataBase(DictType<MDGeom, boost::any> geometryKeys, + DictType<MDNum, double> numericKeys, + DictType<MDStr, std::string> stringKeys, + DictType<MDL1D, MetaData::LUT1D> lut1DKeys, + DictType<MDL2D, MetaData::LUT2D> lut2DKeys, + DictType<MDTime, MetaData::Time> timeKeys, + DictType<std::string, std::string> extraKeys); + + // TODO : iterators ? + + bool HasSensorGeometry() const; + + bool HasProjectedGeometry() const; + + size_t RemoveSensorGeometry(); + + size_t RemoveProjectedGeometry(); + + const Projection::GCPParam & GetGCPParam() const; + + std::string GetProjectionWKT() const; + + // -------------------- Geom utility function ---------------------------- + + /** Read-only accessor to geometric keys */ + const boost::any & operator[](const MDGeom& key) const; + + /** Setter for geometric keys */ + void Add(const MDGeom& key, const boost::any &value); + + /** Remove a key from the dictionary (even if the key is already missing) */ + size_t Remove(const MDGeom& key); + + /** Test if a key is available */ + bool Has(const MDGeom& key) const; + + // -------------------- Double utility function ---------------------------- + + /** Read-only accessor to numeric keys */ + const double & operator[](const MDNum& key) const; + + /** Setter for numeric keys */ + void Add(const MDNum& key, const double &value); + + /** Remove a key from the dictionary (even if the key is already missing) */ + size_t Remove(const MDNum& key); + + /** Test if a key is available */ + bool Has(const MDNum& key) const; + + // -------------------- String utility function ---------------------------- + + /** Read-only accessor to string keys */ + const std::string & operator[](const MDStr& key) const; + + /** Setter for string keys */ + void Add(const MDStr& key, const std::string &value); + + /** Remove a key from the dictionary (even if the key is already missing) */ + size_t Remove(const MDStr& key); + + /** Test if a key is available */ + bool Has(const MDStr& key) const; + + // -------------------- LUT1D utility function ---------------------------- + + /** Read-only accessor to 1D LUT keys */ + const MetaData::LUT1D & operator[](const MDL1D& key) const; + + /** Setter for 1D LUT keys */ + void Add(const MDL1D& key, const MetaData::LUT1D &value); + + /** Remove a key from the dictionary (even if the key is already missing) */ + size_t Remove(const MDL1D& key); + + /** Test if a key is available */ + bool Has(const MDL1D& key) const; + + // -------------------- 2D LUT utility function ---------------------------- + + /** Read-only accessor to 2D LUT keys */ + const MetaData::LUT2D & operator[](const MDL2D& key) const; + + /** Setter for 2D LUT keys */ + void Add(const MDL2D& key, const MetaData::LUT2D &value); + + /** Remove a key from the dictionary (even if the key is already missing) */ + size_t Remove(const MDL2D& key); + + /** Test if a key is available */ + bool Has(const MDL2D& key) const; + + // -------------------- Time utility function ---------------------------- + + /** Read-only accessor to time keys */ + const MetaData::Time & operator[](const MDTime& key) const; + + /** Setter for time keys */ + void Add(const MDTime& key, const MetaData::Time &value); + + /** Remove a key from the dictionary (even if the key is already missing) */ + size_t Remove(const MDTime& key); + + /** Test if a key is available */ + bool Has(const MDTime& key) const; + + // -------------------- Extra keys utility function -------------------------- + + /** Read-only accessor to extra keys */ + const std::string & operator[](const std::string & key) const; + + /** Setter for extra keys */ + void Add(const std::string& key, const std::string &value); + + /** Remove a key from the dictionary (even if the key is already missing) */ + size_t Remove(const std::string& key); + + /** Test if a key is available */ + bool Has(const std::string& key) const; + + // -------------------- Other -------------------------- + + /** Fill a KeywordList with the metadata */ + void ToKeywordlist(Keywordlist&) const; + + /** Format the metadata to JSON */ + std::string ToJSON(bool multiline=false) const; + + /** Import metadata from a string keywordlist. + * Will skip MDGeom::SensorGeometry, MDGeom::RPC and MDGeom::GCP. + * Returns True if all keywords were parsed correctly. + */ + bool FromKeywordlist(const Keywordlist&); + + /** Merge with another ImageMetadataBase + * If a key exists in both ImageMetadataBase, keeps the value of this ImageMetadataBase. */ + void Fuse(const ImageMetadataBase& ); + +}; + + +/** \class ImageMetadata + * + * \brief Generic class containing image metadata used in OTB + * + * \ingroup OTBMetadata + */ +class OTBMetadata_EXPORT ImageMetadata: public ImageMetadataBase +{ +public: + /** Metadata object as a vector of Keywordlist */ + using KeywordlistVector = std::vector<ImageMetadata::Keywordlist>; + + /** Band-specific metadatas */ + using ImageMetadataBandsType = std::vector<ImageMetadataBase>; + ImageMetadataBandsType Bands; + + // Constructor + ImageMetadata(); + ImageMetadata(DictType<MDGeom, boost::any> geometryKeys, + DictType<MDNum, double> numericKeys, + DictType<MDStr, std::string> stringKeys, + DictType<MDL1D, MetaData::LUT1D> lut1DKeys, + DictType<MDL2D, MetaData::LUT2D> lut2DKeys, + DictType<MDTime, MetaData::Time> timeKeys, + DictType<std::string, std::string> extraKeys, + ImageMetadataBandsType bands); + + // utility functions + /** Extract metadata from a subset of the bands */ + ImageMetadata slice(int start, int end) const; + + /** concatenate with an other ImageMetadata + * If a key exists in both ImageMetadata, keeps the value of this ImageMetadata.*/ + void append(const ImageMetadata& ); + + /** if all bands share the same value of a key, put it at top level */ + void compact(); + + /** merge with another ImageMetadata + * If a key exists in both ImageMetadata, keeps the value of this ImageMetadata. + * */ + void Merge(const ImageMetadata& ); + + /** Append the Metadata to a vector of KeywordList. + * The first KeywordList contains the metadata common to all the bands. + * The following KeywordList contains the metadata of the bands. + */ + void AppendToKeywordlists(KeywordlistVector&) const; + + /** Append the bands of the Metadata to a vector of KeywordList. + * Each KeywordList contain the metadata of a band. + */ + void AppendToBandKeywordlists(KeywordlistVector&) const; + + /** Import metadata from a vector of keywordlist. + * The first KeywordList contains the metadata common to all the bands. + * The following KeywordList contains the metadata of the bands. + * Will skip MDGeom::SensorGeometry. + * Returns True if all keywords were parsed correctly. + */ + bool FromKeywordlists(const KeywordlistVector&); + + /** Setter for numeric keys on each band*/ + using ImageMetadataBase::Add; + void Add(const MDNum&, const MetaDataKey::VariableLengthVectorType); +}; + +extern OTBMetadata_EXPORT std::ostream& operator<<(std::ostream& os, const otb::ImageMetadataBase& imd); + +extern OTBMetadata_EXPORT std::ostream& operator<<(std::ostream& os, const otb::ImageMetadata& imd); + +} // end namespace otb + +#endif diff --git a/Modules/Core/Metadata/include/otbImageMetadataInterfaceBase.h b/Modules/Core/Metadata/include/otbImageMetadataInterfaceBase.h index e3461814545898a2a33c2469c63fbf341773dce4..bc8a4672e7ae100fff6b859bbeb92ee4c52522d2 100644 --- a/Modules/Core/Metadata/include/otbImageMetadataInterfaceBase.h +++ b/Modules/Core/Metadata/include/otbImageMetadataInterfaceBase.h @@ -27,6 +27,8 @@ #include "itkMetaDataDictionary.h" #include "otbMetaDataKey.h" #include "itkImageBase.h" +#include "otbImageMetadata.h" +#include "otbMetadataSupplierInterface.h" #include "OTBMetadataExport.h" @@ -62,22 +64,17 @@ public: /** Set the image used to get the metadata */ - void SetImage(ImageType* image) - { - this->SetMetaDataDictionary(image->GetMetaDataDictionary()); - } + void SetImage(ImageType* image); /** Set the MetadataDictionary */ - void SetMetaDataDictionary(const MetaDataDictionaryType& dict) - { - m_MetaDataDictionary = dict; - } + void SetMetaDataDictionary(const MetaDataDictionaryType& dict); /** Get the MetadataDictionary */ - const MetaDataDictionaryType& GetMetaDataDictionary() const - { - return m_MetaDataDictionary; - } + const MetaDataDictionaryType& GetMetaDataDictionary() const; + + void SetImageMetadata(ImageMetadata imd); + + const ImageMetadata& GetImageMetadata() const; /** Get the projection coordinate system of the image. */ std::string GetProjectionRef() const; @@ -89,8 +86,8 @@ public: UnsignedIntType GetGCPCount() const; // otbMetadataGetMacro(GCPCount, unsigned int); - OTB_GCP& GetGCPs(unsigned int GCPnum); - // otbMetadataGetGCPnumMacro(GCPs, OTB_GCP&, GCPnum, unsigned int); + GCP& GetGCPs(unsigned int GCPnum); + // otbMetadataGetGCPnumMacro(GCPs, GCP&, GCPnum, unsigned int); std::string GetGCPId(unsigned int GCPnum) const; // otbMetadataGetGCPnumMacro(GCPId, std::string, GCPnum, unsigned int); @@ -174,67 +171,87 @@ public: double GetYPixelSpacing() const; // otbMetadataGetMacro(YPixelSpacing, double); - /** Get the imaging acquisition day from the ossim metadata + /** Get the imaging acquisition day from the ossim metadata * \deprecated */ - virtual int GetDay() const = 0; + virtual int GetDay() const {return -1;} // otbMetadataGetMacro(Day, int); - /** Get the imaging acquisition month from the ossim metadata + /** Get the imaging acquisition month from the ossim metadata * \deprecated */ - virtual int GetMonth() const = 0; + virtual int GetMonth() const {return -1;} // otbMetadataGetMacro(Month, int); - /** Get the imaging acquisition year from the ossim metadata + /** Get the imaging acquisition year from the ossim metadata * \deprecated */ - virtual int GetYear() const = 0; + virtual int GetYear() const {return -1;} // otbMetadataGetMacro(Year, int); - /** Get the imaging acquisition hour from the ossim metadata + /** Get the imaging acquisition hour from the ossim metadata * \deprecated */ - virtual int GetHour() const = 0; + virtual int GetHour() const {return -1;} // otbMetadataGetMacro(Hour, int); - /** Get the imaging acquisition minute from the ossim metadata + /** Get the imaging acquisition minute from the ossim metadata * \deprecated */ - virtual int GetMinute() const = 0; + virtual int GetMinute() const {return -1;} // otbMetadataGetMacro(Minute, int); - /** Get the imaging production day from the ossim metadata + /** Get the imaging production day from the ossim metadata * \deprecated */ - virtual int GetProductionDay() const = 0; + virtual int GetProductionDay() const {return -1;} // otbMetadataGetMacro(ProductionDay, int); - /** Get the imaging production month from the ossim metadata + /** Get the imaging production month from the ossim metadata * \deprecated */ - virtual int GetProductionMonth() const = 0; + virtual int GetProductionMonth() const {return -1;} // otbMetadataGetMacro(ProductionMonth, int); - /** Get the imaging production year from the ossim metadata + /** Get the imaging production year from the ossim metadata * \deprecated */ - virtual int GetProductionYear() const = 0; + virtual int GetProductionYear() const {return -1;} // otbMetadataGetMacro(ProductionYear, int); - /** Convert the band names provided by ossim to the official band names + /** Convert the band names provided by ossim to the official band names * \deprecated */ - virtual StringVectorType GetEnhancedBandNames() const = 0; + virtual StringVectorType GetEnhancedBandNames() const {return StringVectorType();} /** Get the 3 spectral band numbers corresponding to the default display for visualization, * in the order R, G, B */ - virtual UIntVectorType GetDefaultDisplay() const = 0; + virtual UIntVectorType GetDefaultDisplay() const {return {0,1,2}; } - virtual bool CanRead() const = 0; + virtual bool CanRead() const {return false;} + + virtual void Parse(const MetadataSupplierInterface *) + { + otbGenericExceptionMacro(MissingMetadataException,<<"Metadata parsing not implemented") + } static void PrintMetadata(std::ostream& os, itk::Indent indent, const MetaDataDictionaryType& dict); + const std::string& Fetch(MDStr key, const MetadataSupplierInterface & mds, const char *path, int band=-1); + + const double& Fetch(MDNum key, const MetadataSupplierInterface & mds, const char *path, int band=-1); + + const MetaData::Time& Fetch(MDTime key, const MetadataSupplierInterface & mds, const char *path, int band=-1); + + const std::string& Fetch(std::string key, const MetadataSupplierInterface & mds, const char *path, int band=-1); + + const boost::any& FetchRPC(const MetadataSupplierInterface & mds); + + /** Reads into the MetaDataDictionary to find an OSSIM ImageKeywordlist, + * then translate it into ImageMetadata. + * Returns true if succeed. */ + virtual bool ConvertImageKeywordlistToImageMetadata(); + protected: ImageMetadataInterfaceBase(); ~ImageMetadataInterfaceBase() override @@ -245,11 +262,13 @@ protected: MetaDataDictionaryType m_MetaDataDictionary; + ImageMetadata m_Imd; + private: ImageMetadataInterfaceBase(const Self&) = delete; void operator=(const Self&) = delete; - OTB_GCP m_GCP; + GCP m_GCP; }; } // end namespace otb diff --git a/Modules/Core/Metadata/include/otbImageMetadataInterfaceFactory.h b/Modules/Core/Metadata/include/otbImageMetadataInterfaceFactory.h index 6b270c6066c3f08803e3d703ea00cbea2783ef85..3171a6637479b4ec400782d6a2c0d6c956e08472 100644 --- a/Modules/Core/Metadata/include/otbImageMetadataInterfaceFactory.h +++ b/Modules/Core/Metadata/include/otbImageMetadataInterfaceFactory.h @@ -23,6 +23,8 @@ #include "itkObject.h" #include "otbImageMetadataInterfaceBase.h" +#include "otbMetadataSupplierInterface.h" +#include "otbImageMetadata.h" namespace otb { @@ -56,6 +58,12 @@ public: /** Create the appropriate ImageMetadataInterfaceFactory depending on the particulars of the file. */ static ImageMetadataInterfaceBasePointerType CreateIMI(const MetaDataDictionaryType& dict); + // TODO: the input ImageMetadata is here to inject some metadatas parsed by + // GDALImageIO and initialize the correct number of bands. It should not be + // needed once we have a merge() function, + /** Create the appropriate IMI based on a MetadataSupplier */ + static ImageMetadataInterfaceBasePointerType CreateIMI(const ImageMetadata & imd, const MetadataSupplierInterface *mds); + /** Register Built-in factories */ static void RegisterBuiltInFactories(); diff --git a/Modules/Core/Metadata/include/otbMetaDataKey.h b/Modules/Core/Metadata/include/otbMetaDataKey.h index 691f4fc95edd1065d30e4473ae461cbf0dc69d6e..88656b521e166ff8b9ac3ed6eb82c91956f36a69 100644 --- a/Modules/Core/Metadata/include/otbMetaDataKey.h +++ b/Modules/Core/Metadata/include/otbMetaDataKey.h @@ -23,10 +23,16 @@ #include <string> #include <vector> +#include <cstdio> + +#include <boost/bimap.hpp> +#include <boost/algorithm/string.hpp> #include "itkDataObject.h" #include "itkVariableLengthVector.h" #include "OTBMetadataExport.h" +#include "otbStringUtils.h" +#include "otbJoinContainer.h" namespace otb { @@ -82,7 +88,7 @@ enum KeyType TSTRING, TENTIER, TDOUBLE, - TOTB_GCP, + TGCP, TVECTOR, TOSSIMKEYWORDLIST, TVECTORDATAKEYWORDLIST, @@ -117,44 +123,204 @@ typedef std::vector<bool> BoolVectorType; typedef itk::VariableLengthVector<double> VariableLengthVectorType; } -/** \class OTB_GCP - * - * \brief This OTB_GCP class is used to manage the GCP parameters - * in OTB. - * - * - * \ingroup OTBMetadata - */ -class OTBMetadata_EXPORT OTB_GCP +/** Metadata as double*/ +enum class MDNum +{ +// generic + TileHintX, + TileHintY, + DataType, + NoData, + OrbitNumber, + NumberOfLines, + NumberOfColumns, + AverageSceneHeight, +// optical section + PhysicalGain, + PhysicalBias, + SolarIrradiance, + SunElevation, + SunAzimuth, + SatElevation, + SatAzimuth, + FirstWavelength, + LastWavelength, + SpectralStep, + SpectralMin, + SpectralMax, +// SAR section + CalScale, + PRF, + RSF, + RadarFrequency, + CenterIncidenceAngle, + RescalingFactor, + AntennaPatternNewGainPolyDegX, + AntennaPatternNewGainPolyDegY, + AntennaPatternOldGainPolyDegX, + AntennaPatternOldGainPolyDegY, + IncidenceAnglePolyDegX, + IncidenceAnglePolyDegY, + RangeSpreadLossPolyDegX, + RangeSpreadLossPolyDegY, + NoisePolyDegX, + NoisePolyDegY, + LineSpacing, + PixelSpacing, + END +}; + +/** Metadata as std::string */ +enum class MDStr +{ + SensorID, + Mission, + Instrument, + BandName, + ProductType, + GeometricLevel, + RadiometricLevel, + Polarization, + Mode, + Swath, + OrbitDirection, + BeamMode, + BeamSwath, + // ... + END +}; + +/** Metadata as LUT 1D */ +enum class MDL1D +{ + SpectralSensitivity, + END +}; + +/** Metadata as LUT 2D */ +enum class MDL2D +{ + // Sar calibration lut ... + END +}; + +/** Metadata as Time */ +enum class MDTime +{ + AcquisitionDate, + ProductionDate, + AcquisitionStartTime, + AcquisitionStopTime, + END +}; + +enum class MDGeom +{ + ProjectionWKT, // -> string + ProjectionEPSG, // -> int + ProjectionProj, // -> string + RPC, // -> RPCParam + SAR, // -> SARParam + SensorGeometry, // -> boost::any + GCP, // -> GCPParam + Adjustment, // -> ? + END +}; + +namespace MetaData { -public: - /** Unique identifier, often numeric */ - std::string m_Id; - /** Informational message or "" */ - std::string m_Info; +struct OTBMetadata_EXPORT Time : tm +{ + double frac_sec; + + friend OTBMetadata_EXPORT std::ostream& operator<<(std::ostream& os, const Time& val); - /** Pixel (x) location of GCP on raster */ - double m_GCPCol; + friend OTBMetadata_EXPORT std::istream& operator>>(std::istream& is, Time& val); - /** Line (y) location of GCP on raster */ - double m_GCPRow; +}; - /** X position of GCP in georeferenced space */ - double m_GCPX; +struct LUTAxis +{ + /** number of measurements on this axis */ + int Size; + /** start value on the axis */ + double Origin; + /** spacing between measurements (if regular sampling) */ + double Spacing; + /** list of measurements (if irregular sampling) */ + std::vector<double> Values; + /** Export to JSON */ + std::string ToJSON(bool multiline=false) const; +}; - /** Y position of GCP in georeferenced space */ - double m_GCPY; +template <unsigned int VDim> class LUT +{ +public: + LUTAxis Axis[VDim]; + + std::vector<double> Array; - /** Elevation of GCP, or zero if not known */ - double m_GCPZ; + std::string OTBMetadata_EXPORT ToJSON(bool multiline=false) const; - OTB_GCP(); - ~OTB_GCP(); + std::string OTBMetadata_EXPORT ToString() const; - void Print(std::ostream& os) const; + void OTBMetadata_EXPORT FromString(std::string); }; +typedef LUT<1> LUT1D; + +typedef LUT<2> LUT2D; + +template <typename T> +inline boost::bimap<T, std::string> bimapGenerator(std::map<T, std::string> inMap) +{ + boost::bimap<T, std::string> bm; + for (const auto& kv : inMap) + bm.insert({kv.first, kv.second}); + //bm.insert(typename boost::bimap<T, std::string>::value_type(kv.first, kv.second)); + return bm; +} + +typedef boost::bimap<MDGeom, std::string> MDGeomBmType; +extern OTBMetadata_EXPORT MDGeomBmType MDGeomNames; + +typedef boost::bimap<MDNum, std::string> MDNumBmType; +extern OTBMetadata_EXPORT MDNumBmType MDNumNames; + +typedef boost::bimap<MDStr, std::string> MDStrBmType; +extern OTBMetadata_EXPORT MDStrBmType MDStrNames; + +typedef boost::bimap<MDTime, std::string> MDTimeBmType; +extern OTBMetadata_EXPORT MDTimeBmType MDTimeNames; + +typedef boost::bimap<MDL1D, std::string> MDL1DBmType; +extern OTBMetadata_EXPORT MDL1DBmType MDL1DNames; + +typedef boost::bimap<MDL2D, std::string> MDL2DBmType; +extern OTBMetadata_EXPORT MDL2DBmType MDL2DNames; + +} // end namespace MetaData + +namespace Utils +{ +template <> +inline MetaData::Time LexicalCast<MetaData::Time,std::string>(std::string const& in, std::string const& kind) +{ + MetaData::Time output; + std::istringstream iss(in); + iss >> output; + if (iss.fail()) + { + std::ostringstream oss; + oss << "Cannot decode '" << in << "' as this is not a valid value for '" << kind << "'"; + throw std::runtime_error(oss.str()); + } + return output; +} + +} // end namespace Utils + } // end namespace otb #endif diff --git a/Modules/Core/Metadata/include/otbMetadataStorageInterface.h b/Modules/Core/Metadata/include/otbMetadataStorageInterface.h new file mode 100644 index 0000000000000000000000000000000000000000..892f0f5b6a6d1f2cdcd7137e384ebde877d337a8 --- /dev/null +++ b/Modules/Core/Metadata/include/otbMetadataStorageInterface.h @@ -0,0 +1,74 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef otbMetadataStorageInterface_h +#define otbMetadataStorageInterface_h + +#include "OTBMetadataExport.h" +#include "itkMacro.h" +#include <vector> +#include <string> +#include <sstream> +#include "otbStringUtils.h" +#include "otbMacro.h" +#include "otbStringUtilities.h" +#include "otbJoinContainer.h" + +namespace otb +{ + +/** \class MetadataStorageInterface + * + * \brief Base class to store metadata information in files/images + * + * \ingroup OTBMetadata + */ +class OTBMetadata_EXPORT MetadataStorageInterface +{ +public: + + /** Set the metadata value corresponding to a given path (meaning of this path + * depends on the specific implementation. Returns NULL when path is not found */ + virtual void SetMetadataValue(const char * path, const char * value, int band=-1) = 0; + + // TODO : check precision settings + void SetAs(const std::string & path, double value, int band=-1); + + void SetAs(const std::string & path, const std::string & value, int band=-1); + + /** Parse a std::vector to a metadata value */ + template < typename T> void SetAsVector(const char *path, std::vector<T> value, const char sep=' ', int band=-1) + { + std::ostringstream oss; + oss << "["; + otb::Join(oss, value, std::string(&sep)); + oss << "]"; + SetMetadataValue(path, oss.str().c_str(), band); + } + template < typename T> void SetAsVector(const std::string& path, std::vector<T> value, const char sep=' ', int band=-1) + { + SetAsVector(path.c_str(), value, sep, band); + } +}; + + +} // end namespace otb + +#endif diff --git a/Modules/Core/Metadata/include/otbMetadataSupplierInterface.h b/Modules/Core/Metadata/include/otbMetadataSupplierInterface.h new file mode 100644 index 0000000000000000000000000000000000000000..b78599207c2daad1dcb35584cf44d0d5f06e9564 --- /dev/null +++ b/Modules/Core/Metadata/include/otbMetadataSupplierInterface.h @@ -0,0 +1,134 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef otbMetadataSupplierInterface_h +#define otbMetadataSupplierInterface_h + +#include "OTBMetadataExport.h" +#include <vector> +#include <string> +#include "otbStringUtils.h" +#include "otbMacro.h" +#include "otbStringUtilities.h" +#include "otbStringUtils.h" + +namespace otb +{ + + +class MissingMetadataException : public itk::ExceptionObject +{ +public: + using itk::ExceptionObject::ExceptionObject; +}; + +/** \class MetadataSupplierInterface + * + * \brief Base class to access metadata information in files/images + * + * \ingroup OTBMetadata + */ +class OTBMetadata_EXPORT MetadataSupplierInterface +{ +public: + virtual std::string GetResourceFile(std::string="") const = 0; + virtual std::vector<std::string> GetResourceFiles() const + { + return std::vector<std::string>{this->GetResourceFile()}; + } + + + /** Get the metadata value corresponding to a given path (meaning of this path + * depends on the specific implementation. Returns empty string when path is not found, + * and hasValue is set to False. + * If band >= 0, the metadata value is looked in the specified band*/ + virtual std::string GetMetadataValue(const std::string path, bool& hasValue, int band=-1) const = 0; + + bool HasValue(std::string path, int band=-1); + + virtual int GetNbBands() const = 0; + + // utility functions + template <typename T> T GetAs(std::string path, int band=-1) const + { + bool hasValue; + std::string ret = GetMetadataValue(path, hasValue, band); + if (!hasValue) + { + otbGenericExceptionMacro(MissingMetadataException,<<"Missing metadata '"<<path<<"'") + } + try + { + return boost::lexical_cast<T>(ret); + } + catch (boost::bad_lexical_cast&) + { + otbGenericExceptionMacro(MissingMetadataException,<<"Bad metadata value for '"<<path<<"', got: "<<ret) + } + } + + /** Parse a metadata value to a std::vector, + * If size>=0, then the final std::vector size is checked and an exception + * is raised if it doesn't match the given size.*/ + template < typename T> std::vector<T> GetAsVector(std::string path, const char sep=' ', int size=-1, int band=-1) const + { + bool hasValue; + std::string ret = GetMetadataValue(path, hasValue, band); + if (!hasValue) + { + otbGenericExceptionMacro(MissingMetadataException,<<"Missing metadata '"<<path<<"'") + } + string_view value(ret); + string_view filt_value = rstrip(lstrip(value,"[ "), "] "); + std::vector<T> output; + typedef part_range<splitter_on_delim> range_type; + const range_type parts = split_on(filt_value, sep); + for (auto const& part : parts) + { + // TODO: check if we can use lexical_cast on a string_view + std::string strPart = to<std::string>(part, "casting string_view to std::string"); + if (strPart.empty()) + { + continue; + } + try + { + output.push_back(boost::lexical_cast<T>(strPart)); + } + catch (boost::bad_lexical_cast&) + { + otbGenericExceptionMacro(MissingMetadataException,<<"Bad metadata vector element in '"<<path<<"', got :"<<part) + } + } + if ((size >= 0) && (output.size() != (size_t)size)) + { + otbGenericExceptionMacro(MissingMetadataException,<<"Bad number of elements in vector '"<<path<<"', expected "<<size<< ", got "<<output.size()) + } + return output; + } + +}; + +// TODO : for complex types ... + +} // end namespace otb + +#endif + diff --git a/Modules/Core/Metadata/include/otbOpticalImageMetadataInterface.h b/Modules/Core/Metadata/include/otbOpticalImageMetadataInterface.h index 545eaa668e695765025d4b38dd9ac24af0edf8f1..1bf2aa461d6c09c0e0f89f2fcd9d1182e8d9b61d 100644 --- a/Modules/Core/Metadata/include/otbOpticalImageMetadataInterface.h +++ b/Modules/Core/Metadata/include/otbOpticalImageMetadataInterface.h @@ -111,6 +111,11 @@ public: * There values a computed by 6S. */ virtual WavelengthSpectralBandVectorType GetSpectralSensitivity() const = 0; + /** Reads into the MetaDataDictionary to find an OSSIM ImageKeywordlist, + * then translate it into ImageMetadata. Handles most optical sensors. + * Returns true if succeed. */ + bool ConvertImageKeywordlistToImageMetadata() override; + protected: OpticalImageMetadataInterface(); ~OpticalImageMetadataInterface() override diff --git a/Modules/Core/Metadata/include/otbPleiadesImageMetadataInterface.h b/Modules/Core/Metadata/include/otbPleiadesImageMetadataInterface.h index 91e8fc7e708ffb49408b11521cb2388d2e9263de..c9c56bd6b40dc7c1a561074a310ef1393392aec6 100644 --- a/Modules/Core/Metadata/include/otbPleiadesImageMetadataInterface.h +++ b/Modules/Core/Metadata/include/otbPleiadesImageMetadataInterface.h @@ -150,6 +150,8 @@ public: * There values a computed by 6S. */ WavelengthSpectralBandVectorType GetSpectralSensitivity() const override; + void Parse(const MetadataSupplierInterface *) override; + protected: PleiadesImageMetadataInterface(); ~PleiadesImageMetadataInterface() override diff --git a/Modules/Core/Metadata/include/otbSARMetadata.h b/Modules/Core/Metadata/include/otbSARMetadata.h new file mode 100644 index 0000000000000000000000000000000000000000..dd4956f7ae487320ce5fe230b2b89c6b34216ccd --- /dev/null +++ b/Modules/Core/Metadata/include/otbSARMetadata.h @@ -0,0 +1,150 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef otbSARMetadata_h +#define otbSARMetadata_h + +#include "OTBMetadataExport.h" +#include "otbMetaDataKey.h" + + +#include <string> +#include <vector> +#include <sstream> + +namespace otb +{ + +/** \struct AzimuthFmRate + * + * \brief This structure is used to manage parameters + * related to the Azimuth Frequency Modulation rate + */ +struct OTBMetadata_EXPORT AzimuthFmRate +{ + /** Zero Doppler azimuth time to which azimuth FM rate parameters apply */ + MetaData::Time azimuthTime; + /** Two way slant range time origin used for azimuth FM rate calculation */ + double t0; + /** Azimuth FM rate coefficients c0 c1 c2 */ + std::vector<double> azimuthFmRatePolynomial; +}; + +/** \struct CalibrationVector + * + * \brief This structure is used to handle calibration look up tables + */ +struct OTBMetadata_EXPORT CalibrationVector +{ + /** Image line at which the calibration vector applies */ + int line; + /** Zero Doppler azimuth time at which calibration vector applies */ + MetaData::Time azimuthTime; + /** Sigma nought calibration vector */ + MetaData::LUT1D sigmaNought; + /* Beta nought calibration vector */ + MetaData::LUT1D betaNought; + /* Gamma calibration vector */ + MetaData::LUT1D gamma; + /* Digital number calibration vector */ + MetaData::LUT1D dn; +}; + +/** \struct DopplerCentroid + * + * \brief This structure is used to handle Doppler centroid estimates + */ +struct OTBMetadata_EXPORT DopplerCentroid +{ + /** Zero Doppler azimuth time of this Doppler centroid estimate */ + MetaData::Time azimuthTime; + /* Two-way slant range time origin for Doppler centroid estimate */ + double t0; + /* Doppler centroid estimated from data */ + std::vector<double> dopCoef; + /* Doppler centroid estimated from orbit */ + std::vector<double> geoDopCoef; +}; + +/** \struct SARNoise + * + * \breif This structure is used to handle Noise look up tables + */ +struct OTBMetadata_EXPORT SARNoise +{ + /** Image line at which the noise vector applies */ + int line; + /** Zero Doppler azimuth time at which noise vector applies */ + MetaData::Time azimuthTime; + /** Noise look up talbe */ + MetaData::LUT1D noiseLut; +}; + +/** \struct Orbit + * + * \breif This structure is used to handle orbit information + */ +struct OTBMetadata_EXPORT Orbit +{ + /** Timestamp at which orbit state vectors apply */ + MetaData::Time time; + /** Position vector */ + double posX; + double posY; + double posZ; + /** Velocity vector */ + double velX; + double velY; + double velZ; +}; + +/** \struct SARParam + * + * \brief SAR sensors parameters + * + * \ingroup OTBMetadata + */ +struct OTBMetadata_EXPORT SARParam +{ + /** Azimuth Frequency Modulation (FM) rate list. + * contains an entry for each azimuth FM rate update made along azimuth. + */ + std::vector<AzimuthFmRate> azimuthFmRates; + + /** Calibration vector list */ + std::vector<CalibrationVector> calibrationVectors; + + MetaData::Time calibrationStartTime; + MetaData::Time calibrationStopTime; + + /** Doppler centroid estimates */ + std::vector<DopplerCentroid> dopplerCentroids; + + /** Noise look up tables */ + std::vector<SARNoise> noiseVector; + + /** List of orbit information */ + std::vector<Orbit> orbits; +}; + +} // end namespace otb + +#endif + diff --git a/Modules/Core/Metadata/include/otbSarImageMetadataInterface.h b/Modules/Core/Metadata/include/otbSarImageMetadataInterface.h index b68966c1e9f779f3ccc14c5c10da2b932bb96561..dac36600666c6e521b89cffc4ba856d49d9c72aa 100644 --- a/Modules/Core/Metadata/include/otbSarImageMetadataInterface.h +++ b/Modules/Core/Metadata/include/otbSarImageMetadataInterface.h @@ -108,6 +108,11 @@ public: return nothing; } + /** Reads into the MetaDataDictionary to find an OSSIM ImageKeywordlist, + * then translate it into ImageMetadata. Handles most SAR sensors. + * Returns true if succeed. */ + bool ConvertImageKeywordlistToImageMetadata() override; + protected: SarImageMetadataInterface(); ~SarImageMetadataInterface() override diff --git a/Modules/Core/Metadata/include/otbSentinel1ImageMetadataInterface.h b/Modules/Core/Metadata/include/otbSentinel1ImageMetadataInterface.h index bb27d191039d64494ba069e648188d52f82c251b..9245a3e214aea8d285cf585d47db580ba275342f 100644 --- a/Modules/Core/Metadata/include/otbSentinel1ImageMetadataInterface.h +++ b/Modules/Core/Metadata/include/otbSentinel1ImageMetadataInterface.h @@ -22,7 +22,7 @@ #define otbSentinel1ImageMetadataInterface_h #include "otbSarImageMetadataInterface.h" - +#include "otbXMLMetadataSupplier.h" namespace otb { @@ -99,6 +99,8 @@ public: /*get lookup data for calculating backscatter */ void CreateCalibrationLookupData(const short type) override; + void Parse(const MetadataSupplierInterface *) override; + protected: /* class ctor */ Sentinel1ImageMetadataInterface(); @@ -108,6 +110,24 @@ protected: { } + /* Fetch the AzimuthFmRate metadata */ + std::vector<AzimuthFmRate> GetAzimuthFmRate(const XMLMetadataSupplier&) const; + + /* Fetch the DopplerCentroid metadata */ + std::vector<DopplerCentroid> GetDopplerCentroid(const XMLMetadataSupplier&) const; + + /* Fetch the Orbits metadata */ + std::vector<Orbit> GetOrbits(const XMLMetadataSupplier&) const; + + /* Fetch the Calibration metadata */ + std::vector<CalibrationVector> GetCalibrationVector(const XMLMetadataSupplier&) const; + + /* Fetch the noise LUTs */ + std::vector<SARNoise> GetNoiseVector(const XMLMetadataSupplier&) const; + + /* Compute the mean terrain elevation */ + double getBandTerrainHeight(const XMLMetadataSupplier&) const; + private: Sentinel1ImageMetadataInterface(const Self&) = delete; void operator=(const Self&) = delete; diff --git a/Modules/Core/Metadata/include/otbXMLMetadataSupplier.h b/Modules/Core/Metadata/include/otbXMLMetadataSupplier.h new file mode 100644 index 0000000000000000000000000000000000000000..b7969b3300d5ba2a02c9c83d253ab295495a27ab --- /dev/null +++ b/Modules/Core/Metadata/include/otbXMLMetadataSupplier.h @@ -0,0 +1,159 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef otbXMLMetadataSupplier_h +#define otbXMLMetadataSupplier_h + +#include "cpl_minixml.h" +#include "cpl_string.h" + +#include "OTBMetadataExport.h" +#include "otbMetadataSupplierInterface.h" +#include "otbStringUtilities.h" + + +namespace otb +{ + +/** \class XMLMetadataSupplier + * + * \brief Class to access metadata information in a XML file + * + * \ingroup OTBMetadata + */ +class OTBMetadata_EXPORT XMLMetadataSupplier + : public MetadataSupplierInterface +{ +public: + XMLMetadataSupplier(const std::string &); + XMLMetadataSupplier(const XMLMetadataSupplier &) = delete; + XMLMetadataSupplier& operator=(const XMLMetadataSupplier&) = delete; + + /** + * @brief Get the metadata value corresponding to a given path + * + * @param path The path to look for + * @param hasValue True if path is found + * @param band not used + * @return The value corresponding to path. Empty string if not found. + */ + std::string GetMetadataValue(const std::string path, bool& hasValue, int band=1) const override; + + /** + * @brief Get the first metadata value corresponding to a given path + * + * @param path The path to look for + * @param hasValue True if path is found + * @return The value corresponding to path. Empty string if not found. + */ + std::string GetFirstMetadataValue(const std::string paths, bool& hasValue) const; + + /** + * @brief Get the metadata value corresponding to a given path + * converted to the given type + * + * This method can look for a value in a list, using the _# jocker. For exemple, + * looking for "value" in a dictionary like this : + * foo_1.bar=42 + * foo_1.doo=99 + * foo_2.value=8 + * One can specify this path : foo_#.value, the method will then return 8. + * + * @param path The path to look for. + * @return The value corresponding to path. + * @raises otb::Error if path not found + */ + template <typename T> T GetFirstAs(const std::string &path) const + { + bool hasValue; + std::string ret = GetFirstMetadataValue(path, hasValue); + if (!hasValue) + { + otbGenericExceptionMacro(MissingMetadataException,<<"Missing metadata '"<<path<<"'") + } + try + { + return boost::lexical_cast<T>(ret); + } + catch (boost::bad_lexical_cast&) + { + otbGenericExceptionMacro(MissingMetadataException,<<"Bad metadata value for '"<<path<<"', got: "<<ret) + } + } + + std::string GetResourceFile(std::string="") const override; + + int GetNbBands() const override; + + /** + * @brief Writes the content of the XML file into a string + * + * @return A std::string + */ + std::string PrintSelf(); + +protected: + /** + * @brief ReadXMLToList Transform xml to list of NULL terminated name=value + * strings + * @param psNode A xml node to process + * @param papszList A list to fill with name=value strings + * @param pszName A name of parent node. For root xml node should be empty. + * If name is not empty, the sibling nodes will not proceed + * @return An input list filled with values + * + * This method originates from a work by GDAL in the class GDALMDReaderBase. + */ + virtual char** ReadXMLToList(CPLXMLNode* psNode, char** papszList, + const char* pszName = ""); + + /** + * @brief In a StringList of “Name=Value†pairs, look for the values + * associated with a name containing the specified string + * + * @param papszStrList A StringList that will be searched + * @param pszName A string that will be looked for in the keys + * @return A StringList containing only the pairs from papszStrList whose key + * contain pszName + */ + std::vector<std::string> FetchPartialNameValueMultiple(char** papszStrList, const char *pszName) const; + + /** + * @brief In a StringList of “Name=Value†pairs, look for the values + * associated with a name containing the specified string + * + * @param StringVector A std::vector of std::string that will be searched + * @param Name A std::string that will be looked for in the keys + * @return A std::vector of std::string containing only the pairs from StringVector whose key + * contain Name + */ + std::vector<std::string> FetchPartialNameValueMultiple(const std::vector<std::string> &StringVector, + const std::string &Name) const; + +private: + /** List of resource files */ + std::string m_FileName; + /** Dictionary containing the metadata */ + char** m_MetadataDic = nullptr; +}; + +} // end namespace otb + +#endif diff --git a/Modules/Core/Metadata/src/CMakeLists.txt b/Modules/Core/Metadata/src/CMakeLists.txt index 59da7b2f428df97d143bcaca1d0bd140c8da3ea9..78cedb238a66a4cab7ac91913b5b7bf178c62178 100644 --- a/Modules/Core/Metadata/src/CMakeLists.txt +++ b/Modules/Core/Metadata/src/CMakeLists.txt @@ -68,6 +68,14 @@ set(OTBMetadata_SRC otbNoDataHelper.cxx otbFilterFunctionValues.cxx otbMetaDataKey.cxx + + otbImageMetadata.cxx + otbGeometryMetadata.cxx + + otbXMLMetadataSupplier.cxx + + otbMetadataStorageInterface.cxx + otbMetadataSupplierInterface.cxx ) add_library(OTBMetadata ${OTBMetadata_SRC}) diff --git a/Modules/Core/Metadata/src/otbGeometryMetadata.cxx b/Modules/Core/Metadata/src/otbGeometryMetadata.cxx new file mode 100644 index 0000000000000000000000000000000000000000..0dadc355c40c57bf0575a36db318f76348ca54b9 --- /dev/null +++ b/Modules/Core/Metadata/src/otbGeometryMetadata.cxx @@ -0,0 +1,111 @@ +/* + * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "otbGeometryMetadata.h" + +#include <iostream> + +namespace otb +{ + +GCP::GCP(std::string id, std::string info, double col, double row, double px, double py, double pz) + : m_Id(move(id)), m_Info(move(info)), m_GCPCol(col), m_GCPRow(row), m_GCPX(px), m_GCPY(py), m_GCPZ(pz) +{ +} + +void GCP::Print(std::ostream& os) const +{ + os << " GCP Id = " << this->m_Id << std::endl; + os << " GCP Info = " << this->m_Info << std::endl; + os << " GCP (Row, Col) = (" << this->m_GCPRow << "," << this->m_GCPCol << ")" << std::endl; + os << " GCP (X, Y, Z) = (" << this->m_GCPX << "," << this->m_GCPY << "," << this->m_GCPZ << ")" << std::endl; +} + +std::string GCP::ToJSON(bool multiline) const +{ + std::ostringstream oss; + std::string sep; + if (multiline) + { + sep = "\n"; + } + oss << "{" + << "\"GCP_Id\": \"" << this->m_Id << "\", " << sep + << "\"GCP_Info\": \"" << this->m_Info << "\", " << sep + << "\"GCP_Row\": \"" << this->m_GCPRow << "\", " << sep + << "\"GCP_Col\": \"" << this->m_GCPCol << "\", " << sep + << "\"GCP_X\": \"" << this->m_GCPX << "\", " << sep + << "\"GCP_Y\": \"" << this->m_GCPY << "\", " << sep + << "\"GCP_Z\": \"" << this->m_GCPZ << "\", " << sep + << "}"; + return oss.str(); +} + +namespace Projection +{ +std::string GCPParam::ToJSON(bool multiline) const +{ + std::ostringstream oss; + std::string sep; + if (multiline) + { + sep = "\n"; + } + oss << "{" + << "\"Projection\": \"" << GCPProjection << "\", " << sep + << "["; + for (const auto& gcp : GCPs) + oss << gcp.ToJSON() << ", " << sep; + oss << "]}"; + return oss.str(); +} + +std::string RPCParam::ToJSON(bool multiline) const +{ + std::ostringstream oss; + std::string sep; + if (multiline) + { + sep = "\n"; + } + oss << "{" + << "\"LineOffset\": \"" << LineOffset << "\", " << sep + << "\"SampleOffset\": \"" << SampleOffset << "\", " << sep + << "\"LatOffset\": \"" << LatOffset << "\", " << sep + << "\"LonOffset\": \"" << LonOffset << "\", " << sep + << "\"HeightOffset\": \"" << HeightOffset << "\", " << sep + + << "\"LineScale\": \"" << LineScale << "\", " << sep + << "\"SampleScale\": \"" << SampleScale << "\", " << sep + << "\"LatScale\": \"" << LatScale << "\", " << sep + << "\"LonScale\": \"" << LonScale << "\", " << sep + << "\"HeightScale\": \"" << HeightScale << "\", " << sep + + << "\"LineNum\": " << doubleArrayToString(LineNum) << ", " << sep + << "\"LineDen\": " << doubleArrayToString(LineDen) << ", " << sep + << "\"SampleNum\": " << doubleArrayToString(SampleNum) << ", " << sep + << "\"SampleDen\": " << doubleArrayToString(SampleDen) << ", " << sep + + << "}"; + return oss.str(); +} + +} // end namespace Projection +} // end namespace otb diff --git a/Modules/Core/Metadata/src/otbImageMetadata.cxx b/Modules/Core/Metadata/src/otbImageMetadata.cxx new file mode 100644 index 0000000000000000000000000000000000000000..1eda06176a356d20f7a1754543e3febdec63500d --- /dev/null +++ b/Modules/Core/Metadata/src/otbImageMetadata.cxx @@ -0,0 +1,656 @@ +/* + * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "otbImageMetadata.h" +namespace otb +{ +// ---------------------- [ImageMetadataBase] ------------------------------ + +ImageMetadataBase::ImageMetadataBase() +{ +} + +ImageMetadataBase::ImageMetadataBase(DictType<MDGeom, boost::any> geometryKeys, + DictType<MDNum, double> numericKeys, + DictType<MDStr, std::string> stringKeys, + DictType<MDL1D, MetaData::LUT1D> lut1DKeys, + DictType<MDL2D, MetaData::LUT2D> lut2DKeys, + DictType<MDTime, MetaData::Time> timeKeys, + DictType<std::string, std::string> extraKeys) + : GeometryKeys(std::move(geometryKeys)), + NumericKeys(std::move(numericKeys)), + StringKeys(std::move(stringKeys)), + LUT1DKeys(std::move(lut1DKeys)), + LUT2DKeys(std::move(lut2DKeys)), + TimeKeys(std::move(timeKeys)), + ExtraKeys(std::move(extraKeys)) +{} + +bool ImageMetadataBase::HasSensorGeometry() const +{ + return Has(MDGeom::RPC) || Has(MDGeom::SAR) || Has(MDGeom::SensorGeometry); +} + +bool ImageMetadataBase::HasProjectedGeometry() const +{ + return Has(MDGeom::ProjectionWKT) || Has(MDGeom::ProjectionEPSG) || Has(MDGeom::ProjectionProj); +} + +size_t ImageMetadataBase::RemoveSensorGeometry() +{ + return Remove(MDGeom::RPC) + Remove(MDGeom::SAR) + Remove(MDGeom::SensorGeometry); +} + +size_t ImageMetadataBase::RemoveProjectedGeometry() +{ + return Remove(MDGeom::ProjectionWKT) + Remove(MDGeom::ProjectionEPSG) + Remove(MDGeom::ProjectionProj); +} + +const Projection::GCPParam & ImageMetadataBase::GetGCPParam() const +{ + return boost::any_cast<const Projection::GCPParam &>(GeometryKeys.at(MDGeom::GCP)); +} + +std::string ImageMetadataBase::GetProjectionWKT() const +{ + auto projWKT = GeometryKeys.find(MDGeom::ProjectionWKT); + if (projWKT != GeometryKeys.end()) + { + return boost::any_cast<std::string>(projWKT->second); + } + else + { + return ""; + } +} + +// -------------------- Geom utility function ---------------------------- +const boost::any & ImageMetadataBase::operator[](const MDGeom& key) const +{ + return GeometryKeys.at(key); +} + +void ImageMetadataBase::Add(const MDGeom& key, const boost::any &value) +{ + GeometryKeys[key] = value; +} + +size_t ImageMetadataBase::Remove(const MDGeom& key) +{ + return GeometryKeys.erase(key); +} + +bool ImageMetadataBase::Has(const MDGeom& key) const +{ + return (GeometryKeys.find(key) != GeometryKeys.end()); +} + +// -------------------- Double utility function ---------------------------- + +const double & ImageMetadataBase::operator[](const MDNum& key) const +{ + return NumericKeys.at(key); +} + +void ImageMetadataBase::Add(const MDNum& key, const double &value) +{ + NumericKeys[key] = value; +} + +size_t ImageMetadataBase::Remove(const MDNum& key) +{ + return NumericKeys.erase(key); +} + +bool ImageMetadataBase::Has(const MDNum& key) const +{ + return (NumericKeys.find(key) != NumericKeys.end()); +} + +// -------------------- String utility function ---------------------------- + +const std::string & ImageMetadataBase::operator[](const MDStr& key) const +{ + return StringKeys.at(key); +} + +void ImageMetadataBase::Add(const MDStr& key, const std::string &value) +{ + StringKeys[key] = value; +} + +size_t ImageMetadataBase::Remove(const MDStr& key) +{ + return StringKeys.erase(key); +} + +bool ImageMetadataBase::Has(const MDStr& key) const +{ + return (StringKeys.find(key) != StringKeys.end()); +} + +// -------------------- LUT1D utility function ---------------------------- + +const MetaData::LUT1D & ImageMetadataBase::operator[](const MDL1D& key) const +{ + return LUT1DKeys.at(key); +} + +void ImageMetadataBase::Add(const MDL1D& key, const MetaData::LUT1D &value) +{ + LUT1DKeys[key] = value; +} + +size_t ImageMetadataBase::Remove(const MDL1D& key) +{ + return LUT1DKeys.erase(key); +} + +bool ImageMetadataBase::Has(const MDL1D& key) const +{ + return (LUT1DKeys.find(key) != LUT1DKeys.end()); +} + +// -------------------- 2D LUT utility function ---------------------------- + +const MetaData::LUT2D & ImageMetadataBase::operator[](const MDL2D& key) const +{ + return LUT2DKeys.at(key); +} + +void ImageMetadataBase::Add(const MDL2D& key, const MetaData::LUT2D &value) +{ + LUT2DKeys[key] = value; +} + +size_t ImageMetadataBase::Remove(const MDL2D& key) +{ + return LUT2DKeys.erase(key); +} + +bool ImageMetadataBase::Has(const MDL2D& key) const +{ + return (LUT2DKeys.find(key) != LUT2DKeys.end()); +} + +// -------------------- Time utility function ---------------------------- + +const MetaData::Time & ImageMetadataBase::operator[](const MDTime& key) const +{ + return TimeKeys.at(key); +} + +void ImageMetadataBase::Add(const MDTime& key, const MetaData::Time &value) +{ + TimeKeys[key] = value; +} + +size_t ImageMetadataBase::Remove(const MDTime& key) +{ + return TimeKeys.erase(key); +} + +bool ImageMetadataBase::Has(const MDTime& key) const +{ + return (TimeKeys.find(key) != TimeKeys.end()); +} + +// -------------------- Extra keys utility function -------------------------- + +const std::string & ImageMetadataBase::operator[](const std::string & key) const +{ + return ExtraKeys.at(key); +} + +void ImageMetadataBase::Add(const std::string& key, const std::string &value) +{ + ExtraKeys[key] = value; +} + +size_t ImageMetadataBase::Remove(const std::string& key) +{ + return ExtraKeys.erase(key); +} + +bool ImageMetadataBase::Has(const std::string& key) const +{ + return (ExtraKeys.find(key) != ExtraKeys.end()); +} + +void ImageMetadataBase::ToKeywordlist(Keywordlist& kwl) const +{ + kwl.clear(); + std::ostringstream oss; + + // Converting the GeomKeys + for (const auto& kv : GeometryKeys) + { + oss.str(""); + if (kv.first == MDGeom::RPC) + { + // To be completed by ImageIO + oss << std::string("<RPCParam>"); + } + else if (kv.first == MDGeom::ProjectionEPSG) + { + oss << std::to_string(boost::any_cast<int>(kv.second)); + } + else if (kv.first == MDGeom::GCP) + { + // To be completed by ImageIO + oss << std::string("<GCPParam>"); + } + else if (kv.first == MDGeom::SensorGeometry) + { + // MDGeom::SensorGeometry should be exported as "<typeinfo>" where typeinfo is boost::any::type().name() + oss << kv.second.type().name(); + } + else if (kv.first == MDGeom::SAR) + { + // To be completed by ImageIO + oss << std::string("<SARParam>"); + } + // TODO : MDGeom::Adjustment + else + { + oss << boost::any_cast<std::string>(kv.second); + } + kwl.emplace(MetaData::MDGeomNames.left.at(kv.first), oss.str()); + } + // Converting the StringKeys + for (const auto& kv : StringKeys) + { + kwl.emplace(MetaData::MDStrNames.left.at(kv.first), kv.second); + } + // Converting the NumericKeys + for (const auto& kv : NumericKeys) + { + oss.str(""); + oss << kv.second; + kwl.emplace(MetaData::MDNumNames.left.at(kv.first), oss.str()); + } + // Converting the LUT1DKeys + for (const auto& kv : LUT1DKeys) + { + oss.str(""); + oss << kv.second.ToString(); + kwl.emplace(MetaData::MDL1DNames.left.at(kv.first), oss.str()); + } + // Converting the LUT2DKeys + for (const auto& kv : LUT2DKeys) + { + oss.str(""); + oss << kv.second.ToString(); + kwl.emplace(MetaData::MDL2DNames.left.at(kv.first), oss.str()); + } + // Converting the TimeKeys + for (const auto& kv : TimeKeys) + { + oss.str(""); + oss << kv.second; + kwl.emplace(MetaData::MDTimeNames.left.at(kv.first), oss.str()); + } + // Converting the ExtraKeys + std::string prefix("Extra."); + for (const auto& kv : ExtraKeys) + { + kwl.emplace(prefix + kv.first, kv.second); + } +} + +std::string ImageMetadataBase::ToJSON(bool multiline) const +{ + Keywordlist kwl; + ToKeywordlist(kwl); + std::ostringstream oss; + std::string sep; + if (multiline) + { + sep = "\n"; + } + oss << "{"; + for (const auto& kv : kwl) + { + oss << "\""<< kv.first << "\": \"" << kv.second << "\"," << sep; + } + oss << "}"; + return oss.str(); +} + +bool ImageMetadataBase::FromKeywordlist(const Keywordlist& kwl) +{ + // Return value + bool all_parsed = true; + // search iterators + for (const auto& kv : kwl) + { + // Converting the GeomKeys + auto geomKey = MetaData::MDGeomNames.right.find(kv.first); + if (geomKey != MetaData::MDGeomNames.right.end()) + { + if (geomKey->second == MDGeom::ProjectionEPSG) + { + this->Add(geomKey->second, Utils::LexicalCast<int>(kv.second.c_str(), "Keywordlist.second.c_str()")); + } + // TODO : MDGeom::SAR + // TODO : MDGeom::Adjustment + else if (geomKey->second == MDGeom::ProjectionWKT ||geomKey->second == MDGeom:: ProjectionProj) + { + this->Add(geomKey->second, kv.second); + } + // skip MDGeom::SensorGeometry, MDGeom::RPC and MDGeom::GCP + continue; + } + // Converting the StringKeys + auto strKey = MetaData::MDStrNames.right.find(kv.first); + if (strKey != MetaData::MDStrNames.right.end()) + { + this->Add(strKey->second, kv.second); + continue; + } + // Converting the NumericKeys + auto numKey = MetaData::MDNumNames.right.find(kv.first); + if (numKey != MetaData::MDNumNames.right.end()) + { + this->Add(numKey->second, Utils::LexicalCast<double>(kv.second.c_str(), "Keywordlist.second.c_str()")); + continue; + } + // Converting the LUT1DKeys + auto lut1dKey = MetaData::MDL1DNames.right.find(kv.first); + if (lut1dKey != MetaData::MDL1DNames.right.end()) + { + MetaData::LUT1D lut; + lut.FromString(kv.second); + this->Add(lut1dKey->second, lut); + continue; + } + // Converting the LUT2DKeys + auto lut2dKey = MetaData::MDL2DNames.right.find(kv.first); + if (lut2dKey != MetaData::MDL2DNames.right.end()) + { + MetaData::LUT2D lut; + lut.FromString(kv.second); + this->Add(lut2dKey->second, lut); + continue; + } + // Converting the TimeKeys + auto timeKey = MetaData::MDTimeNames.right.find(kv.first); + if (timeKey != MetaData::MDTimeNames.right.end()) + { + MetaData::Time time; + std::istringstream (kv.second) >> time; + this->Add(timeKey->second, time); + continue; + } + // Converting the ExtraKeys + std::string prefix("Extra."); + if (kv.first.compare(0, prefix.size(), prefix) == 0) + { + this->Add(kv.first.substr(prefix.size()), kv.second); + continue; + } + otbLogMacro(Warning, << "The metadata named '" << kv.first << "' with value '" << kv.second << "' was not parsed.") + all_parsed = false; + } + return all_parsed; +} + + +/** concatenate with an other ImageMetadata */ +void ImageMetadataBase::Fuse(const ImageMetadataBase& imd) +{ + // Copy the keys + this->GeometryKeys.insert(imd.GeometryKeys.begin(), imd.GeometryKeys.end()); + this->NumericKeys.insert(imd.NumericKeys.begin(), imd.NumericKeys.end()); + this->StringKeys.insert(imd.StringKeys.begin(), imd.StringKeys.end()); + this->LUT1DKeys.insert(imd.LUT1DKeys.begin(), imd.LUT1DKeys.end()); + this->LUT2DKeys.insert(imd.LUT2DKeys.begin(), imd.LUT2DKeys.end()); + this->TimeKeys.insert(imd.TimeKeys.begin(), imd.TimeKeys.end()); + this->ExtraKeys.insert(imd.ExtraKeys.begin(), imd.ExtraKeys.end()); +} + +// ----------------------- [ImageMetadata] ------------------------------ + +ImageMetadata::ImageMetadata() +{ +} + +ImageMetadata::ImageMetadata(DictType<MDGeom, boost::any> geometryKeys, + DictType<MDNum, double> numericKeys, + DictType<MDStr, std::string> stringKeys, + DictType<MDL1D, MetaData::LUT1D> lut1DKeys, + DictType<MDL2D, MetaData::LUT2D> lut2DKeys, + DictType<MDTime, MetaData::Time> timeKeys, + DictType<std::string, std::string> extraKeys, + ImageMetadataBandsType bands) + : ImageMetadataBase(geometryKeys, numericKeys, stringKeys, lut1DKeys, lut2DKeys, timeKeys, extraKeys), + Bands(std::move(bands)) +{} + +ImageMetadata ImageMetadata::slice(int start, int end) const +{ + assert(start <= end); + + auto first = this->Bands.cbegin() + start; + auto last = this->Bands.cbegin() + end + 1; + ImageMetadata imd(this->GeometryKeys, this->NumericKeys, this->StringKeys, this->LUT1DKeys, + this->LUT2DKeys, this->TimeKeys, this->ExtraKeys, ImageMetadataBandsType(first, last)); + return imd; +} + +/** concatenate with an other ImageMetadata */ +void ImageMetadata::append(const ImageMetadata& imd) +{ + ImageMetadataBase::Fuse(imd); + + // Copy the bands + this->Bands.insert(this->Bands.end(), imd.Bands.begin(), imd.Bands.end()); +} + +void ImageMetadata::Merge(const ImageMetadata& imd) +{ + ImageMetadataBase::Fuse(imd); + + for (unsigned int i = 0; i < std::min(Bands.size(), imd.Bands.size()); i++) + { + Bands[i].Fuse(imd.Bands[i]); + } +} +/** if all bands share the same value of a key, put it at top level */ +void ImageMetadata::compact() +{ + if (this->Bands.size() < 2) + return; + bool compactVal; + // TODO Compact the GeometryKeys when comparisons exists + // Compact NumericKeys + auto numKeys = this->Bands.front().NumericKeys; + for (const auto& kv : numKeys) + { + compactVal = true; + auto bandIt = this->Bands.cbegin(); + ++bandIt; + for ( ; bandIt != this->Bands.cend() ; ++bandIt) + { + auto otherKey = bandIt->NumericKeys.find(kv.first); + if ((otherKey == bandIt->NumericKeys.end()) + || !itk::Math::AlmostEquals(otherKey->second, kv.second)) + { + compactVal = false; + break; + } + } + if (compactVal) + { + this->Add(kv.first, kv.second); + for (auto& band : this->Bands) + { + band.NumericKeys.erase(kv.first); + } + } + } + // Compact StringKeys + auto strKeys = this->Bands.front().StringKeys; + for (const auto& kv : strKeys) + { + compactVal = true; + auto bandIt = this->Bands.cbegin(); + ++bandIt; + for ( ; bandIt != this->Bands.cend() ; ++bandIt) + { + auto otherKey = bandIt->StringKeys.find(kv.first); + if ((otherKey == bandIt->StringKeys.end()) + || !(otherKey->second == kv.second)) + { + compactVal = false; + break; + } + } + if (compactVal) + { + this->Add(kv.first, kv.second); + for (auto& band : this->Bands) + { + band.StringKeys.erase(kv.first); + } + } + } + // TODO Compact LUT1DKeys when comparisons exists + // TODO Compact LUT2DKeys when comparisons exists + // Compact TimeKeys + auto timeKeys = this->Bands.front().TimeKeys; + for (const auto& kv : timeKeys) + { + compactVal = true; + auto bandIt = this->Bands.cbegin(); + ++bandIt; + for ( ; bandIt != this->Bands.cend() ; ++bandIt) + { + auto otherKey = bandIt->TimeKeys.find(kv.first); + if ((otherKey == bandIt->TimeKeys.end()) + || !itk::Math::AlmostEquals(otherKey->second.frac_sec, kv.second.frac_sec)) + { + compactVal = false; + break; + } + } + if (compactVal) + { + this->Add(kv.first, kv.second); + for (auto& band : this->Bands) + { + band.TimeKeys.erase(kv.first); + } + } + } + // Compact ExtraKeys + auto extraKeys = this->Bands.front().ExtraKeys; + for (const auto& kv : extraKeys) + { + compactVal = true; + auto bandIt = this->Bands.cbegin(); + ++bandIt; + for ( ; bandIt != this->Bands.cend() ; ++bandIt) + { + auto otherKey = bandIt->ExtraKeys.find(kv.first); + if ((otherKey == bandIt->ExtraKeys.end()) + || !(otherKey->second == kv.second)) + { + compactVal = false; + break; + } + } + if (compactVal) + { + this->Add(kv.first, kv.second); + for (auto& band : this->Bands) + { + band.ExtraKeys.erase(kv.first); + } + } + } +} + +void ImageMetadata::AppendToKeywordlists(KeywordlistVector& kwlVect) const +{ + Keywordlist kwl; + this->ToKeywordlist(kwl); + kwlVect.push_back(kwl); + this->AppendToBandKeywordlists(kwlVect); +} + +void ImageMetadata::AppendToBandKeywordlists(KeywordlistVector& kwlVect) const +{ + Keywordlist kwl; + for (const auto& band: this->Bands) + { + band.ToKeywordlist(kwl); + kwlVect.push_back(kwl); + } +} + +bool ImageMetadata::FromKeywordlists(const KeywordlistVector& kwlVect) +{ + bool all_parsed = true; + auto kwlIt = kwlVect.cbegin(); + all_parsed = this->FromKeywordlist(*kwlIt) && all_parsed; + ++kwlIt; + for ( ; kwlIt != kwlVect.cend() ; ++kwlIt) + { + ImageMetadataBase imb; + all_parsed = imb.FromKeywordlist(*kwlIt) && all_parsed; + this->Bands.push_back(imb); + } + return all_parsed; +} + +void ImageMetadata::Add(const MDNum& key, const MetaDataKey::VariableLengthVectorType vlv) +{ + assert(this->Bands.size() == vlv.Size()); + const double* vlvIt = vlv.GetDataPointer(); + for(auto band = this->Bands.begin() ; band != this->Bands.end() ; ++band, ++vlvIt) + { + band->Add(key, *vlvIt); + } +} + +// printing +std::ostream& operator<<(std::ostream& os, const otb::ImageMetadataBase& imd) +{ + os << imd.ToJSON(true); + return os; +} + +std::ostream& operator<<(std::ostream& os, const otb::ImageMetadata& imd) +{ + os << "{"; + os << imd.ToJSON(true); + os << "Bands["; + for (auto &band : imd.Bands) + { + os << band.ToJSON(true) << ","; + } + os << "]\n"; + os << "}"; + + return os; +} + +} diff --git a/Modules/Core/Metadata/src/otbImageMetadataInterfaceBase.cxx b/Modules/Core/Metadata/src/otbImageMetadataInterfaceBase.cxx index d71634cab13c4c9ca2890ec7ea9bc90e1ac754d1..7d662a217eb6c8101c25a4a53406e729e252a935 100644 --- a/Modules/Core/Metadata/src/otbImageMetadataInterfaceBase.cxx +++ b/Modules/Core/Metadata/src/otbImageMetadataInterfaceBase.cxx @@ -22,6 +22,7 @@ #include "otbImageMetadataInterfaceBase.h" #include "otbNoDataHelper.h" +#include "otbGeometryMetadata.h" #include "itkMetaDataObject.h" #include "itksys/SystemTools.hxx" @@ -33,6 +34,38 @@ ImageMetadataInterfaceBase::ImageMetadataInterfaceBase() { } + +void ImageMetadataInterfaceBase::SetImage(ImageType* image) +{ + this->SetMetaDataDictionary(image->GetMetaDataDictionary()); +} + + +void ImageMetadataInterfaceBase::SetMetaDataDictionary(const MetaDataDictionaryType& dict) +{ + m_MetaDataDictionary = dict; +} + + +const ImageMetadataInterfaceBase::MetaDataDictionaryType& +ImageMetadataInterfaceBase::GetMetaDataDictionary() const +{ + return m_MetaDataDictionary; +} + + +void ImageMetadataInterfaceBase::SetImageMetadata(ImageMetadata imd) +{ + m_Imd = std::move(imd); +} + + +const ImageMetadata& ImageMetadataInterfaceBase::GetImageMetadata() const +{ + return m_Imd; +} + + std::string ImageMetadataInterfaceBase::GetProjectionRef() const { std::string metadata; @@ -74,7 +107,7 @@ unsigned int ImageMetadataInterfaceBase::GetGCPCount() const return (GCPCount); } -OTB_GCP& ImageMetadataInterfaceBase::GetGCPs(unsigned int GCPnum) +GCP& ImageMetadataInterfaceBase::GetGCPs(unsigned int GCPnum) { std::string key; const MetaDataDictionaryType& dict = this->GetMetaDataDictionary(); @@ -86,7 +119,7 @@ OTB_GCP& ImageMetadataInterfaceBase::GetGCPs(unsigned int GCPnum) if (dict.HasKey(key)) { - itk::ExposeMetaData<OTB_GCP>(dict, key, m_GCP); + itk::ExposeMetaData<GCP>(dict, key, m_GCP); } return (m_GCP); } @@ -102,8 +135,8 @@ std::string ImageMetadataInterfaceBase::GetGCPId(unsigned int GCPnum) const if (dict.HasKey(key)) { - OTB_GCP gcp; - itk::ExposeMetaData<OTB_GCP>(dict, key, gcp); + GCP gcp; + itk::ExposeMetaData<GCP>(dict, key, gcp); return (gcp.m_Id); } else @@ -121,8 +154,8 @@ std::string ImageMetadataInterfaceBase::GetGCPInfo(unsigned int GCPnum) const if (dict.HasKey(key)) { - OTB_GCP gcp; - itk::ExposeMetaData<OTB_GCP>(dict, key, gcp); + GCP gcp; + itk::ExposeMetaData<GCP>(dict, key, gcp); return (gcp.m_Info); } else @@ -140,8 +173,8 @@ double ImageMetadataInterfaceBase::GetGCPRow(unsigned int GCPnum) const if (dict.HasKey(key)) { - OTB_GCP gcp; - itk::ExposeMetaData<OTB_GCP>(dict, key, gcp); + GCP gcp; + itk::ExposeMetaData<GCP>(dict, key, gcp); return (gcp.m_GCPRow); } else @@ -159,8 +192,8 @@ double ImageMetadataInterfaceBase::GetGCPCol(unsigned int GCPnum) const if (dict.HasKey(key)) { - OTB_GCP gcp; - itk::ExposeMetaData<OTB_GCP>(dict, key, gcp); + GCP gcp; + itk::ExposeMetaData<GCP>(dict, key, gcp); return (gcp.m_GCPCol); } else @@ -178,8 +211,8 @@ double ImageMetadataInterfaceBase::GetGCPX(unsigned int GCPnum) const if (dict.HasKey(key)) { - OTB_GCP gcp; - itk::ExposeMetaData<OTB_GCP>(dict, key, gcp); + GCP gcp; + itk::ExposeMetaData<GCP>(dict, key, gcp); return (gcp.m_GCPX); } else @@ -197,8 +230,8 @@ double ImageMetadataInterfaceBase::GetGCPY(unsigned int GCPnum) const if (dict.HasKey(key)) { - OTB_GCP gcp; - itk::ExposeMetaData<OTB_GCP>(dict, key, gcp); + GCP gcp; + itk::ExposeMetaData<GCP>(dict, key, gcp); return (gcp.m_GCPY); } else @@ -216,8 +249,8 @@ double ImageMetadataInterfaceBase::GetGCPZ(unsigned int GCPnum) const if (dict.HasKey(key)) { - OTB_GCP gcp; - itk::ExposeMetaData<OTB_GCP>(dict, key, gcp); + GCP gcp; + itk::ExposeMetaData<GCP>(dict, key, gcp); return (gcp.m_GCPZ); } else @@ -498,10 +531,10 @@ void ImageMetadataInterfaceBase::PrintMetadata(std::ostream& os, itk::Indent ind break; } - case MetaDataKey::TOTB_GCP: + case MetaDataKey::TGCP: { - OTB_GCP gcpvalue; - itk::ExposeMetaData<OTB_GCP>(dict2, keys[itkey], gcpvalue); + GCP gcpvalue; + itk::ExposeMetaData<GCP>(dict2, keys[itkey], gcpvalue); os << indent << "---> " << keys[itkey] << std::endl; gcpvalue.Print(os); @@ -587,5 +620,112 @@ void ImageMetadataInterfaceBase::PrintSelf(std::ostream& os, itk::Indent indent) } } +const std::string& +ImageMetadataInterfaceBase::Fetch( + MDStr key, + const MetadataSupplierInterface & mds, + const char *path, + int band) +{ + if (band >= 0) + { + assert( (size_t)(band) < m_Imd.Bands.size()); + m_Imd.Bands[band].Add(key, mds.GetAs<std::string>(path, band)); + return m_Imd.Bands[band][key]; + } + m_Imd.Add(key, mds.GetAs<std::string>(path) ); + return m_Imd[key]; +} + +const double& +ImageMetadataInterfaceBase::Fetch( + MDNum key, + const MetadataSupplierInterface & mds, + const char *path, + int band) +{ + if (band >= 0) + { + assert( (size_t)(band) < m_Imd.Bands.size()); + m_Imd.Bands[band].Add(key, mds.GetAs<double>(path, band)); + return m_Imd.Bands[band][key]; + } + m_Imd.Add(key, mds.GetAs<double>(path)); + return m_Imd[key]; +} + +const MetaData::Time& +ImageMetadataInterfaceBase::Fetch( + MDTime key, + const MetadataSupplierInterface & mds, + const char *path, + int band) +{ + if (band >= 0) + { + assert( (size_t)(band) < m_Imd.Bands.size()); + m_Imd.Bands[band].Add(key, mds.GetAs<MetaData::Time>(path, band)); + return m_Imd.Bands[band][key]; + } + m_Imd.Add(key, mds.GetAs<MetaData::Time>(path)); + return m_Imd[key]; +} + +const std::string& +ImageMetadataInterfaceBase::Fetch( + std::string key, + const MetadataSupplierInterface & mds, + const char *path, + int band) +{ + if (band >= 0) + { + assert( (size_t)(band) < m_Imd.Bands.size()); + m_Imd.Bands[band].Add(key, mds.GetAs<std::string>(path, band)); + return m_Imd.Bands[band][key]; + } + m_Imd.Add(key, mds.GetAs<std::string>(path) ); + return m_Imd[key]; +} + +const boost::any& ImageMetadataInterfaceBase::FetchRPC( + const MetadataSupplierInterface & mds) +{ + Projection::RPCParam rpcStruct; + rpcStruct.LineOffset = mds.GetAs<double>("RPC/LINE_OFF"); + rpcStruct.SampleOffset = mds.GetAs<double>("RPC/SAMP_OFF"); + rpcStruct.LatOffset = mds.GetAs<double>("RPC/LAT_OFF"); + rpcStruct.LonOffset = mds.GetAs<double>("RPC/LONG_OFF"); + rpcStruct.HeightOffset = mds.GetAs<double>("RPC/HEIGHT_OFF"); + + rpcStruct.LineScale = mds.GetAs<double>("RPC/LINE_SCALE"); + rpcStruct.SampleScale = mds.GetAs<double>("RPC/SAMP_SCALE"); + rpcStruct.LatScale = mds.GetAs<double>("RPC/LAT_SCALE"); + rpcStruct.LonScale = mds.GetAs<double>("RPC/LONG_SCALE"); + rpcStruct.HeightScale = mds.GetAs<double>("RPC/HEIGHT_SCALE"); + + std::vector<double> coeffs(20); + + coeffs = mds.GetAsVector<double>("RPC/LINE_NUM_COEFF",' ',20); + std::copy(coeffs.begin(), coeffs.end(), rpcStruct.LineNum); + + coeffs = mds.GetAsVector<double>("RPC/LINE_DEN_COEFF",' ',20); + std::copy(coeffs.begin(), coeffs.end(), rpcStruct.LineDen); + + coeffs = mds.GetAsVector<double>("RPC/SAMP_NUM_COEFF",' ',20); + std::copy(coeffs.begin(), coeffs.end(), rpcStruct.SampleNum); + + coeffs = mds.GetAsVector<double>("RPC/SAMP_DEN_COEFF",' ',20); + std::copy(coeffs.begin(), coeffs.end(), rpcStruct.SampleDen); + + m_Imd.Add(MDGeom::RPC, rpcStruct); + return m_Imd[MDGeom::RPC]; +} + +bool ImageMetadataInterfaceBase::ConvertImageKeywordlistToImageMetadata() +{ + // by default, no conversion + return false; +} } // end namespace otb diff --git a/Modules/Core/Metadata/src/otbImageMetadataInterfaceFactory.cxx b/Modules/Core/Metadata/src/otbImageMetadataInterfaceFactory.cxx index c8155fe0ffffec1378af6b9199731e7bd85f422d..2763bc034c07fe897c864788efa935e3e8184e4c 100644 --- a/Modules/Core/Metadata/src/otbImageMetadataInterfaceFactory.cxx +++ b/Modules/Core/Metadata/src/otbImageMetadataInterfaceFactory.cxx @@ -52,15 +52,15 @@ ImageMetadataInterfaceFactory::ImageMetadataInterfaceBasePointerType ImageMetada RegisterBuiltInFactories(); std::list<ImageMetadataInterfaceBasePointerType> possibleIMI; - std::list<itk::LightObject::Pointer> allOpticalObjects = itk::ObjectFactoryBase::CreateAllInstance("OpticalImageMetadataInterface"); - std::list<itk::LightObject::Pointer> allSarObjects = itk::ObjectFactoryBase::CreateAllInstance("SarImageMetadataInterface"); + auto allOpticalObjects = itk::ObjectFactoryBase::CreateAllInstance("OpticalImageMetadataInterface"); + auto allSarObjects = itk::ObjectFactoryBase::CreateAllInstance("SarImageMetadataInterface"); std::list<itk::LightObject::Pointer> allObjects; std::copy(allOpticalObjects.begin(), allOpticalObjects.end(), std::back_inserter(allObjects)); std::copy(allSarObjects.begin(), allSarObjects.end(), std::back_inserter(allObjects)); - for (std::list<itk::LightObject::Pointer>::iterator i = allObjects.begin(); i != allObjects.end(); ++i) + for (auto i = allObjects.begin(); i != allObjects.end(); ++i) { ImageMetadataInterfaceBase* io = dynamic_cast<ImageMetadataInterfaceBase*>(i->GetPointer()); if (io) @@ -73,7 +73,7 @@ ImageMetadataInterfaceFactory::ImageMetadataInterfaceBasePointerType ImageMetada } } - for (std::list<ImageMetadataInterfaceBasePointerType>::iterator k = possibleIMI.begin(); k != possibleIMI.end(); ++k) + for (auto k = possibleIMI.begin(); k != possibleIMI.end(); ++k) { (*k)->SetMetaDataDictionary(dict); if ((*k)->CanRead()) @@ -87,6 +87,48 @@ ImageMetadataInterfaceFactory::ImageMetadataInterfaceBasePointerType ImageMetada return dynamic_cast<ImageMetadataInterfaceBase*>(static_cast<DefaultImageMetadataInterface*>(defaultIMI)); } +ImageMetadataInterfaceFactory::ImageMetadataInterfaceBasePointerType +ImageMetadataInterfaceFactory +::CreateIMI(const ImageMetadata & imd, const MetadataSupplierInterface *mds) +{ + RegisterBuiltInFactories(); + + auto allOpticalObjects = itk::ObjectFactoryBase::CreateAllInstance("OpticalImageMetadataInterface"); + auto allSarObjects = itk::ObjectFactoryBase::CreateAllInstance("SarImageMetadataInterface"); + std::list<itk::LightObject::Pointer> allObjects; + + std::copy(allOpticalObjects.begin(), allOpticalObjects.end(), std::back_inserter(allObjects)); + std::copy(allSarObjects.begin(), allSarObjects.end(), std::back_inserter(allObjects)); + + for (auto i = allObjects.begin(); i != allObjects.end(); ++i) + { + ImageMetadataInterfaceBase* io = dynamic_cast<ImageMetadataInterfaceBase*>(i->GetPointer()); + if (io) + { + // the static part of ImageMetadata is already filled + io->SetImageMetadata(imd); + try + { + io->Parse(mds); + return io; + } + catch(MissingMetadataException& e) + { + // silent catch of MissingMetadataException + // just means that this IMI can't parse the file + } + } + else + { + itkGenericExceptionMacro(<< "Error ImageMetadataInterface factory did not return an ImageMetadataInterfaceBase: " << (*i)->GetNameOfClass()); + } + } + + auto defaultIMI = DefaultImageMetadataInterface::New(); + defaultIMI->SetImageMetadata(imd); + return dynamic_cast<ImageMetadataInterfaceBase*>(static_cast<DefaultImageMetadataInterface*>(defaultIMI)); +} + void ImageMetadataInterfaceFactory::RegisterBuiltInFactories() { static bool firstTime = true; diff --git a/Modules/Core/Metadata/src/otbMetaDataKey.cxx b/Modules/Core/Metadata/src/otbMetaDataKey.cxx index c687572b5d9b8df7b3a7c92edaef5781bdfb7f46..db6ec2ac9111cf24fd9783d42e1a445862c8d590 100644 --- a/Modules/Core/Metadata/src/otbMetaDataKey.cxx +++ b/Modules/Core/Metadata/src/otbMetaDataKey.cxx @@ -20,6 +20,8 @@ #include "otbMetaDataKey.h" +#include <iomanip> +#include <ios> namespace otb { @@ -65,6 +67,7 @@ char const* NoDataValueAvailable = "NoDataValueAvailable"; char const* NoDataValue = "NoDataValue"; char const* DataType = "DataType"; + } const MetaDataKey::KeyTypeDef Types[] = { @@ -72,7 +75,7 @@ const MetaDataKey::KeyTypeDef Types[] = { MetaDataKey::KeyTypeDef(MetaDataKey::DriverLongNameKey, MetaDataKey::TSTRING), MetaDataKey::KeyTypeDef(MetaDataKey::ProjectionRefKey, MetaDataKey::TSTRING), MetaDataKey::KeyTypeDef(MetaDataKey::GCPProjectionKey, MetaDataKey::TSTRING), - MetaDataKey::KeyTypeDef(MetaDataKey::GCPParametersKey, MetaDataKey::TOTB_GCP), + MetaDataKey::KeyTypeDef(MetaDataKey::GCPParametersKey, MetaDataKey::TGCP), MetaDataKey::KeyTypeDef(MetaDataKey::GCPCountKey, MetaDataKey::TENTIER), MetaDataKey::KeyTypeDef(MetaDataKey::GeoTransformKey, MetaDataKey::TVECTOR), MetaDataKey::KeyTypeDef(MetaDataKey::MetadataKey, MetaDataKey::TSTRING), @@ -114,20 +117,283 @@ MetaDataKey::KeyType MetaDataKey::GetKeyType(const std::string& name) return MetaDataKey::KeyType(MetaDataKey::TSTRING); } -OTB_GCP::OTB_GCP() : m_GCPCol(0), m_GCPRow(0), m_GCPX(0), m_GCPY(0), m_GCPZ(0) +namespace MetaData +{ + +std::ostream& operator<<(std::ostream& os, const Time& val) { + os << std::setfill('0') << std::setw(4) << val.tm_year + 1900 << '-'; + os << std::setw(2) << val.tm_mon + 1 << '-' << std::setw(2) << val.tm_mday; + os << 'T' << std::setw(2) << val.tm_hour << ':'; + os << std::setw(2) << val.tm_min << ':'; + double sec = (double) val.tm_sec + val.frac_sec; + int prec = 8; + if (sec < 10.0) + { + os << '0'; + prec = 7; + } + os << std::setprecision(prec) << sec << 'Z'; + os << std::setfill(' '); + return os; } -OTB_GCP::~OTB_GCP() +#define _OTB_ISTREAM_FAIL_IF(x) \ + if ( x ) \ + { \ + is.setstate( std::ios_base::failbit); \ + return is; \ + } + +std::istream& operator>>(std::istream& is, Time& val) { + // Year + is >> val.tm_year; + val.tm_year -= 1900; + _OTB_ISTREAM_FAIL_IF( is.fail() ) + _OTB_ISTREAM_FAIL_IF( is.get() != '-' ) + // Month + is >> val.tm_mon; + _OTB_ISTREAM_FAIL_IF( is.fail() ) + _OTB_ISTREAM_FAIL_IF( val.tm_mon < 1 || val.tm_mon > 12 ) + val.tm_mon -= 1; + _OTB_ISTREAM_FAIL_IF( is.get() != '-' ) + // Day + is >> val.tm_mday; + _OTB_ISTREAM_FAIL_IF( is.fail() ) + _OTB_ISTREAM_FAIL_IF( val.tm_mday < 1 || val.tm_mday > 31 ) + _OTB_ISTREAM_FAIL_IF( is.get() != 'T' ) + // Hour + is >> val.tm_hour; + _OTB_ISTREAM_FAIL_IF( is.fail() ) + _OTB_ISTREAM_FAIL_IF( val.tm_hour < 0 || val.tm_hour > 23 ) + _OTB_ISTREAM_FAIL_IF( is.get() != ':' ) + // Minutes + is >> val.tm_min; + _OTB_ISTREAM_FAIL_IF( is.fail() ) + _OTB_ISTREAM_FAIL_IF( val.tm_min < 0 || val.tm_min > 59 ) + _OTB_ISTREAM_FAIL_IF( is.get() != ':' ) + // Seconds + double sec = 0.0; + is >> sec; + _OTB_ISTREAM_FAIL_IF( is.fail() ) + val.tm_sec = (int) sec; + val.frac_sec = sec - (double) val.tm_sec; + _OTB_ISTREAM_FAIL_IF( val.tm_sec < 0 || val.tm_sec > 60 ) + _OTB_ISTREAM_FAIL_IF( val.frac_sec < 0.0 || val.frac_sec >= 1.0) + //_OTB_ISTREAM_FAIL_IF( is.get() != 'Z' ) + return is; } -void OTB_GCP::Print(std::ostream& os) const +#undef _OTB_ISTREAM_EXPECT + +std::string LUTAxis::ToJSON(bool multiline) const { - os << " GCP Id = " << this->m_Id << std::endl; - os << " GCP Info = " << this->m_Info << std::endl; - os << " GCP (Row, Col) = (" << this->m_GCPRow << "," << this->m_GCPCol << ")" << std::endl; - os << " GCP (X, Y, Z) = (" << this->m_GCPX << "," << this->m_GCPY << "," << this->m_GCPZ << ")" << std::endl; + std::ostringstream oss; + std::string sep; + if (multiline) + { + sep = "\n"; + } + oss << "{" + << "\"Size\": \"" << Size << "\", " << sep + << "\"Origin\": \"" << Origin << "\", " << sep + << "\"Spacing\": \"" << Spacing << "\", " << sep + << "\"Values\": ["; + for (const auto& value : Values) + oss << value << ", "; + oss << "]}"; + return oss.str(); } +template <unsigned int VDim> +std::string LUT<VDim>::ToJSON(bool multiline) const +{ + std::ostringstream oss; + std::string sep; + if (multiline) + { + sep = "\n"; + } + oss << "{" + << "\"Axis\": ["; + for (unsigned int loop = 0 ; loop < VDim ; loop++) + oss << Axis[loop].ToJSON(multiline) << ", "; + oss << "], " << sep + << "\"Array\": ["; + for (const auto& value : Array) + oss << value << ", "; + oss << "]}"; + return oss.str(); +} + +template <unsigned int VDim> +std::string LUT<VDim>::ToString() const +{ + std::ostringstream oss; + for (unsigned int dim = 0 ; dim < VDim ; dim++) + { + oss << "LUT" << VDim << "D.DIM" << dim << ".SIZE = " << Axis[dim].Size << "\n"; + if (! Axis[dim].Values.empty()) + // Irregular sampling + { + oss << "LUT" << VDim << "D.DIM" << dim << ".VALUES = "; + otb::Join(oss, Axis[dim].Values, " "); + oss << "\n"; + } + else + { + // Regular sampling + oss << "LUT" << VDim << "D.DIM" << dim << ".ORIGIN = " << Axis[dim].Origin << "\n" + << "LUT" << VDim << "D.DIM" << dim << ".SPACING = " << Axis[dim].Spacing << "\n"; + } + } + oss << "LUT" << VDim << "D.ARRAY = "; + otb::Join(oss, Array, " "); + return oss.str(); +} + +template <unsigned int VDim> +void LUT<VDim>::FromString(std::string str) +{ + std::vector<std::string> lines; + std::vector<std::string> parts; + boost::split(lines, str, [](char c){return c == '\n';}); + for (std::string line : lines) + { + boost::split(parts, line, [](char c){return c == '=';}); + boost::trim(parts[1]); + if (Utils::LexicalCast<int>(parts[0].substr(3, 1), "VDim") != VDim) + throw std::invalid_argument("Wrong LUT dimension"); + if(parts[0].substr(6, 5) == "ARRAY") + // this->Array + { + std::vector<std::string> str_array; + boost::split(str_array, parts[1], [](char c){return c == ' ';}); + Array.reserve(str_array.size()); + std::transform(str_array.begin(), str_array.end(), back_inserter(Array), + [](std::string const& val) {return std::stod(val);}); + } + else + { + unsigned int dim = Utils::LexicalCast<int>(parts[0].substr(9, 1), "parts[0].substr(9, 1)"); + if (dim > VDim) + throw std::invalid_argument("LUT dimension higher than expected"); + std::string element = parts[0].substr(11); + if (element == "SIZE ") + // this->Axis[dim].Size + { + Axis[dim].Size = Utils::LexicalCast<int>(parts[1], "Axis[dim].Size"); + } + else if (element == "VALUES ") + // this->Axis[dim].Values + { + std::vector<std::string> str_array; + boost::split(str_array, parts[1], [](char c){return c == ' ';}); + Axis[dim].Values.reserve(str_array.size()); + std::transform(str_array.begin(), str_array.end(), back_inserter(Axis[dim].Values), + [](std::string const& val) {return std::stod(val);}); + } + else if (element == "ORIGIN ") + // this->Axis[dim].Origin + { + Axis[dim].Origin = Utils::LexicalCast<double>(parts[1], "Axis[dim].Origin"); + } + else if (element == "SPACING ") + // this->Axis[dim].Spacing + { + Axis[dim].Spacing = Utils::LexicalCast<double>(parts[1], "Axis[dim].Spacing"); + } + } + } +} + +template class LUT<1>; +template class LUT<2>; + +// array<pair<> > +// boost::flat_map<> +MDNumBmType MDNumNames = bimapGenerator<MDNum>(std::map<MDNum, std::string> { + {MDNum::TileHintX,"TileHintX"}, + {MDNum::TileHintY,"TileHintY"}, + {MDNum::DataType,"DataType"}, + {MDNum::NoData, "NoData"}, + {MDNum::NumberOfLines,"NumberOfLines"}, + {MDNum::NumberOfColumns,"NumberOfColumns"}, + {MDNum::AverageSceneHeight,"AverageSceneHeight"}, + {MDNum::OrbitNumber, "OrbitNumber"}, + {MDNum::PhysicalGain,"PhysicalGain"}, + {MDNum::PhysicalBias,"PhysicalBias"}, + {MDNum::SolarIrradiance,"SolarIrradiance"}, + {MDNum::SunElevation,"SunElevation"}, + {MDNum::SunAzimuth,"SunAzimuth"}, + {MDNum::SatElevation,"SatElevation"}, + {MDNum::SatAzimuth,"SatAzimuth"}, + {MDNum::FirstWavelength,"FirstWavelength"}, + {MDNum::LastWavelength,"LastWavelength"}, + {MDNum::SpectralStep,"SpectralStep"}, + {MDNum::SpectralMin,"SpectralMin"}, + {MDNum::SpectralMax,"SpectralMax"}, + {MDNum::CalScale,"CalScale"}, + {MDNum::PRF,"PRF"}, + {MDNum::RSF,"RSF"}, + {MDNum::RadarFrequency,"RadarFrequency"}, + {MDNum::CenterIncidenceAngle,"CenterIncidenceAngle"}, + {MDNum::RescalingFactor,"RescalingFactor"}, + {MDNum::AntennaPatternNewGainPolyDegX,"AntennaPatternNewGainPolyDegX"}, + {MDNum::AntennaPatternNewGainPolyDegY,"AntennaPatternNewGainPolyDegY"}, + {MDNum::AntennaPatternOldGainPolyDegX,"AntennaPatternOldGainPolyDegX"}, + {MDNum::AntennaPatternOldGainPolyDegY,"AntennaPatternOldGainPolyDegY"}, + {MDNum::IncidenceAnglePolyDegX,"IncidenceAnglePolyDegX"}, + {MDNum::IncidenceAnglePolyDegY,"IncidenceAnglePolyDegY"}, + {MDNum::RangeSpreadLossPolyDegX,"RangeSpreadLossPolyDegX"}, + {MDNum::RangeSpreadLossPolyDegY,"RangeSpreadLossPolyDegY"}, + {MDNum::NoisePolyDegX,"NoisePolyDegX"}, + {MDNum::NoisePolyDegY,"NoisePolyDegY"}, + {MDNum::LineSpacing,"LineSpacing"}, + {MDNum::PixelSpacing,"PixelSpacing"}, +}); + +MDStrBmType MDStrNames = bimapGenerator<MDStr>(std::map<MDStr, std::string> { + {MDStr::SensorID,"SensorID"}, + {MDStr::Mission,"Mission"}, + {MDStr::Instrument,"Instrument"}, + {MDStr::ProductType,"ProductType"}, + {MDStr::GeometricLevel,"GeometricLevel"}, + {MDStr::RadiometricLevel,"RadiometricLevel"}, + {MDStr::Polarization,"Polarization"}, + {MDStr::Mode, "Mode"}, + {MDStr::Swath, "Swath"}, + {MDStr::OrbitDirection, "OrbitDirection"}, + {MDStr::BandName,"BandName"}, + {MDStr::BeamMode, "BeamMode"}, + {MDStr::BeamSwath, "BeamSwath"}, +}); + +MDTimeBmType MDTimeNames = bimapGenerator<MDTime>(std::map<MDTime, std::string> { + {MDTime::AcquisitionDate,"AcquisitionDate"}, + {MDTime::ProductionDate,"ProductionDate"}, + {MDTime::AcquisitionStartTime,"AcquisitionStartTime"}, + {MDTime::AcquisitionStopTime,"AcquisitionStopTime"}, +}); + +MDL1DBmType MDL1DNames = bimapGenerator<MDL1D>(std::map<MDL1D, std::string> { + {MDL1D::SpectralSensitivity,"SpectralSensitivity"}, +}); + +MDL2DBmType MDL2DNames = bimapGenerator<MDL2D>(std::map<MDL2D, std::string> {}); + +MDGeomBmType MDGeomNames = bimapGenerator<MDGeom>(std::map<MDGeom, std::string> { + {MDGeom::ProjectionWKT, "ProjectionWKT"}, + {MDGeom::ProjectionEPSG, "ProjectionEPSG"}, + {MDGeom::ProjectionProj, "ProjectionProj"}, + {MDGeom::RPC, "RPC"}, + {MDGeom::SAR, "SAR"}, + {MDGeom::SensorGeometry, "SensorGeometry"}, + {MDGeom::GCP, "GCP"}, + {MDGeom::Adjustment, "Adjustment"} +}); + +} // end namespace MetaData + } // end namespace otb diff --git a/Modules/Core/Metadata/src/otbMetadataStorageInterface.cxx b/Modules/Core/Metadata/src/otbMetadataStorageInterface.cxx new file mode 100644 index 0000000000000000000000000000000000000000..1e87e2121a35b8cef7d6d6a59f9c72d082502dac --- /dev/null +++ b/Modules/Core/Metadata/src/otbMetadataStorageInterface.cxx @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "otbMetadataStorageInterface.h" + +namespace otb +{ + +void MetadataStorageInterface::SetAs(const std::string & path, double value, int band) +{ + std::ostringstream oss; + oss << value; + SetMetadataValue(path.c_str(), oss.str().c_str(), band); +} + +void MetadataStorageInterface::SetAs(const std::string & path, const std::string & value, int band) +{ + SetMetadataValue(path.c_str(), value.c_str(), band); +} + +} diff --git a/Modules/Core/Metadata/src/otbMetadataSupplierInterface.cxx b/Modules/Core/Metadata/src/otbMetadataSupplierInterface.cxx new file mode 100644 index 0000000000000000000000000000000000000000..4cbe8a51284e39aedcd530183afb5dfa4b836642 --- /dev/null +++ b/Modules/Core/Metadata/src/otbMetadataSupplierInterface.cxx @@ -0,0 +1,34 @@ +/* + * Copyright (C) 2005-2019 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "otbMetadataSupplierInterface.h" + +namespace otb +{ + +bool MetadataSupplierInterface::HasValue(const std::string path, int band) +{ + bool hasValue; + const std::string ret = GetMetadataValue(path, hasValue, band); + return hasValue; +} + + +} diff --git a/Modules/Core/Metadata/src/otbOpticalImageMetadataInterface.cxx b/Modules/Core/Metadata/src/otbOpticalImageMetadataInterface.cxx index 4635c6cf1e22dbf264ec3395f4667e2e28123058..647ba5c571273887d86e11ff3b3d805afa2776da 100644 --- a/Modules/Core/Metadata/src/otbOpticalImageMetadataInterface.cxx +++ b/Modules/Core/Metadata/src/otbOpticalImageMetadataInterface.cxx @@ -96,5 +96,82 @@ void OpticalImageMetadataInterface::PrintSelf(std::ostream& os, itk::Indent inde } } +bool OpticalImageMetadataInterface::ConvertImageKeywordlistToImageMetadata() +{ + bool result = true; + try + { + this->m_Imd.Add(MDNum::SunElevation, this->GetSunElevation()); + } + catch (const itk::ExceptionObject) + { + result = false; + } + try + { + this->m_Imd.Add(MDNum::SunAzimuth, this->GetSunAzimuth()); + } + catch (const itk::ExceptionObject) + { + result = false; + } + try + { + this->m_Imd.Add(MDNum::SatElevation, this->GetSatElevation()); + } + catch (const itk::ExceptionObject) + { + result = false; + } + try + { + this->m_Imd.Add(MDNum::SatAzimuth, this->GetSatAzimuth()); + } + catch (const itk::ExceptionObject) + { + result = false; + } + try + { + this->m_Imd.Add(MDNum::PhysicalBias, this->GetPhysicalBias()); + } + catch (const itk::ExceptionObject) + { + result = false; + } + try + { + this->m_Imd.Add(MDNum::PhysicalGain, this->GetPhysicalGain()); + } + catch (const itk::ExceptionObject) + { + result = false; + } + try + { + this->m_Imd.Add(MDNum::SolarIrradiance, this->GetSolarIrradiance()); + } + catch (const itk::ExceptionObject) + { + result = false; + } + try + { + this->m_Imd.Add(MDNum::FirstWavelength, this->GetFirstWavelengths()); + } + catch (const itk::ExceptionObject) + { + result = false; + } + try + { + this->m_Imd.Add(MDNum::LastWavelength, this->GetLastWavelengths()); + } + catch (const itk::ExceptionObject) + { + result = false; + } + return result; +} } // end namespace otb diff --git a/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx b/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx index f5f1558fdcaae814e2e0c5fb86896289cf91be70..de511406a91a5ff899e635995d27e3b8010ef96b 100644 --- a/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx +++ b/Modules/Core/Metadata/src/otbPleiadesImageMetadataInterface.cxx @@ -24,6 +24,7 @@ #include "otbMacro.h" #include "itkMetaDataObject.h" #include "otbImageKeywordlist.h" +#include "otbGeometryMetadata.h" #include "otbStringUtils.h" // useful constants @@ -1757,4 +1758,28 @@ PleiadesImageMetadataInterface::WavelengthSpectralBandVectorType PleiadesImageMe return wavelengthSpectralBand; } +void PleiadesImageMetadataInterface::Parse(const MetadataSupplierInterface *mds) +{ + assert(mds); + Fetch(MDStr::SensorID, *mds, "IMD/Dataset_Sources.Source_Identification.Strip_Source.MISSION"); + if (boost::starts_with(m_Imd[MDStr::SensorID], "PHR")) + { + m_Imd.Add(MDStr::Mission, "Pléiades"); + } + else + { + otbGenericExceptionMacro(MissingMetadataException,<<"Sensor ID doesn't start with PHR : '"<<m_Imd[MDStr::SensorID]<<"'") + } + + Fetch(MDStr::GeometricLevel, *mds, "IMD/Geoposition.Raster_CRS.RASTER_GEOMETRY"); + + // get radiometric metadata + + // fill RPC model + if (m_Imd[MDStr::GeometricLevel] == "SENSOR") + { + FetchRPC(*mds); + } +} + } // end namespace otb diff --git a/Modules/Core/Metadata/src/otbSarImageMetadataInterface.cxx b/Modules/Core/Metadata/src/otbSarImageMetadataInterface.cxx index ce026e33c34247581bcad45f62e9418997137284..abfa0f26e4aa0929a52e2a0723604624fd016d17 100644 --- a/Modules/Core/Metadata/src/otbSarImageMetadataInterface.cxx +++ b/Modules/Core/Metadata/src/otbSarImageMetadataInterface.cxx @@ -218,5 +218,10 @@ void SarImageMetadataInterface::PrintSelf(std::ostream& os, itk::Indent indent) } } +bool SarImageMetadataInterface::ConvertImageKeywordlistToImageMetadata() +{ + // TODO + return false; +} } // end namespace otb diff --git a/Modules/Core/Metadata/src/otbSentinel1ImageMetadataInterface.cxx b/Modules/Core/Metadata/src/otbSentinel1ImageMetadataInterface.cxx index 17a296e73a773c185c7c75815ab3fbf549c112e9..1a2eae2376f3cf62d7cbc3001b3fa4506ab30d69 100644 --- a/Modules/Core/Metadata/src/otbSentinel1ImageMetadataInterface.cxx +++ b/Modules/Core/Metadata/src/otbSentinel1ImageMetadataInterface.cxx @@ -25,6 +25,7 @@ #include "otbMacro.h" #include "itkMetaDataObject.h" #include "otbImageKeywordlist.h" +#include "otbXMLMetadataSupplier.h" #if defined(__GNUC__) || defined(__clang__) #pragma GCC diagnostic push #pragma GCC diagnostic ignored "-Wunused-parameter" @@ -33,6 +34,7 @@ #else #include "ossim/ossimTimeUtilities.h" #endif +#include "itksys/SystemTools.hxx" // useful constants #include <otbMath.h> @@ -350,4 +352,257 @@ double Sentinel1ImageMetadataInterface::GetCenterIncidenceAngle() const return 0; } +std::vector<AzimuthFmRate> Sentinel1ImageMetadataInterface::GetAzimuthFmRate(const XMLMetadataSupplier &xmlMS) const +{ + std::vector<AzimuthFmRate> azimuthFmRateVector; + // Number of entries in the vector + int listCount = xmlMS.GetAs<int>("product.generalAnnotation.azimuthFmRateList.count"); + // This streams wild hold the iteration number + std::ostringstream oss; + for (int listId = 1 ; listId <= listCount ; ++listId) + { + oss.str(""); + oss << listId; + // Base path to the data, that depends on the iteration number + std::string path_root = "product.generalAnnotation.azimuthFmRateList.azimuthFmRate_" + oss.str(); + AzimuthFmRate afr; + std::istringstream(xmlMS.GetAs<std::string>(path_root + ".azimuthTime")) >> afr.azimuthTime; + afr.t0 = xmlMS.GetAs<double>(path_root + ".t0"); + afr.azimuthFmRatePolynomial = xmlMS.GetAsVector<double>(path_root + ".azimuthFmRatePolynomial", + ' ', xmlMS.GetAs<int>(path_root + ".azimuthFmRatePolynomial.count")); + azimuthFmRateVector.push_back(afr); + } + return azimuthFmRateVector; +} + +std::vector<DopplerCentroid> Sentinel1ImageMetadataInterface::GetDopplerCentroid(const XMLMetadataSupplier &xmlMS) const +{ + std::vector<DopplerCentroid> dopplerCentroidVector; + // Number of entries in the vector + int listCount = xmlMS.GetAs<int>("product.dopplerCentroid.dcEstimateList.count"); + // This streams wild hold the iteration number + std::ostringstream oss; + for (int listId = 1 ; listId <= listCount ; ++listId) + { + oss.str(""); + oss << listId; + // Base path to the data, that depends on the iteration number + std::string path_root = "product.dopplerCentroid.dcEstimateList.dcEstimate_" + oss.str(); + DopplerCentroid dopplerCent; + std::istringstream(xmlMS.GetAs<std::string>(path_root + ".azimuthTime")) >> dopplerCent.azimuthTime; + dopplerCent.t0 = xmlMS.GetAs<double>(path_root + ".t0"); + dopplerCent.dopCoef = xmlMS.GetAsVector<double>(path_root + ".dataDcPolynomial", + ' ', xmlMS.GetAs<int>(path_root + ".dataDcPolynomial.count")); + dopplerCent.geoDopCoef = xmlMS.GetAsVector<double>(path_root + ".geometryDcPolynomial", + ' ', xmlMS.GetAs<int>(path_root + ".geometryDcPolynomial.count")); + dopplerCentroidVector.push_back(dopplerCent); + } + return dopplerCentroidVector; +} + +std::vector<Orbit> Sentinel1ImageMetadataInterface::GetOrbits(const XMLMetadataSupplier &xmlMS) const +{ + std::vector<Orbit> orbitVector; + // Number of entries in the vector + int listCount = xmlMS.GetAs<int>("product.generalAnnotation.orbitList.count"); + // This streams wild hold the iteration number + std::ostringstream oss; + for (int listId = 1 ; listId <= listCount ; ++listId) + { + oss.str(""); + oss << listId; + // Base path to the data, that depends on the iteration number + std::string path_root = "product.generalAnnotation.orbitList.orbit_" + oss.str(); + Orbit orbit; + std::istringstream(xmlMS.GetAs<std::string>(path_root + ".time")) >> orbit.time; + orbit.posX = xmlMS.GetAs<double>(path_root + ".position.x"); + orbit.posY = xmlMS.GetAs<double>(path_root + ".position.y"); + orbit.posZ = xmlMS.GetAs<double>(path_root + ".position.z"); + orbit.velX = xmlMS.GetAs<double>(path_root + ".velocity.x"); + orbit.velY = xmlMS.GetAs<double>(path_root + ".velocity.y"); + orbit.velZ = xmlMS.GetAs<double>(path_root + ".velocity.z"); + orbitVector.push_back(orbit); + } + return orbitVector; +} + +std::vector<CalibrationVector> Sentinel1ImageMetadataInterface::GetCalibrationVector(const XMLMetadataSupplier &xmlMS) const +{ + std::vector<CalibrationVector> calibrationVector; + // Number of entries in the vector + int listCount = xmlMS.GetAs<int>("calibration.calibrationVectorList.count"); + // This streams wild hold the iteration number + std::ostringstream oss; + for (int listId = 1 ; listId <= listCount ; ++listId) + { + oss.str(""); + oss << listId; + // Base path to the data, that depends on the iteration number + std::string path_root = "calibration.calibrationVectorList.calibrationVector_" + oss.str(); + + CalibrationVector calVect; + std::istringstream(xmlMS.GetAs<std::string>(path_root + ".azimuthTime")) >> calVect.azimuthTime; + calVect.line = xmlMS.GetAs<int>(path_root + ".line"); + + // Same axe for all LUTs + MetaData::LUTAxis ax1; + ax1.Size = xmlMS.GetAs<int>(path_root + ".pixel.count"); + ax1.Values = xmlMS.GetAsVector<double>(path_root + ".pixel", ' ', ax1.Size); + + MetaData::LUT1D sigmaNoughtLut; + sigmaNoughtLut.Axis[0] = ax1; + sigmaNoughtLut.Array = xmlMS.GetAsVector<double>(path_root + ".sigmaNought", + ' ', xmlMS.GetAs<int>(path_root + ".sigmaNought.count")); + calVect.sigmaNought = sigmaNoughtLut; + + MetaData::LUT1D betaNoughtLut; + betaNoughtLut.Axis[0] = ax1; + betaNoughtLut.Array = xmlMS.GetAsVector<double>(path_root + ".betaNought", + ' ', xmlMS.GetAs<int>(path_root + ".betaNought.count")); + calVect.betaNought = betaNoughtLut; + + MetaData::LUT1D gammaLut; + gammaLut.Axis[0] = ax1; + gammaLut.Array = xmlMS.GetAsVector<double>(path_root + ".gamma", + ' ', xmlMS.GetAs<int>(path_root + ".gamma.count")); + calVect.gamma = gammaLut; + + MetaData::LUT1D dnLut; + dnLut.Axis[0] = ax1; + dnLut.Array = xmlMS.GetAsVector<double>(path_root + ".dn", + ' ', xmlMS.GetAs<int>(path_root + ".dn.count")); + calVect.dn = dnLut; + + calibrationVector.push_back(calVect); + } + return calibrationVector; +} + +std::vector<SARNoise> Sentinel1ImageMetadataInterface::GetNoiseVector(const XMLMetadataSupplier &xmlMS) const +{ + std::vector<SARNoise> noiseVector; + // Number of entries in the vector + int listCount = xmlMS.GetAs<int>("noise.noiseVectorList.count"); + // This streams wild hold the iteration number + std::ostringstream oss; + for (int listId = 1 ; listId <= listCount ; ++listId) + { + oss.str(""); + oss << listId; + // Base path to the data, that depends on the iteration number + std::string path_root = "noise.noiseVectorList.noiseVector_" + oss.str(); + SARNoise noiseVect; + std::istringstream(xmlMS.GetAs<std::string>(path_root + ".azimuthTime")) >> noiseVect.azimuthTime; + MetaData::LUT1D noiseLut; + MetaData::LUTAxis ax1; + ax1.Size = xmlMS.GetAs<int>(path_root + ".pixel.count"); + ax1.Values = xmlMS.GetAsVector<double>(path_root + ".pixel", ' ', ax1.Size); + noiseLut.Axis[0] = ax1; + noiseLut.Array = xmlMS.GetAsVector<double>(path_root + ".noiseLut", + ' ', xmlMS.GetAs<int>(path_root + ".noiseLut.count")); + noiseVect.noiseLut = noiseLut; + noiseVector.push_back(noiseVect); + } + return noiseVector; +} + +double Sentinel1ImageMetadataInterface::getBandTerrainHeight(const XMLMetadataSupplier &xmlMS) const +{ + double heightSum = 0.0; + // Number of entries in the vector + int listCount = xmlMS.GetAs<int>("product.generalAnnotation.terrainHeightList.count"); + // This streams wild hold the iteration number + std::ostringstream oss; + for (int listId = 1 ; listId <= listCount ; ++listId) + { + oss.str(""); + oss << listId; + // Base path to the data, that depends on the iteration number + std::string path_root = "product.generalAnnotation.terrainHeightList.terrainHeight_" + oss.str(); + heightSum += xmlMS.GetAs<double>(path_root + ".value"); + } + return heightSum / (double)listCount; +} + +void Sentinel1ImageMetadataInterface::Parse(const MetadataSupplierInterface *mds) +{ + assert(mds); + assert(mds->GetNbBands() == this->m_Imd.Bands.size()); + // Metadata read by GDAL + Fetch(MDTime::AcquisitionStartTime, *mds, "ACQUISITION_START_TIME"); + Fetch(MDTime::AcquisitionStopTime, *mds, "ACQUISITION_STOP_TIME"); + Fetch(MDStr::BeamMode, *mds, "BEAM_MODE"); + Fetch(MDStr::BeamSwath, *mds, "BEAM_SWATH"); + Fetch("FACILITY_IDENTIFIER", *mds, "FACILITY_IDENTIFIER"); + Fetch(MDNum::LineSpacing, *mds, "LINE_SPACING"); + Fetch(MDStr::Mission, *mds, "MISSION_ID"); + Fetch(MDStr::Mode, *mds, "MODE"); + Fetch(MDStr::OrbitDirection, *mds, "ORBIT_DIRECTION"); + Fetch(MDNum::OrbitNumber, *mds, "ORBIT_NUMBER"); + Fetch(MDNum::PixelSpacing, *mds, "PIXEL_SPACING"); + Fetch(MDStr::ProductType, *mds, "PRODUCT_TYPE"); + Fetch(MDStr::Instrument, *mds, "SATELLITE_IDENTIFIER"); + Fetch(MDStr::SensorID, *mds, "SENSOR_IDENTIFIER"); + Fetch(MDStr::Swath, *mds, "SWATH"); + + // Manifest file + std::string ManifestFilePath = mds->GetResourceFile(std::string("manifest\\.safe")); + if (!ManifestFilePath.empty()) + { + XMLMetadataSupplier ManifestMS(ManifestFilePath); + m_Imd.Add(MDTime::ProductionDate, + ManifestMS.GetFirstAs<MetaData::Time>("xfdu:XFDU.metadataSection.metadataObject_#.metadataWrap.xmlData.safe:processing.start")); + m_Imd.Add(MDTime::AcquisitionDate, + ManifestMS.GetFirstAs<MetaData::Time>("xfdu:XFDU.metadataSection.metadataObject_#.metadataWrap.xmlData.safe:acquisitionPeriod.safe:startTime")); + } + + // Band metadata + for (int bandId = 0 ; bandId < mds->GetNbBands() ; ++bandId) + { + SARParam sarParam; + Fetch(MDStr::Polarization, *mds, "POLARISATION", bandId); + std::string swath = Fetch(MDStr::Swath, *mds, "SWATH", bandId); + + // Annotation file + std::string AnnotationFilePath = mds->GetResourceFile(std::string("annotation[/\\\\]s1[ab].*-") + + itksys::SystemTools::LowerCase(swath) + + std::string("-.*\\.xml")); + if (AnnotationFilePath.empty()) + otbGenericExceptionMacro(MissingMetadataException,<<"Missing Annotation file for band '"<<swath<<"'"); + XMLMetadataSupplier AnnotationMS(AnnotationFilePath); + + sarParam.azimuthFmRates = this->GetAzimuthFmRate(AnnotationMS); + sarParam.dopplerCentroids = this->GetDopplerCentroid(AnnotationMS); + sarParam.orbits = this->GetOrbits(AnnotationMS); + m_Imd.Add(MDNum::NumberOfLines, AnnotationMS.GetAs<int>("product.imageAnnotation.imageInformation.numberOfLines")); + m_Imd.Add(MDNum::NumberOfColumns, AnnotationMS.GetAs<int>("product.imageAnnotation.imageInformation.numberOfSamples")); + m_Imd.Add(MDNum::AverageSceneHeight, this->getBandTerrainHeight(AnnotationFilePath)); + m_Imd.Add(MDNum::RadarFrequency, AnnotationMS.GetAs<double>("product.generalAnnotation.productInformation.radarFrequency")); + m_Imd.Add(MDNum::PRF, AnnotationMS.GetAs<double>("product.imageAnnotation.imageInformation.azimuthFrequency")); + m_Imd.Add(MDNum::CenterIncidenceAngle, AnnotationMS.GetAs<double>("product.imageAnnotation.imageInformation.incidenceAngleMidSwath")); + + // Calibration file + std::string CalibrationFilePath = itksys::SystemTools::GetFilenamePath(AnnotationFilePath) + + "/calibration/calibration-" + + itksys::SystemTools::GetFilenameName(AnnotationFilePath); + if (CalibrationFilePath.empty()) + otbGenericExceptionMacro(MissingMetadataException,<<"Missing Calibration file for band '"<<swath<<"'"); + XMLMetadataSupplier CalibrationMS(CalibrationFilePath); + m_Imd.Add(MDNum::CalScale, CalibrationMS.GetAs<double>("calibration.calibrationInformation.absoluteCalibrationConstant")); + sarParam.calibrationVectors = this->GetCalibrationVector(CalibrationMS); + std::istringstream(CalibrationMS.GetAs<std::string>("calibration.adsHeader.startTime")) >> sarParam.calibrationStartTime; + std::istringstream(CalibrationMS.GetAs<std::string>("calibration.adsHeader.stopTime")) >> sarParam.calibrationStopTime; + + // Noise file + std::string NoiseFilePath = itksys::SystemTools::GetFilenamePath(AnnotationFilePath) + + "/calibration/noise-" + + itksys::SystemTools::GetFilenameName(AnnotationFilePath); + if (NoiseFilePath.empty()) + otbGenericExceptionMacro(MissingMetadataException,<<"Missing Noise file for band '"<<swath<<"'"); + XMLMetadataSupplier NoiseMS(NoiseFilePath); + + m_Imd.Bands[bandId].Add(MDGeom::SAR, sarParam); + } +} + } // end namespace otb diff --git a/Modules/Core/Metadata/src/otbXMLMetadataSupplier.cxx b/Modules/Core/Metadata/src/otbXMLMetadataSupplier.cxx new file mode 100644 index 0000000000000000000000000000000000000000..e8084bf6bfbbf378fbccc50f1b9eed6946995d98 --- /dev/null +++ b/Modules/Core/Metadata/src/otbXMLMetadataSupplier.cxx @@ -0,0 +1,237 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "otbXMLMetadataSupplier.h" + +namespace otb +{ +XMLMetadataSupplier::XMLMetadataSupplier(const std::string & fileName) + : m_FileName(fileName) +{ + CPLXMLNode* psNode = CPLParseXMLFile(m_FileName.c_str()); + if(psNode != nullptr) + m_MetadataDic = ReadXMLToList(psNode, m_MetadataDic); + else + { + otbLogMacro(Warning, <<"Unable to parse XML file " << fileName); + m_MetadataDic = nullptr; + } + CPLDestroyXMLNode(psNode); +} + +std::string XMLMetadataSupplier::GetMetadataValue(const std::string path, bool& hasValue, int band) const +{ + const char * ret = CSLFetchNameValue(m_MetadataDic, path.c_str()); + if (ret) + hasValue = true; + else + { + hasValue = false; + ret = ""; + } + return std::string(ret); +} + +std::string XMLMetadataSupplier::GetFirstMetadataValue(const std::string path, bool& hasValue) const +{ + // Search for the first joker + std::size_t found = path.find("_#"); + // Looking for the keys corresponding to the part of the path before the first joker + std::vector<std::string> values = this->FetchPartialNameValueMultiple(m_MetadataDic, path.substr(0, found).c_str()); + // Position of the beginning of the path after the joker + std::size_t start = found + 2; + + // While a joker is found + while(found != std::string::npos) + { + // Look for the next joker + found = path.find("_#", start); + // Look for the keys corresponding to the part of the path between the two jokers + values = this->FetchPartialNameValueMultiple(values, path.substr(start, found)); + start = found + 2; + } + + if ((values.size() != 0) && (!values[0].empty())) + { + hasValue = true; + std::string ret = values[0]; + ret = ret.substr(ret.find('=') + 1); + // Return the value part + return ret; + } + else + { + hasValue = false; + return ""; + } +} + +std::string XMLMetadataSupplier::GetResourceFile(std::string) const +{ + return m_FileName; +} + +// This method originates from a work by GDAL in the class GDALMDReaderBase. +char** XMLMetadataSupplier::ReadXMLToList(CPLXMLNode* psNode, char** papszList, + const char* pszName) +{ + if(nullptr == psNode) + return papszList; + + if (psNode->eType == CXT_Text) + { + papszList = CSLAddNameValue(papszList, pszName, psNode->pszValue); + } + + if (psNode->eType == CXT_Element) + { + int nAddIndex = 0; + bool bReset = false; + for(CPLXMLNode* psChildNode = psNode->psChild; nullptr != psChildNode; + psChildNode = psChildNode->psNext) + { + if (psChildNode->eType == CXT_Element) + { + // check name duplicates + if(nullptr != psChildNode->psNext) + { + if(bReset) + { + bReset = false; + nAddIndex = 0; + } + + if(EQUAL(psChildNode->pszValue, psChildNode->psNext->pszValue)) + { + nAddIndex++; + } + else + { // the name changed + if(nAddIndex > 0) + { + bReset = true; + nAddIndex++; + } + } + } + else + { + if(bReset) + { + bReset = false; + nAddIndex = 0; + } + if(nAddIndex > 0) + { + nAddIndex++; + } + } + char szName[512]; + if(nAddIndex > 0) + { + CPLsnprintf( szName, 511, "%s_%d", psChildNode->pszValue, + nAddIndex); + } + else + { + CPLStrlcpy(szName, psChildNode->pszValue, 511); + } + char szNameNew[512]; + if(CPLStrnlen( pszName, 511 ) > 0) //if no prefix just set name to node name + { + CPLsnprintf( szNameNew, 511, "%s.%s", pszName, szName ); + } + else + { + CPLsnprintf( szNameNew, 511, "%s.%s", psNode->pszValue, szName ); + } + papszList = ReadXMLToList(psChildNode, papszList, szNameNew); + } + else if( psChildNode->eType == CXT_Attribute ) + { + papszList = CSLAddNameValue(papszList, + CPLSPrintf("%s.%s", pszName, psChildNode->pszValue), + psChildNode->psChild->pszValue); + } + else + { + // Text nodes should always have name + if(EQUAL(pszName, "")) + { + papszList = ReadXMLToList(psChildNode, papszList, psNode->pszValue); + } + else + { + papszList = ReadXMLToList(psChildNode, papszList, pszName); + } + } + } + } + + // proceed next only on top level + if(nullptr != psNode->psNext && EQUAL(pszName, "")) + { + papszList = ReadXMLToList(psNode->psNext, papszList, pszName); + } + + return papszList; +} + +std::vector<std::string> XMLMetadataSupplier::FetchPartialNameValueMultiple(char** papszStrList, + const char *pszName) const +{ + std::vector<std::string> retStringVector; + if( papszStrList == nullptr || pszName == nullptr ) + return retStringVector; + + for( ; *papszStrList != nullptr ; ++papszStrList ) + if( strstr(*papszStrList, pszName) ) + retStringVector.push_back(*papszStrList); + return retStringVector; +} + +std::vector<std::string> XMLMetadataSupplier::FetchPartialNameValueMultiple(const std::vector<std::string> &StringVector, + const std::string &Name) const +{ + std::vector<std::string> retStringVector; + if( StringVector.size() == 0 || Name.empty() ) + return retStringVector; + + for( const auto& val : StringVector ) + if( val.find(Name) != std::string::npos ) + retStringVector.push_back(val); + return retStringVector; +} + +int XMLMetadataSupplier::GetNbBands() const +{ + return 0; +} + +std::string XMLMetadataSupplier::PrintSelf() +{ + std::ostringstream oss; + oss << "XMLMetadataSupplier: " << this->m_FileName << '\n'; + for (char ** string = this->m_MetadataDic; *string != nullptr ; ++string) + oss << *string << '\n'; + return oss.str(); +} + +} // end namespace otb diff --git a/Modules/Core/Metadata/test/CMakeLists.txt b/Modules/Core/Metadata/test/CMakeLists.txt index a9732b867d2e34f8724073927d3795d5ddae7939..852b117e9271a30beffc736b748c282e6b76ea4e 100644 --- a/Modules/Core/Metadata/test/CMakeLists.txt +++ b/Modules/Core/Metadata/test/CMakeLists.txt @@ -28,9 +28,12 @@ otbSarDefaultImageMetadataInterface.cxx otbOpticalImageMetadataInterfaceTest.cxx otbOpticalDefaultImageMetadataInterface.cxx otbDefaultImageMetadataInterface.cxx +otbImageMetadataInterfaceTest.cxx otbImageMetadataInterfaceTest2.cxx otbNoDataHelperTest.cxx otbSarCalibrationLookupDataTest.cxx +otbImageMetadataTest.cxx +otbXMLMetadataSupplierTest.cxx ) add_executable(otbMetadataTestDriver ${OTBMetadataTests}) @@ -79,6 +82,20 @@ otb_module_target_label(otbMetadataTestDriver) #${TEMP}/ioTvSarImageMetadataInterface_TSX1PANGKALANBUUNUsingHHCosFile.txt #) +#otb_add_test(NAME ioTvSentinel1ImageMetadataInterfaceTest COMMAND otbMetadataTestDriver +# otbSentinel1ImageMetadataInterfaceTest +# /home/julien/Bureau/S1Product/S1A_IW_GRDH_1SDV_20170819T001029_20170819T001054_017985_01E2E8_F302.SAFE +# ${TEMP}/ioTvSentinel1ImageMetadataInterfaceTest.txt +# ) + +otb_add_test(NAME ioTvImageMetadataInterfaceTest_Sentinel1 COMMAND otbMetadataTestDriver + --compare-ascii ${EPSILON_9} ${BASELINE_FILES}/ioTvImageMetadataInterfaceTest_Sentinel1.txt + ${TEMP}/ioTvImageMetadataInterfaceTest_Sentinel1.txt + otbImageMetadataInterfaceTest + LARGEINPUT{SENTINEL1/S1A_S6_SLC__1SSV_20150619T195043} + ${TEMP}/ioTvImageMetadataInterfaceTest_Sentinel1.txt + ) + #otb_add_test(NAME ioTvImageMetadataInterfaceBaseTest_SENTINEL1 COMMAND otbMetadataTestDriver #--compare-ascii ${EPSILON_9} ${BASELINE_FILES}/ioTvImageMetadataInterfaceBase_SENTINEL1.txt #${TEMP}/ioTvImageMetadataInterfaceBase_SENTINEL1.txt @@ -356,3 +373,59 @@ otb_add_test(NAME ioTvSarCalibrationLookupDataTest_RADARSAT2 COMMAND otbMetadata ${INPUTDATA}/RADARSAT2_ALTONA_300_300_VV.tif?&geom=${INPUTDATA}/RADARSAT2_ALTONA_300_300_VV.geom ${TEMP}/ioTvSarCalibrationLookupDataTest_RADARSAT2.txt ) + +otb_add_test(NAME ioTuMetaDataKeyTest COMMAND otbMetadataTestDriver + --compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTuMetaDataKeyTest.txt + ${TEMP}/ioTuMetaDataKeyTest.txt + otbImageMetadataTest + otbMetadataKeyTest + ${TEMP}/ioTuMetaDataKeyTest.txt + ) + +otb_add_test(NAME ioTuImageMetadataSliceTest COMMAND otbMetadataTestDriver + --compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTuImageMetadataSliceTest.txt + ${TEMP}/ioTuImageMetadataSliceTest.txt + otbImageMetadataTest + otbImageMetadataSliceTest + ${TEMP}/ioTuImageMetadataSliceTest.txt + ) + +otb_add_test(NAME ioTuImageMetadataCompactTest COMMAND otbMetadataTestDriver + --compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTuImageMetadataCompactTest.txt + ${TEMP}/ioTuImageMetadataCompactTest.txt + otbImageMetadataTest + otbImageMetadataCompactTest + ${TEMP}/ioTuImageMetadataCompactTest.txt + ) + +otb_add_test(NAME ioTuImageMetadataAppendTest COMMAND otbMetadataTestDriver + --compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTuImageMetadataAppendTest.txt + ${TEMP}/ioTuImageMetadataAppendTest.txt + otbImageMetadataTest + otbImageMetadataAppendTest + ${TEMP}/ioTuImageMetadataAppendTest.txt + ) + +otb_add_test(NAME ioTuImageMetadataMergeTest COMMAND otbMetadataTestDriver + --compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTuImageMetadataMergeTest.txt + ${TEMP}/ioTuImageMetadataMergeTest.txt + otbImageMetadataTest + otbImageMetadataMergeTest + ${TEMP}/ioTuImageMetadataMergeTest.txt + ) + +otb_add_test(NAME ioTuImageMetadataToFromKeywordlistTest COMMAND otbMetadataTestDriver + --compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTuImageMetadataToFromKeywordlistTest.txt + ${TEMP}/ioTuImageMetadataToFromKeywordlistTest.txt + otbImageMetadataTest + otbImageMetadataToFromKeywordlistTest + ${TEMP}/ioTuImageMetadataToFromKeywordlistTest.txt + ) + +otb_add_test(NAME ioTuotbXMLMetadataSupplierTest COMMAND otbMetadataTestDriver + --compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTuotbXMLMetadataSupplierTest.txt + ${TEMP}/ioTuotbXMLMetadataSupplierTest.txt + otbXMLMetadataSupplierTest + ${INPUTDATA}/ioTuotbXMLMetadataSupplierTest.xml + ${TEMP}/ioTuotbXMLMetadataSupplierTest.txt + ) diff --git a/Modules/Core/Metadata/test/otbImageMetadataInterfaceTest.cxx b/Modules/Core/Metadata/test/otbImageMetadataInterfaceTest.cxx new file mode 100644 index 0000000000000000000000000000000000000000..615fd886e0514b8ab773de0a832b8c60b32fa638 --- /dev/null +++ b/Modules/Core/Metadata/test/otbImageMetadataInterfaceTest.cxx @@ -0,0 +1,63 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#include "itkMacro.h" +#include <boost/any.hpp> +#include <fstream> +#include <iostream> +#include "otbImage.h" +#include "otbImageFileReader.h" +#include "otbImageMetadataInterfaceFactory.h" +#include "otbGDALImageIO.h" +#include "otbMetaDataKey.h" +#include "otbTestTools.h" + + +int otbImageMetadataInterfaceTest(int itkNotUsed(argc), char* argv[]) +{ + // Verify the number of parameters in the command line + const char* inputFilename = argv[1]; + const char* outputFilename = argv[2]; + + typedef otb::Image<double, 2> InputImageType; + typedef otb::ImageFileReader<InputImageType> ImageReaderType; + + ImageReaderType::Pointer reader = ImageReaderType::New(); + reader->SetFileName(inputFilename); + reader->UpdateOutputInformation(); + + otb::ImageMetadata imd = reader->GetImageIO()->GetImageMetadata(); + otb::MetadataSupplierInterface* mds = dynamic_cast<otb::MetadataSupplierInterface*>(reader->GetImageIO()); + otb::ImageMetadataInterfaceBase::Pointer imi = otb::ImageMetadataInterfaceFactory::CreateIMI(imd, mds); + + // Test the image interface + otb::GDALImageIO* mds2 = dynamic_cast<otb::GDALImageIO*>(mds); + imi->Parse(mds); + const otb::ImageMetadata& imd2 = imi->GetImageMetadata(); + std::ofstream file; + file.open(outputFilename); + otb::testtools::PrintMetadata(imd2, file); + if (imd2.Has(otb::MDGeom::GCP)) + file << boost::any_cast<otb::Projection::GCPParam>(imd2[otb::MDGeom::GCP]).ToJSON(true); + file.close(); + + return EXIT_SUCCESS; +} diff --git a/Modules/Core/Metadata/test/otbImageMetadataTest.cxx b/Modules/Core/Metadata/test/otbImageMetadataTest.cxx new file mode 100644 index 0000000000000000000000000000000000000000..90c28432d559d4664f2b354de652136cdaed2d67 --- /dev/null +++ b/Modules/Core/Metadata/test/otbImageMetadataTest.cxx @@ -0,0 +1,309 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "otbImageMetadata.h" +#include <iostream> +#include <fstream> +#include "boost/optional.hpp" +#include <bitset> +#include <utility> +#include <cstdlib> +#include "otbStopwatch.h" +#include "otbTestTools.h" + +void SetUpImageMetadata(otb::ImageMetadata& md, unsigned int nbBands) +{ + using namespace otb; + std::ostringstream oss; + + MetaData::Time mytime = Utils::LexicalCast<MetaData::Time,std::string>(std::string("2009-08-10T10:30:08.142149Z"), std::string("T")); + + md.Add(MDStr::SensorID, "PHR"); + md.Add(MDGeom::ProjectionWKT, std::string("UTM projRef")); + md.Add(MDTime::ProductionDate, mytime); + md.Add(std::string("Comment"), std::string("Test Extrakeys")); + + MetaDataKey::VariableLengthVectorType PhysicalGain(nbBands); + + for(unsigned int bandId = 0 ; bandId < nbBands ; bandId++) + { + ImageMetadataBase bmd; + oss.str(""); + oss << "B" << bandId; + bmd.Add(MDStr::BandName, oss.str()); + bmd.Add(MDNum::PhysicalBias, bandId + 1.0); + bmd.Add(MDNum::NoData, -10000.0); + md.Bands.push_back(bmd); + PhysicalGain.SetElement(bandId, bandId + 2.0); + } + md.Add(MDNum::PhysicalGain , PhysicalGain); +} + +void otbMetadataKeyTest(char* argv[]) +{ + using namespace otb; + const char* outFileName = argv[2]; + std::ofstream outfile(outFileName); + + MetaData::Time mytime; + + std::string bufferStr("2009-08-10T10:30:08.142149Z"); + + try + { + mytime = Utils::LexicalCast<MetaData::Time,std::string>(bufferStr, std::string("T")); + } + catch(std::runtime_error&) + { + outfile << "Bad Utils::LexicalCast into MetaData::Time\n"; + } + + outfile << "mytime : "<< mytime << "\n"; + + MDNum someKey = static_cast<MDNum>(3); + if (someKey == MDNum::PhysicalGain) + { + outfile << "Found physical gain\n"; + } + + struct FirstTry + { + std::array< boost::optional<double>, static_cast<int>(MDNum::END) > NumKeys; + }; + + struct SecondTry + { + std::bitset< static_cast<int>(MDNum::END) > NumFlag; + std::array<double, static_cast<int>(MDNum::END) > NumKeys; + }; + + class ThirdTry + { + public: + std::pair< + std::bitset< static_cast<int>(MDNum::END) >, + std::array<double, static_cast<int>(MDNum::END) > >NumKeys; + }; + + outfile << "First try size: "<<sizeof(FirstTry)<< "\n"; + outfile << "Second try size: "<<sizeof(SecondTry)<< "\n"; + outfile << "Third try size: "<<sizeof(ThirdTry)<< "\n"; + + FirstTry firstStruct; + SecondTry secondStruct; + ThirdTry thirdStruct; + + int total = static_cast<int>(MDNum::END); + int loops = 10000000; + Stopwatch chrono; + double val= 0.0; + chrono.Start(); + for (int i=0 ; i< loops ; ++i) + { + int pos = rand() % total; + if (firstStruct.NumKeys[pos] == boost::none) + { + firstStruct.NumKeys[pos] = val+1.0; + } + else + { + firstStruct.NumKeys[pos] = firstStruct.NumKeys[pos].get() + val; + } + } + chrono.Stop(); + std::cout << "First try chrono : "<< chrono.GetElapsedMilliseconds() << "\n"; + + val= 0.0; + chrono.Restart(); + for (int i=0 ; i< loops ; ++i) + { + int pos = rand() % total; + if (secondStruct.NumFlag[pos] == false) + { + secondStruct.NumKeys[pos] = val+1.0; + secondStruct.NumFlag[pos] = true; + } + else + { + secondStruct.NumKeys[pos] = secondStruct.NumKeys[pos] + val; + } + } + chrono.Stop(); + std::cout << "Second try chrono : "<< chrono.GetElapsedMilliseconds() << "\n"; + + val= 0.0; + chrono.Restart(); + for (int i=0 ; i< loops ; ++i) + { + int pos = rand() % total; + if (thirdStruct.NumKeys.first[pos] == false) + { + thirdStruct.NumKeys.second[pos] = val+1.0; + thirdStruct.NumKeys.first[pos] = true; + } + else + { + thirdStruct.NumKeys.second[pos] = thirdStruct.NumKeys.second[pos] + val; + } + } + chrono.Stop(); + std::cout << "Third try chrono : "<< chrono.GetElapsedMilliseconds(); + outfile.close(); +} + +void otbImageMetadataSliceTest(char* argv[]) +{ + using namespace otb; + + const char* outFileName = argv[2]; + std::ofstream outfile(outFileName); + + ImageMetadata md; + SetUpImageMetadata(md, 3); + + ImageMetadata md2 = md.slice(0, 1); + otb::testtools::PrintMetadata(md2, outfile); + outfile.close(); +} + +void otbImageMetadataAppendTest(char* argv[]) +{ + using namespace otb; + + const char* outFileName = argv[2]; + std::ofstream outfile(outFileName); + + ImageMetadata md; + SetUpImageMetadata(md, 2); + + ImageMetadata md2; + SetUpImageMetadata(md2, 3); + + md.append(md2); + otb::testtools::PrintMetadata(md, outfile); + outfile.close(); +} + +void otbImageMetadataMergeTest(char* argv[]) +{ + using namespace otb; + + const char* outFileName = argv[2]; + std::ofstream outfile(outFileName); + + ImageMetadata md; + SetUpImageMetadata(md, 2); + + ImageMetadata md2; + SetUpImageMetadata(md2, 3); + + // Modifies some fields to actually test something. + // The case where metadatas are identical is trivial in Merge() + + md.Add(MDStr::SensorID, "SPOT"); + md2.Add(MDStr::Polarization, "Polarization"); + md2.Bands[0].Add(MDNum::PhysicalBias, 3.1); + md2.Bands[1].Add(MDNum::SunAzimuth, 20); + + md.Merge(md2); + + otb::testtools::PrintMetadata(md, outfile); + outfile.close(); +} +void otbImageMetadataToFromKeywordlistTest(char* argv[]) +{ + using namespace otb; + + const char* outFileName = argv[2]; + std::ofstream outfile(outFileName); + + ImageMetadata md; + SetUpImageMetadata(md, 3); + md.Add(MDGeom::ProjectionEPSG, 4326); + md.Add(MDGeom::ProjectionProj, std::string("+proj=longlat +datum=WGS84 +no_defs ")); + Projection::RPCParam rpcStruct; + md.Add(MDGeom::RPC, rpcStruct); + Projection::GCPParam gcpStruct; + gcpStruct.GCPs.push_back(GCP()); + md.Add(MDGeom::GCP, gcpStruct); + MetaData::LUT1D lut1d; + lut1d.Axis[0].Size = 3; + lut1d.Axis[0].Origin = 0.; + lut1d.Axis[0].Spacing = 1.; + std::vector<double>array({1.0, 2.0, 3.0}); + lut1d.Array = {1.0, 2.0, 3.0}; + md.Add(MDL1D::SpectralSensitivity, lut1d); + + ImageMetadata::KeywordlistVector kwlVect; + md.AppendToKeywordlists(kwlVect); + ImageMetadata md2; + md2.FromKeywordlists(kwlVect); + otb::testtools::PrintMetadata(md2, outfile); + outfile.close(); +} + +void otbImageMetadataCompactTest(char* argv[]) +{ + using namespace otb; + + const char* outFileName = argv[2]; + std::ofstream outfile(outFileName); + + ImageMetadata md; + md.compact(); + SetUpImageMetadata(md, 3); + MetaData::Time mytime = Utils::LexicalCast<MetaData::Time,std::string>(std::string("2009-08-05T20:34:38.236478Z"), std::string("T")); + for (auto& band : md.Bands) + { + band.Add(MDStr::Polarization, "Polarization"); + band.Add(std::string("Information"), std::string("Very important")); + band.Add(MDTime::AcquisitionDate, mytime); + } + + md.compact(); + otb::testtools::PrintMetadata(md, outfile); + outfile.close(); +} + +int otbImageMetadataTest(int argc, char* argv[]) +{ + if (argc < 2) + return EXIT_FAILURE; + + std::string testName(argv[1]); + if(testName == "otbMetadataKeyTest") + otbMetadataKeyTest(argv); + else if (testName == "otbImageMetadataSliceTest") + otbImageMetadataSliceTest(argv); + else if (testName == "otbImageMetadataAppendTest") + otbImageMetadataAppendTest(argv); + else if (testName == "otbImageMetadataMergeTest") + otbImageMetadataMergeTest(argv); + else if (testName == "otbImageMetadataToFromKeywordlistTest") + otbImageMetadataToFromKeywordlistTest(argv); + else if (testName == "otbImageMetadataCompactTest") + otbImageMetadataCompactTest(argv); + else + { + std::cout << "Unknown test name " << testName; + return EXIT_FAILURE; + } + return EXIT_SUCCESS; +} diff --git a/Modules/Core/Metadata/test/otbMetadataTestDriver.cxx b/Modules/Core/Metadata/test/otbMetadataTestDriver.cxx index 25b34b33b14cbf6681bd5e3bd2ed0dd0d2804563..ab70f0ec6cbdaf0d516462d4679aaf22979a1c96 100644 --- a/Modules/Core/Metadata/test/otbMetadataTestDriver.cxx +++ b/Modules/Core/Metadata/test/otbMetadataTestDriver.cxx @@ -28,7 +28,10 @@ void RegisterTests() REGISTER_TEST(otbOpticalImageMetadataInterfaceTest); REGISTER_TEST(otbOpticalDefaultImageMetadataInterface); REGISTER_TEST(otbDefaultImageMetadataInterface); + REGISTER_TEST(otbImageMetadataInterfaceTest); REGISTER_TEST(otbImageMetadataInterfaceTest2); REGISTER_TEST(otbNoDataHelperTest); REGISTER_TEST(otbSarCalibrationLookupDataTest); + REGISTER_TEST(otbImageMetadataTest); + REGISTER_TEST(otbXMLMetadataSupplierTest); } diff --git a/Modules/Core/Metadata/test/otbXMLMetadataSupplierTest.cxx b/Modules/Core/Metadata/test/otbXMLMetadataSupplierTest.cxx new file mode 100644 index 0000000000000000000000000000000000000000..77d6d80c5fb4a6ce07132fa90333e51cb677d6a0 --- /dev/null +++ b/Modules/Core/Metadata/test/otbXMLMetadataSupplierTest.cxx @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "otbXMLMetadataSupplier.h" + +int otbXMLMetadataSupplierTest(int itkNotUsed(argc), char* argv[]) +{ + // Verify the number of parameters in the command line + const char* fileName = argv[1]; + const char* outputFilename = argv[2]; + otb::XMLMetadataSupplier mds(fileName); + + bool hasValue; + std::ofstream file; + file.open(outputFilename); + file << mds.GetMetadataValue("OTB.application.name", hasValue) << "\n"; + file << mds.GetMetadataValue("OTB.application.parameter_3.name", hasValue) << "\n"; + file.close(); + + return EXIT_SUCCESS; +} diff --git a/Modules/Core/ObjectList/otb-module.cmake b/Modules/Core/ObjectList/otb-module.cmake index 34cf2ce0afb69baf84ac7dd507b0fd4dc1e80496..ceafcaf04fda676fcded06ff627980e19d30d324 100644 --- a/Modules/Core/ObjectList/otb-module.cmake +++ b/Modules/Core/ObjectList/otb-module.cmake @@ -19,9 +19,7 @@ # set(DOCUMENTATION "This module contains classes that allow manipulating an -ITK/OTB object list with the appropriate formalism. For instance, it is possible to -apply a given scalar image filter to a list of images. or to produce an output -corresponding to the elements selected from an image list. and so on.") +ITK/OTB object list with the appropriate formalism.") otb_module(OTBObjectList DEPENDS diff --git a/Modules/Core/ObjectList/test/CMakeLists.txt b/Modules/Core/ObjectList/test/CMakeLists.txt index ab392f9f10b6fda12b9ea01cc51c7c65958eaf20..1278bd4d95424ed391cc2fabac87f43467dcd668 100644 --- a/Modules/Core/ObjectList/test/CMakeLists.txt +++ b/Modules/Core/ObjectList/test/CMakeLists.txt @@ -21,102 +21,21 @@ otb_module_test() set(OTBObjectListTests otbObjectList.cxx - otbImageList.cxx - otbImageListToImageListApplyFilter.cxx - otbImageListToVectorImageFilter2.cxx - otbImageListToVectorImageFilter.cxx otbObjectList2.cxx - otbVectorImageToImageListFilter.cxx otbObjectListTestDriver.cxx ) add_executable(otbObjectListTestDriver ${OTBObjectListTests}) target_link_libraries(otbObjectListTestDriver ${OTBObjectList-Test_LIBRARIES}) otb_module_target_label(otbObjectListTestDriver) + otb_add_test(NAME coTvObjectList COMMAND otbObjectListTestDriver otbObjectList ${INPUTDATA}/couleurs.jpg ${INPUTDATA}/poupees.png ${INPUTDATA}/couleurs_extrait.png ) -otb_add_test(NAME coTvImageList COMMAND otbObjectListTestDriver - --compare-image ${NOTOL} ${INPUTDATA}/amst.png - ${TEMP}/amst.png - otbImageList - ${INPUTDATA}/amst.png - ${TEMP}/amst.png - ) -otb_add_test(NAME bfTvImageListToImageListApplyFilter COMMAND otbObjectListTestDriver - --compare-n-images ${EPSILON_7} 3 - ${BASELINE}/bfTvImageListToImageListApplyFilterBand1.png - ${TEMP}/bfTvImageListToImageListApplyFilterBand1.png - ${BASELINE}/bfTvImageListToImageListApplyFilterBand2.png - ${TEMP}/bfTvImageListToImageListApplyFilterBand2.png - ${BASELINE}/bfTvImageListToImageListApplyFilterBand3.png - ${TEMP}/bfTvImageListToImageListApplyFilterBand3.png - otbImageListToImageListApplyFilter - ${INPUTDATA}/poupees_c1.raw.hdr - ${INPUTDATA}/poupees_c2.raw.hdr - ${INPUTDATA}/poupees_c3.raw.hdr - ${TEMP}/bfTvImageListToImageListApplyFilterBand1.png - ${TEMP}/bfTvImageListToImageListApplyFilterBand2.png - ${TEMP}/bfTvImageListToImageListApplyFilterBand3.png - ) -otb_add_test(NAME coTvImageListToVectorImageFilter2 COMMAND otbObjectListTestDriver - otbImageListToVectorImageFilter2 - ${INPUTDATA}/poupees_c1.raw.hdr - ${INPUTDATA}/poupees_c2.raw.hdr - ${INPUTDATA}/poupees_c3.raw.hdr - ) -otb_add_test(NAME coTvImageListToVectorImageFilter COMMAND otbObjectListTestDriver - --compare-image ${EPSILON_7} - ${BASELINE}/bfTvImageListToVectorImageFilter.png - ${TEMP}/coTvImageListToVectorImageFilter.png - otbImageListToVectorImageFilter - ${INPUTDATA}/poupees_c1.raw.hdr - ${INPUTDATA}/poupees_c2.raw.hdr - ${INPUTDATA}/poupees_c3.raw.hdr - ${TEMP}/coTvImageListToVectorImageFilter.png - ) + otb_add_test(NAME coTvObjectListTestNotValid COMMAND otbObjectListTestDriver otbObjectList2 ) -otb_add_test(NAME bfTvVectorImageToImageListFilter COMMAND otbObjectListTestDriver - --compare-n-images ${EPSILON_7} 3 - ${BASELINE}/bfTvVectorImageToImageListFilterBand1.png - ${TEMP}/bfTvVectorImageToImageListFilterBand1.png - ${BASELINE}/bfTvVectorImageToImageListFilterBand2.png - ${TEMP}/bfTvVectorImageToImageListFilterBand2.png - ${BASELINE}/bfTvVectorImageToImageListFilterBand3.png - ${TEMP}/bfTvVectorImageToImageListFilterBand3.png - otbVectorImageToImageListFilter - ${INPUTDATA}/poupees.png - ${TEMP}/bfTvVectorImageToImageListFilterBand1.png - ${TEMP}/bfTvVectorImageToImageListFilterBand2.png - ${TEMP}/bfTvVectorImageToImageListFilterBand3.png - ) -otb_add_test(NAME bfTvVectorImageToImageListFilterIt COMMAND otbObjectListTestDriver - --compare-n-images ${EPSILON_7} 3 - ${BASELINE}/bfTvVectorImageToImageListFilterBand1.png - ${TEMP}/bfTvVectorImageToImageListFilterItBand1.png - ${BASELINE}/bfTvVectorImageToImageListFilterBand2.png - ${TEMP}/bfTvVectorImageToImageListFilterItBand2.png - ${BASELINE}/bfTvVectorImageToImageListFilterBand3.png - ${TEMP}/bfTvVectorImageToImageListFilterItBand3.png - otbVectorImageToImageListFilterIterator - ${INPUTDATA}/poupees.png - ${TEMP}/bfTvVectorImageToImageListFilterIt - png - ) -otb_add_test(NAME bfTvVectorImageToImageListFilterIt2 COMMAND otbObjectListTestDriver - --compare-n-images ${EPSILON_7} 3 - ${BASELINE}/bfTvVectorImageToImageListFilterBand1.png - ${TEMP}/bfTvVectorImageToImageListFilterIt2Band1.tif - ${BASELINE}/bfTvVectorImageToImageListFilterBand2.png - ${TEMP}/bfTvVectorImageToImageListFilterIt2Band2.tif - ${BASELINE}/bfTvVectorImageToImageListFilterBand3.png - ${TEMP}/bfTvVectorImageToImageListFilterIt2Band3.tif - otbVectorImageToImageListFilterIterator - ${INPUTDATA}/poupees.png - ${TEMP}/bfTvVectorImageToImageListFilterIt2 - tif - ) + diff --git a/Modules/Core/ObjectList/test/otbObjectListTestDriver.cxx b/Modules/Core/ObjectList/test/otbObjectListTestDriver.cxx index 23dc18e01fb762c400ebe77513fbee7e28f37d83..82d84890206cfde791b13d115137f22532f4d607 100644 --- a/Modules/Core/ObjectList/test/otbObjectListTestDriver.cxx +++ b/Modules/Core/ObjectList/test/otbObjectListTestDriver.cxx @@ -23,11 +23,5 @@ void RegisterTests() { REGISTER_TEST(otbObjectList); - REGISTER_TEST(otbImageList); - REGISTER_TEST(otbImageListToImageListApplyFilter); - REGISTER_TEST(otbImageListToVectorImageFilter2); - REGISTER_TEST(otbImageListToVectorImageFilter); REGISTER_TEST(otbObjectList2); - REGISTER_TEST(otbVectorImageToImageListFilter); - REGISTER_TEST(otbVectorImageToImageListFilterIterator); } diff --git a/Modules/Core/Streaming/otb-module.cmake b/Modules/Core/Streaming/otb-module.cmake index 9a7a0b8a4302e4fa4d3bfa56723349242da65942..fd9ec763ab6b48393028fd5deb9f98924516fae7 100644 --- a/Modules/Core/Streaming/otb-module.cmake +++ b/Modules/Core/Streaming/otb-module.cmake @@ -31,7 +31,7 @@ ENABLE_SHARED OTBImageBase OTBMetadata OTBOSSIMAdapters - OTBObjectList + OTBImageList TEST_DEPENDS OTBImageIO diff --git a/Modules/Filtering/DimensionalityReduction/include/otbFastICAImageFilter.hxx b/Modules/Filtering/DimensionalityReduction/include/otbFastICAImageFilter.hxx index ecbda929e78cf7828afe4c5d639f112e8b25618a..1c513a4b06a42383d66437f6989a2bb2868b46fc 100644 --- a/Modules/Filtering/DimensionalityReduction/include/otbFastICAImageFilter.hxx +++ b/Modules/Filtering/DimensionalityReduction/include/otbFastICAImageFilter.hxx @@ -82,7 +82,8 @@ void FastICAImageFilter<TInputImage, TOutputImage, TDirectionOfTransformation>:: unsigned int theOutputDimension = 0; if (m_GivenTransformationMatrix) { - theOutputDimension = m_TransformationMatrix.Rows() >= m_TransformationMatrix.Cols() ? m_TransformationMatrix.Rows() : m_TransformationMatrix.Cols(); + const auto & pcaMatrix = m_PCAFilter->GetTransformationMatrix(); + theOutputDimension = pcaMatrix.Rows() >= pcaMatrix.Cols() ? pcaMatrix.Rows() : pcaMatrix.Cols(); } else { diff --git a/Modules/Filtering/DimensionalityReduction/include/otbInnerProductPCAImageFilter.hxx b/Modules/Filtering/DimensionalityReduction/include/otbInnerProductPCAImageFilter.hxx index 86f192d058720d53f584b68527a093d320236fae..a3db4b817838571c6a4dca5a626e7bff0d125c19 100644 --- a/Modules/Filtering/DimensionalityReduction/include/otbInnerProductPCAImageFilter.hxx +++ b/Modules/Filtering/DimensionalityReduction/include/otbInnerProductPCAImageFilter.hxx @@ -53,6 +53,10 @@ void InnerProductPCAImageFilter<TInputImage, TOutputImage>::GenerateOutputInform this->GetOutput()->SetNumberOfComponentsPerPixel(m_NumberOfPrincipalComponentsRequired); else this->GetOutput()->SetNumberOfComponentsPerPixel(m_NumberOfPrincipalComponentsRequired + 1); + + // Band specific metadatas are not kept in the reduced space. + this->GetOutput()->SetBandImageMetadata( + ImageMetadata::ImageMetadataBandsType(this->GetOutput()->GetNumberOfComponentsPerPixel())); } /** diff --git a/Modules/Filtering/ImageManipulation/include/otbPerBandVectorImageFilter.hxx b/Modules/Filtering/ImageManipulation/include/otbPerBandVectorImageFilter.hxx index 4cfe11e021d96852bf7f94ea23bea8d772d0fd24..89ec1e7818f24a9e4aa9c136ac9f8d000910b1b4 100644 --- a/Modules/Filtering/ImageManipulation/include/otbPerBandVectorImageFilter.hxx +++ b/Modules/Filtering/ImageManipulation/include/otbPerBandVectorImageFilter.hxx @@ -48,6 +48,9 @@ void PerBandVectorImageFilter<TInputImage, TOutputImage, TFilter>::GenerateOutpu m_Filter->UpdateOutputInformation(); this->GetOutput()->CopyInformation(m_Filter->GetOutput(m_OutputIndex)); this->GetOutput()->SetNumberOfComponentsPerPixel(this->GetInput()->GetNumberOfComponentsPerPixel()); + + // Override default metadata copying behavior and copy all metadata from input to output. + this->GetOutput()->SetImageMetadata(this->GetInput()->GetImageMetadata()); } } diff --git a/Modules/Filtering/ImageManipulation/test/otbChangeInformationImageFilter.cxx b/Modules/Filtering/ImageManipulation/test/otbChangeInformationImageFilter.cxx index 02ede6e356b802dba66786d3c70a87d39db1dbf4..358820d89c2e098c989b6e2c8c4ff350dbc67a71 100644 --- a/Modules/Filtering/ImageManipulation/test/otbChangeInformationImageFilter.cxx +++ b/Modules/Filtering/ImageManipulation/test/otbChangeInformationImageFilter.cxx @@ -50,13 +50,23 @@ int otbChangeInformationImageFilter(int itkNotUsed(argc), char* argv[]) filter->UpdateOutputInformation(); ImageType::Pointer outImage = filter->GetOutput(); - if (!outImage->GetProjectionRef().empty()) + + // TODO: RemoveOssim. ChangeInformationImageFilter should change the ImageMetadata object stored in + // the image instead of modifying the itk metadata dictionary. GetProjectionRef() look for the + // projection in ImageMetadata now, so we can't use this method in the test. The temporary solution + // is to look in the itk dictionary instead (this was the old behavior of GetProjectionRef). But + // when ChangeInformationImageFilter will be refactored, GetProjectionRef should be used again.. + + //if (!outImage->GetProjectionRef().empty()) + if (outImage->GetMetaDataDictionary().HasKey(otb::MetaDataKey::ProjectionRefKey)) { std::cout << "Projection is supposed to be removed but is still present !" << std::endl; return EXIT_FAILURE; } + itk::MetaDataDictionary& dict = outImage->GetMetaDataDictionary(); + if (!dict.HasKey(otb::MetaDataKey::NoDataValueAvailable) || !dict.HasKey(otb::MetaDataKey::NoDataValue)) { std::cout << "Missing no data metadata !" << std::endl; diff --git a/Modules/Filtering/Projection/include/otbGenericRSResampleImageFilter.hxx b/Modules/Filtering/Projection/include/otbGenericRSResampleImageFilter.hxx index 6f971ebc42c8e69551248ff1738d4ab6520eef7d..9706a6754f134777873d8d3ac82d16e2da19777f 100644 --- a/Modules/Filtering/Projection/include/otbGenericRSResampleImageFilter.hxx +++ b/Modules/Filtering/Projection/include/otbGenericRSResampleImageFilter.hxx @@ -107,6 +107,8 @@ void GenericRSResampleImageFilter<TInputImage, TOutputImage>::GenerateOutputInfo { itk::EncapsulateMetaData<ImageKeywordlist>(dict, MetaDataKey::OSSIMKeywordlistKey, this->GetOutputKeywordList()); } + + this->GetOutput()->SetProjectionRef(this->GetOutputProjectionRef()); } /** diff --git a/Modules/Filtering/Projection/test/otbGenericRSResampleImageFilter.cxx b/Modules/Filtering/Projection/test/otbGenericRSResampleImageFilter.cxx index 13fbd123fc4f37b83940f13096a6cea1a59a8289..e5dddaee19e38fc2894ac6f1ac8c24fc1e014c77 100644 --- a/Modules/Filtering/Projection/test/otbGenericRSResampleImageFilter.cxx +++ b/Modules/Filtering/Projection/test/otbGenericRSResampleImageFilter.cxx @@ -113,10 +113,9 @@ int otbGenericRSResampleImageFilter(int argc, char* argv[]) origin[1] = strtod(argv[4], nullptr); // Origin northing orthoRectifFilter->SetOutputOrigin(origin); - std::string wkt = - otb::SpatialReference::FromUTM(atoi(argv[9]), atoi(argv[10]) ? otb::SpatialReference::hemisphere::north : otb::SpatialReference::hemisphere::south) - .ToWkt(); - orthoRectifFilter->SetOutputProjectionRef(wkt); + auto inputSpatialRef = otb::SpatialReference::FromUTM(atoi(argv[9]), atoi(argv[10]) ? otb::SpatialReference::hemisphere::north : otb::SpatialReference::hemisphere::south); + + orthoRectifFilter->SetOutputProjectionRef(inputSpatialRef.ToWkt()); // Displacement Field spacing VectorImageType::SpacingType gridSpacing; @@ -138,5 +137,15 @@ int otbGenericRSResampleImageFilter(int argc, char* argv[]) writer->SetNumberOfDivisionsTiledStreaming(4); writer->Update(); + auto outputProjectionRef = orthoRectifFilter->GetOutput()->GetProjectionRef(); + if (outputProjectionRef.empty() || + otb::SpatialReference::FromDescription(outputProjectionRef) != inputSpatialRef) + { + std::cout << "Input and output projection don't match. " + << "The output projection is: " + << outputProjectionRef + << std::endl; + return EXIT_FAILURE; + } return EXIT_SUCCESS; } diff --git a/Modules/Filtering/Wavelet/otb-module.cmake b/Modules/Filtering/Wavelet/otb-module.cmake index 840d969469156109476bfc452b68553b9443d538..0c77e9a542730f430c7a2bfc222e144dc3bd0a29 100644 --- a/Modules/Filtering/Wavelet/otb-module.cmake +++ b/Modules/Filtering/Wavelet/otb-module.cmake @@ -24,7 +24,7 @@ otb_module(OTBWavelet DEPENDS OTBCommon OTBITK - OTBObjectList + OTBImageList TEST_DEPENDS OTBImageBase diff --git a/Modules/IO/IOGDAL/include/otbGDALDatasetWrapper.h b/Modules/IO/IOGDAL/include/otbGDALDatasetWrapper.h index fcbdfec299cb44d43820abace24945aadad349fd..e88513a9a71f8c4a693673737691509bab49ff7e 100644 --- a/Modules/IO/IOGDAL/include/otbGDALDatasetWrapper.h +++ b/Modules/IO/IOGDAL/include/otbGDALDatasetWrapper.h @@ -25,6 +25,7 @@ #include "itkObjectFactory.h" #include "otbConfigure.h" +#include "otbGeometryMetadata.h" class GDALDataset; @@ -76,6 +77,9 @@ public: */ size_t GetPixelBytes() const; + Projection::GCPParam GetGCPParam() const; + void SetGCPParam(Projection::GCPParam gcpParam); + protected: GDALDatasetWrapper(); diff --git a/Modules/IO/IOGDAL/include/otbGDALImageIO.h b/Modules/IO/IOGDAL/include/otbGDALImageIO.h index a201530fe4ab6aaaef7c1dc8673fad3fd5dfaa73..65a33def3e8d14c61e4a3ac71762505db46bd436 100644 --- a/Modules/IO/IOGDAL/include/otbGDALImageIO.h +++ b/Modules/IO/IOGDAL/include/otbGDALImageIO.h @@ -28,6 +28,8 @@ /* ITK Libraries */ #include "otbImageIOBase.h" +#include "otbMetadataSupplierInterface.h" +#include "otbMetadataStorageInterface.h" #include "OTBIOGDALExport.h" #include "otbSpatialReference.h" @@ -70,7 +72,10 @@ class GDALDataTypeWrapper; * * \ingroup OTBIOGDAL */ -class OTBIOGDAL_EXPORT GDALImageIO : public otb::ImageIOBase +class OTBIOGDAL_EXPORT GDALImageIO + : public otb::ImageIOBase + , public otb::MetadataSupplierInterface + , public otb::MetadataStorageInterface { public: typedef unsigned char InputPixelType; @@ -196,7 +201,20 @@ public: /** Returns gdal pixel type as string */ std::string GetGdalPixelTypeAsString() const; - itkGetMacro(NbBands, int); + int GetNbBands() const override; + + // MetadataSupplierInterface overrides + + /** Get main image file */ + std::string GetResourceFile(std::string="") const override; + std::vector<std::string> GetResourceFiles() const override; + + /** Get metadata item in GDALDataset, domain can specified as "domain/key" */ + std::string GetMetadataValue(const std::string path, bool& hasValue, int band = -1) const override; + + /** Set metadata item in GDALDataset, domain can specified as prefix of the + * path, like "domain/key"*/ + void SetMetadataValue(const char * path, const char * value, int band=-1) override; /** Set the projection system from EPSG code */ void SetEpsgCode(const unsigned int wellKnownCRS); @@ -211,6 +229,11 @@ protected: /** Destructor.*/ ~GDALImageIO() override; + /** Set the metadata from a Keywordlist*/ + void KeywordlistToMetadata(ImageMetadataBase::Keywordlist, int band=-1); + /** Parses a GDAL Metadata string list to fill a Keywordlist*/ + void GDALMetadataToKeywordlist(const char* const* , ImageMetadataBase::Keywordlist &); + void PrintSelf(std::ostream& os, itk::Indent indent) const override; /** Read all information on the image*/ void InternalReadImageInformation(); @@ -247,6 +270,12 @@ private: */ bool CreationOptionContains(std::string partialOption) const; + /** Dump the ImageMetadata content into GDAL metadata */ + void ExportMetadata(); + + /** Import the ImageMetadata content from GDAL metadata */ + void ImportMetadata(); + /** GDAL parameters. */ typedef itk::SmartPointer<GDALDatasetWrapper> GDALDatasetWrapperPointer; GDALDatasetWrapperPointer m_Dataset; diff --git a/Modules/IO/IOGDAL/include/otbGDALImageMetadataInterface.h b/Modules/IO/IOGDAL/include/otbGDALImageMetadataInterface.h new file mode 100644 index 0000000000000000000000000000000000000000..9f837b32eb67c72c1139fbca52520c67c3a4af72 --- /dev/null +++ b/Modules/IO/IOGDAL/include/otbGDALImageMetadataInterface.h @@ -0,0 +1,64 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef otbGDALImageMetadataInterface_h +#define otbGDALImageMetadataInterface_h + +#include "otbImageMetadataInterfaceBase.h" +#include "otbMetadataStorageInterface.h" +#include "OTBIOGDALExport.h" + +namespace otb +{ + +class OTBIOGDAL_EXPORT GDALImageMetadataInterface : public ImageMetadataInterfaceBase +{ +public: + using Self = GDALImageMetadataInterface; + using Superclass = ImageMetadataInterfaceBase; + using Pointer = itk::SmartPointer<Self>; + using ConstPointer = itk::SmartPointer<const Self>; + + /** Method for creation through the object factory. */ + itkNewMacro(Self); + + /** Run-time type information (and related methods). */ + itkTypeMacro(GDALImageMetadataInterface, ImageMetadataInterface); + + typedef Superclass::ImageType ImageType; + typedef Superclass::MetaDataDictionaryType MetaDataDictionaryType; + typedef Superclass::VectorType VectorType; + typedef Superclass::VariableLengthVectorType VariableLengthVectorType; + typedef Superclass::ImageKeywordlistType ImageKeywordlistType; + + void Parse(const MetadataSupplierInterface *) override; + +protected: + GDALImageMetadataInterface(); + ~GDALImageMetadataInterface() override = default; + +private: + GDALImageMetadataInterface(const Self&) = delete; + void operator=(const Self&) = delete; +}; + +} // end namespace otb + +#endif diff --git a/Modules/IO/IOGDAL/src/CMakeLists.txt b/Modules/IO/IOGDAL/src/CMakeLists.txt index f8c9342fdfdbbda40d4158ebb9f4335152ef0516..fe13c4c0416aae3612dfae1c904fbbcc625a2f52 100644 --- a/Modules/IO/IOGDAL/src/CMakeLists.txt +++ b/Modules/IO/IOGDAL/src/CMakeLists.txt @@ -27,6 +27,7 @@ set(OTBIOGDAL_SRC otbOGRIOHelper.cxx otbOGRVectorDataIO.cxx otbOGRVectorDataIOFactory.cxx + otbGDALImageMetadataInterface.cxx ) add_library(OTBIOGDAL ${OTBIOGDAL_SRC}) diff --git a/Modules/IO/IOGDAL/src/otbGDALDatasetWrapper.cxx b/Modules/IO/IOGDAL/src/otbGDALDatasetWrapper.cxx index cb8a3da71f6d865f22cc9abe68db88b2579893d1..bf92492c26bc072656d3248a867de9516174c75b 100644 --- a/Modules/IO/IOGDAL/src/otbGDALDatasetWrapper.cxx +++ b/Modules/IO/IOGDAL/src/otbGDALDatasetWrapper.cxx @@ -151,4 +151,42 @@ size_t GDALDatasetWrapper::GetPixelBytes() const return size; } +Projection::GCPParam GDALDatasetWrapper::GetGCPParam() const +{ + Projection::GCPParam gcpParam; + gcpParam.GCPProjection = std::string(m_Dataset->GetGCPProjection()); + for ( const GDAL_GCP *gcps = m_Dataset->GetGCPs() ; gcps != gcps + m_Dataset->GetGCPCount() ; ++gcps) + { + gcpParam.GCPs.push_back(GCP(std::string(gcps->pszId), + std::string(gcps->pszInfo), + gcps->dfGCPPixel, + gcps->dfGCPLine, + gcps->dfGCPX, + gcps->dfGCPY, + gcps->dfGCPZ)); + } + return gcpParam; +} + +void GDALDatasetWrapper::SetGCPParam(Projection::GCPParam gcpParam) +{ + int nGCPCount = gcpParam.GCPs.size(); + auto gcps = std::vector<GDAL_GCP>(nGCPCount); + + auto gcpIt = gcps.begin(); + for (auto otbGcpIt = gcpParam.GCPs.cbegin() ; otbGcpIt != gcpParam.GCPs.cend() ; ++otbGcpIt, gcpIt++) + { + GDAL_GCP gdalGcp; + gdalGcp.pszId = const_cast<char*>(otbGcpIt->m_Id.c_str()); + gdalGcp.pszInfo = const_cast<char*>(otbGcpIt->m_Info.c_str()); + gdalGcp.dfGCPPixel = otbGcpIt->m_GCPCol; + gdalGcp.dfGCPLine = otbGcpIt->m_GCPRow; + gdalGcp.dfGCPX = otbGcpIt->m_GCPX; + gdalGcp.dfGCPY = otbGcpIt->m_GCPY; + gdalGcp.dfGCPZ = otbGcpIt->m_GCPZ; + *gcpIt = gdalGcp; + } + m_Dataset->SetGCPs(nGCPCount, gcps.data(), gcpParam.GCPProjection.c_str()); +} + } // end namespace otb diff --git a/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx b/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx index 96dd0436399f76c2462300d104b3e77f820c7080..1018f930528afb32bef85acec4ae6ebf39b42956 100644 --- a/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx +++ b/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx @@ -42,11 +42,16 @@ #include "ogr_spatialref.h" #include "ogr_srs_api.h" + +#include "itksys/RegularExpression.hxx" + #include "otbGDALDriverManagerWrapper.h" #include "otb_boost_string_header.h" #include "otbOGRHelpers.h" +#include "otbGeometryMetadata.h" +#include "otbConfigure.h" #include "stdint.h" //needed for uintptr_t @@ -115,7 +120,7 @@ GDALImageIO::GDALImageIO() m_NumberOfOverviews = 0; m_ResolutionFactor = 0; m_BytePerPixel = 0; - m_WriteRPCTags = false; + m_WriteRPCTags = true; m_epsgCode = 0; } @@ -484,9 +489,6 @@ void GDALImageIO::InternalReadImageInformation() tempSize.first = GDALGetRasterBandXSize(dataset->GetRasterBand(1)->GetOverview(iOverview)); tempSize.second = GDALGetRasterBandYSize(dataset->GetRasterBand(1)->GetOverview(iOverview)); m_OverviewsSize.push_back(tempSize); - - /*std::cout << "Overviews size of input file" << m_FileName << ": " - << m_OverviewsSize.back().first << " x " << m_OverviewsSize.back().second << std::endl; */ } this->SetNumberOfComponents(m_NbBands); @@ -675,6 +677,10 @@ void GDALImageIO::InternalReadImageInformation() // Now initialize the itk dictionary itk::MetaDataDictionary& dict = this->GetMetaDataDictionary(); + // Initialize the ImageMetadata structure + ImageMetadata imd; + m_Imd = imd; + // Report the typical block size if possible if (dataset->GetRasterCount() > 0) { @@ -699,6 +705,9 @@ void GDALImageIO::InternalReadImageInformation() itk::EncapsulateMetaData<unsigned int>(dict, MetaDataKey::TileHintX, blockSizeX); itk::EncapsulateMetaData<unsigned int>(dict, MetaDataKey::TileHintY, blockSizeY); + + m_Imd.NumericKeys[MDNum::TileHintX] = blockSizeX; + m_Imd.NumericKeys[MDNum::TileHintY] = blockSizeY; } } @@ -708,6 +717,8 @@ void GDALImageIO::InternalReadImageInformation() itk::EncapsulateMetaData<IOComponentType>(dict, MetaDataKey::DataType, this->GetComponentType()); + m_Imd.NumericKeys[MDNum::DataType] = this->GetComponentType(); + /* -------------------------------------------------------------------- */ /* Get Spacing */ /* -------------------------------------------------------------------- */ @@ -768,11 +779,14 @@ void GDALImageIO::InternalReadImageInformation() itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, static_cast<std::string>(pszPrettyWkt)); + m_Imd.Add(MDGeom::ProjectionWKT, std::string(pszPrettyWkt)); + CPLFree(pszPrettyWkt); } else { itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, static_cast<std::string>(pszProjection)); + m_Imd.Add(MDGeom::ProjectionWKT, std::string(pszProjection)); } if (pSR != nullptr) @@ -799,6 +813,7 @@ void GDALImageIO::InternalReadImageInformation() if (gcpCount > 0) { std::string gcpProjectionKey; + Projection::GCPParam gcps; { // Declare gcpProj in local scope. So, it won't be available outside. @@ -812,6 +827,8 @@ void GDALImageIO::InternalReadImageInformation() itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::GCPProjectionKey, gcpProjectionKey); + gcps.GCPProjection = gcpProjectionKey; + if (gcpProjectionKey.empty()) { gcpCount = 0; // fix for uninitialized gcpCount in gdal (when @@ -828,7 +845,7 @@ void GDALImageIO::InternalReadImageInformation() const GDAL_GCP* psGCP; psGCP = dataset->GetGCPs() + cpt; - OTB_GCP pOtbGCP; + GCP pOtbGCP; pOtbGCP.m_Id = std::string(psGCP->pszId); pOtbGCP.m_Info = std::string(psGCP->pszInfo); pOtbGCP.m_GCPRow = psGCP->dfGCPLine; @@ -842,8 +859,10 @@ void GDALImageIO::InternalReadImageInformation() lStream << MetaDataKey::GCPParametersKey << cpt; key = lStream.str(); - itk::EncapsulateMetaData<OTB_GCP>(dict, key, pOtbGCP); + itk::EncapsulateMetaData<GCP>(dict, key, pOtbGCP); + gcps.GCPs.push_back(pOtbGCP); } + m_Imd.Add(MDGeom::GCP, gcps); } /* -------------------------------------------------------------------- */ @@ -856,7 +875,10 @@ void GDALImageIO::InternalReadImageInformation() if (dataset->GetGeoTransform(adfGeoTransform) == CE_None) { for (int cpt = 0; cpt < 6; ++cpt) + { VadfGeoTransform.push_back(adfGeoTransform[cpt]); + //~ m_Imd.GeoTransform[cpt] = adfGeoTransform[cpt]; + } itk::EncapsulateMetaData<MetaDataKey::VectorType>(dict, MetaDataKey::GeoTransformKey, VadfGeoTransform); @@ -977,6 +999,8 @@ void GDALImageIO::InternalReadImageInformation() VGeo.push_back(GeoY); itk::EncapsulateMetaData<MetaDataKey::VectorType>(dict, MetaDataKey::UpperLeftCornerKey, VGeo); + //~ m_Imd.ULX = GeoX; + //~ m_Imd.ULY = GeoY; VGeo.clear(); @@ -985,6 +1009,8 @@ void GDALImageIO::InternalReadImageInformation() VGeo.push_back(GeoY); itk::EncapsulateMetaData<MetaDataKey::VectorType>(dict, MetaDataKey::UpperRightCornerKey, VGeo); + //~ m_Imd.URX = GeoX; + //~ m_Imd.URY = GeoY; VGeo.clear(); @@ -993,6 +1019,8 @@ void GDALImageIO::InternalReadImageInformation() VGeo.push_back(GeoY); itk::EncapsulateMetaData<MetaDataKey::VectorType>(dict, MetaDataKey::LowerLeftCornerKey, VGeo); + //~ m_Imd.LLX = GeoX; + //~ m_Imd.LLY = GeoY; VGeo.clear(); @@ -1001,6 +1029,8 @@ void GDALImageIO::InternalReadImageInformation() VGeo.push_back(GeoY); itk::EncapsulateMetaData<MetaDataKey::VectorType>(dict, MetaDataKey::LowerRightCornerKey, VGeo); + //~ m_Imd.LRX = GeoX; + //~ m_Imd.LRY = GeoY; VGeo.clear(); @@ -1069,6 +1099,7 @@ void GDALImageIO::InternalReadImageInformation() std::vector<double> noDataValues(dataset->GetRasterCount(), 0); bool noDataFound = false; + ImageMetadataBase bmd; for (int iBand = 0; iBand < dataset->GetRasterCount(); iBand++) { @@ -1083,7 +1114,9 @@ void GDALImageIO::InternalReadImageInformation() noDataFound = true; isNoDataAvailable[iBand] = true; noDataValues[iBand] = ndv; + bmd.Add(MDNum::NoData, ndv); } + m_Imd.Bands.push_back(bmd); } if (noDataFound) @@ -1261,6 +1294,27 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer) // char ** papszOptions = NULL; std::string driverShortName; m_NbBands = this->GetNumberOfComponents(); + + // If the band mapping is different from the one of the input (e.g. because an extended filename + // has been set, the bands in the imageMetadata object needs to be reorganized. + if (!m_BandList.empty()) + { + ImageMetadata::ImageMetadataBandsType bandRangeMetadata; + for (auto elem: m_BandList) + { + bandRangeMetadata.push_back(m_Imd.Bands[elem]); + } + m_Imd.Bands = bandRangeMetadata; + } + + // TODO : this should be a warning instead of an exception + // For complex pixels the number of bands is twice the number of compnents (in GDAL sense) + if ( !m_Imd.Bands.empty() + && static_cast<std::size_t>(m_NbBands) != m_Imd.Bands.size() + && !((m_Imd.Bands.size() == static_cast<std::size_t>(2 * m_NbBands)) && this->GetPixelType() == COMPLEX)) + { + itkExceptionMacro(<< "Number of bands in metadata inconsistent with actual image."); + } if ((m_Dimensions[0] == 0) && (m_Dimensions[1] == 0)) { @@ -1410,18 +1464,9 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer) /*-------------------------- METADATA ----------------------------------*/ /*----------------------------------------------------------------------*/ - // Now initialize the itk dictionary - itk::MetaDataDictionary& dict = this->GetMetaDataDictionary(); std::ostringstream oss; GDALDataset* dataset = m_Dataset->GetDataSet(); - std::string projectionRef; - itk::ExposeMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, projectionRef); - ImageKeywordlist otb_kwl; - itk::ExposeMetaData<ImageKeywordlist>(dict, MetaDataKey::OSSIMKeywordlistKey, otb_kwl); - unsigned int gcpCount = 0; - itk::ExposeMetaData<unsigned int>(dict, MetaDataKey::GCPCountKey, gcpCount); - // In OTB we can have simultaneously projection ref, sensor keywordlist, GCPs // but GDAL can't handle both geotransform and GCP (see issue #303). Here is the priority // order we will be using in OTB: @@ -1448,16 +1493,53 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer) std::abs(geoTransform[4]) > Epsilon || std::abs(geoTransform[5] - 1.0) > Epsilon; + itk::MetaDataDictionary& dict = this->GetMetaDataDictionary(); + ImageKeywordlist otb_kwl; + itk::ExposeMetaData<ImageKeywordlist>(dict, MetaDataKey::OSSIMKeywordlistKey, otb_kwl); + /* -------------------------------------------------------------------- */ /* Case 1: Set the projection coordinate system of the image */ /* -------------------------------------------------------------------- */ - if (!projectionRef.empty()) + if (m_Imd.Has(MDGeom::ProjectionWKT)) { + std::string projectionRef( m_Imd.GetProjectionWKT() ); dataset->SetProjection(projectionRef.c_str()); } /* -------------------------------------------------------------------- */ - /* Case 2: Sensor keywordlist */ + /* Case 2: Sensor geometry */ /* -------------------------------------------------------------------- */ + else if (m_Imd.HasSensorGeometry()) + { + /* -------------------------------------------------------------------- */ + /* Set the RPC coeffs (since GDAL 1.10.0) */ + /* -------------------------------------------------------------------- */ + if (m_WriteRPCTags && m_Imd.Has(MDGeom::RPC)) + { + const Projection::RPCParam & rpc = boost::any_cast<const Projection::RPCParam&>(m_Imd[MDGeom::RPC]); + otbLogMacro(Debug, << "Saving RPC to file (" << m_FileName << ")") + GDALRPCInfo gdalRpcStruct; + gdalRpcStruct.dfSAMP_OFF = rpc.SampleOffset; + gdalRpcStruct.dfLINE_OFF = rpc.LineOffset; + gdalRpcStruct.dfSAMP_SCALE = rpc.SampleScale; + gdalRpcStruct.dfLINE_SCALE = rpc.LineScale; + gdalRpcStruct.dfLAT_OFF = rpc.LatOffset; + gdalRpcStruct.dfLONG_OFF = rpc.LonOffset; + gdalRpcStruct.dfHEIGHT_OFF = rpc.HeightOffset; + gdalRpcStruct.dfLAT_SCALE = rpc.LatScale; + gdalRpcStruct.dfLONG_SCALE = rpc.LonScale; + gdalRpcStruct.dfHEIGHT_SCALE = rpc.HeightScale; + + memcpy(gdalRpcStruct.adfLINE_NUM_COEFF, rpc.LineNum, sizeof(double) * 20); + memcpy(gdalRpcStruct.adfLINE_DEN_COEFF, rpc.LineDen, sizeof(double) * 20); + memcpy(gdalRpcStruct.adfSAMP_NUM_COEFF, rpc.SampleNum, sizeof(double) * 20); + memcpy(gdalRpcStruct.adfSAMP_DEN_COEFF, rpc.SampleDen, sizeof(double) * 20); + char** rpcMetadata = RPCInfoToMD(&gdalRpcStruct); + dataset->SetMetadata(rpcMetadata, "RPC"); + CSLDestroy(rpcMetadata); + } + } + // ToDo : remove this part. This case is here for compatibility for images + // that still use Ossim for managing the sensor model (with OSSIMKeywordList). else if (otb_kwl.GetSize()) { /* -------------------------------------------------------------------- */ @@ -1478,20 +1560,15 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer) /* -------------------------------------------------------------------- */ /* Case 3: Set the GCPs */ /* -------------------------------------------------------------------- */ - else if (gcpCount) + else if (m_Imd.Has(MDGeom::GCP)) { otbLogMacro(Debug, << "Saving GCPs to file (" << m_FileName << ")") - std::vector<GDAL_GCP> gdalGcps(gcpCount); - std::vector<OTB_GCP> otbGcps(gcpCount); - for (unsigned int gcpIndex = 0; gcpIndex < gcpCount; ++gcpIndex) + const Projection::GCPParam & gcpPrm = + boost::any_cast<const Projection::GCPParam&>(m_Imd[MDGeom::GCP]); + std::vector<GDAL_GCP> gdalGcps(gcpPrm.GCPs.size()); + for (unsigned int gcpIndex = 0; gcpIndex < gdalGcps.size(); ++gcpIndex) { - // Build the GCP string in the form of GCP_n - std::ostringstream lStream; - lStream << MetaDataKey::GCPParametersKey << gcpIndex; - std::string key = lStream.str(); - - OTB_GCP &gcp = otbGcps[gcpIndex]; - itk::ExposeMetaData<OTB_GCP>(dict, key, gcp); + const GCP &gcp = gcpPrm.GCPs[gcpIndex]; gdalGcps[gcpIndex].pszId = const_cast<char*>(gcp.m_Id.c_str()); gdalGcps[gcpIndex].pszInfo = const_cast<char*>(gcp.m_Info.c_str()); @@ -1510,10 +1587,8 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer) } } - std::string gcpProjectionRef; - itk::ExposeMetaData<std::string>(dict, MetaDataKey::GCPProjectionKey, gcpProjectionRef); - - dataset->SetGCPs(gcpCount, gdalGcps.data(), gcpProjectionRef.c_str()); + const std::string & gcpProjectionRef = gcpPrm.GCPProjection; + dataset->SetGCPs(gdalGcps.size(), gdalGcps.data(), gcpProjectionRef.c_str()); // disable geotransform with GCP writeGeotransform = false; @@ -1535,45 +1610,24 @@ void GDALImageIO::InternalWriteImageInformation(const void* buffer) /* -------------------------------------------------------------------- */ /* Report metadata. */ /* -------------------------------------------------------------------- */ + ExportMetadata(); - std::string svalue = ""; - std::vector<std::string> keys = dict.GetKeys(); - std::string const metadataKey = MetaDataKey::MetadataKey; - - for (unsigned int itkey = 0; itkey < keys.size(); ++itkey) - { - /// \todo Why not <tt>keys[itkey] == MetadataKey::MetadataKey</tt> ? - if (keys[itkey].compare(0, metadataKey.length(), metadataKey) == 0) - { - itk::ExposeMetaData<std::string>(dict, keys[itkey], svalue); - unsigned int equalityPos = svalue.find_first_of('='); - std::string tag = svalue.substr(0, equalityPos); - std::string value = svalue.substr(equalityPos + 1); - dataset->SetMetadataItem(tag.c_str(), value.c_str(), nullptr); - } - } - - - // END - - // Write no-data flags - std::vector<bool> noDataValueAvailable; - bool ret = itk::ExposeMetaData<std::vector<bool>>(dict, MetaDataKey::NoDataValueAvailable, noDataValueAvailable); - - std::vector<double> noDataValues; - itk::ExposeMetaData<std::vector<double>>(dict, MetaDataKey::NoDataValue, noDataValues); - - if (ret) - { - for (int iBand = 0; iBand < dataset->GetRasterCount(); iBand++) + /* -------------------------------------------------------------------- */ + /* No Data. */ + /* -------------------------------------------------------------------- */ + + // Write no-data flags from ImageMetadata + int iBand = 0; + for (auto const& bandMD : m_Imd.Bands) { - if (noDataValueAvailable[iBand]) + if (bandMD.Has(MDNum::NoData)) { - dataset->GetRasterBand(iBand + 1)->SetNoDataValue(noDataValues[iBand]); + dataset->GetRasterBand(iBand + 1)->SetNoDataValue(bandMD[MDNum::NoData]); } + ++iBand; } - } + // Write no-data flags from extended filenames for (auto const& noData : m_NoDataList) dataset->GetRasterBand(noData.first)->SetNoDataValue(noData.second); } @@ -1751,4 +1805,218 @@ std::string GDALImageIO::GetGdalPixelTypeAsString() const return name; } +int GDALImageIO::GetNbBands() const +{ + return m_Dataset->GetDataSet()->GetRasterCount(); +} + +std::string GDALImageIO::GetResourceFile(std::string str) const +{ + if (str.empty()) + return m_FileName; + + itksys::RegularExpression reg; + reg.compile(str); + for (auto & filename : GetResourceFiles()) + if (reg.find(filename)) + return filename; + + return std::string(""); +} + +std::vector<std::string> GDALImageIO::GetResourceFiles() const +{ + std::vector<std::string> result; + for (char ** file = this->m_Dataset->GetDataSet()->GetFileList() ; *file != nullptr ; ++ file) + result.push_back(*file); + return result; +} + +std::string GDALImageIO::GetMetadataValue(const std::string path, bool& hasValue, int band) const +{ + // detect namespace if any + std::string domain(""); + std::string key(path); + std::size_t found = path.find_first_of("/"); + if (found != std::string::npos) + { + domain = path.substr(0, found); + key = path.substr(found + 1); + } + + const char* ret; + if (band >= 0) + ret = m_Dataset->GetDataSet()->GetRasterBand(band+1)->GetMetadataItem(key.c_str(), domain.c_str()); + else + ret = m_Dataset->GetDataSet()->GetMetadataItem(key.c_str(), domain.c_str()); + if (ret) + hasValue = true; + else + { + hasValue = false; + ret = ""; + } + return std::string(ret); +} + +void GDALImageIO::SetMetadataValue(const char * path, const char * value, int band) +{ + // detect namespace if any + const char *slash = strchr(path,'/'); + std::string domain(""); + const char *domain_c = nullptr; + std::string key(path); + if (slash) + { + domain = std::string(path, (slash-path)); + domain_c = domain.c_str(); + key = std::string(slash+1); + } + if (band >= 0) + { + m_Dataset->GetDataSet()->GetRasterBand(band+1)->SetMetadataItem(key.c_str(), value, domain_c); + } + else + { + m_Dataset->GetDataSet()->SetMetadataItem(key.c_str(), value, domain_c); + } +} + + +void GDALImageIO::ExportMetadata() +{ + SetMetadataValue("METADATATYPE", "OTB"); + SetMetadataValue("OTB_VERSION", OTB_VERSION_STRING ); + + // TODO: finish implementation: filter the keys MDGeom::SensorGeometry that + // will be exported as '<typename>' (boost::any). The (future) SensorModelFactory should + // be used to detect and export properly the field MDGeom::SensorGeometry into a string + // keywordlist. Note that the keys generated for this sensor geometry should + // be prefixed by: MDGeomNames[MDGeom::SensorGeometry] + '.' + ImageMetadataBase::Keywordlist kwl; + m_Imd.ToKeywordlist(kwl); + KeywordlistToMetadata(kwl); + + int bIdx = 0; + for (const auto& band : m_Imd.Bands) + { + band.ToKeywordlist(kwl); + KeywordlistToMetadata(kwl, bIdx); + ++bIdx; + } +} + +void GDALImageIO::ImportMetadata() +{ + // TODO + // Check special value METADATATYPE=OTB before continue processing + // Keys Starting with: MDGeomNames[MDGeom::SensorGeometry] + '.' should + // be decoded by the (future) SensorModelFactory. + // Use ImageMetadataBase::FromKeywordlist to ingest the metadata + bool hasValue; + if (std::string(GetMetadataValue("METADATATYPE", hasValue)) != "OTB") + return; + ImageMetadataBase::Keywordlist kwl; + GDALMetadataToKeywordlist(m_Dataset->GetDataSet()->GetMetadata(), kwl); + m_Imd.FromKeywordlist(kwl); + // GCPs are imported directly in the ImageMetadata. + m_Imd.Add(MDGeom::GCP, m_Dataset->GetGCPParam()); + // Parsing the bands + for (int band = 0 ; band < m_NbBands ; ++band) + { + kwl.clear(); + GDALMetadataToKeywordlist(m_Dataset->GetDataSet()->GetRasterBand(band+1)->GetMetadata(), kwl); + m_Imd.Bands[band].FromKeywordlist(kwl); + } +} + +void GDALImageIO::KeywordlistToMetadata(ImageMetadataBase::Keywordlist kwl, int band) +{ + for (const auto& kv : kwl) + { + if (kv.first == MetaData::MDGeomNames.left.at(MDGeom::SensorGeometry)) + { + SetMetadataValue("MDGeomNames[MDGeom::SensorGeometry].", kv.second.c_str(), band); + } + else if (kv.first == MetaData::MDGeomNames.left.at(MDGeom::RPC)) + { + // RPC Models are exported directly from the ImageMetadata. + Projection::RPCParam rpcStruct = boost::any_cast<Projection::RPCParam>(m_Imd[MDGeom::RPC]); + this->SetAs("RPC/LINE_OFF", rpcStruct.LineOffset); + this->SetAs("RPC/SAMP_OFF", rpcStruct.SampleOffset); + this->SetAs("RPC/LAT_OFF", rpcStruct.LatOffset); + this->SetAs("RPC/LONG_OFF", rpcStruct.LonOffset); + this->SetAs("RPC/HEIGHT_OFF", rpcStruct.HeightOffset); + + this->SetAs("RPC/LINE_SCALE", rpcStruct.LineScale); + this->SetAs("RPC/SAMP_SCALE", rpcStruct.SampleScale); + this->SetAs("RPC/LAT_SCALE", rpcStruct.LatScale); + this->SetAs("RPC/LONG_SCALE", rpcStruct.LonScale); + this->SetAs("RPC/HEIGHT_SCALE", rpcStruct.HeightScale); + + this->SetAsVector("RPC/LINE_NUM_COEFF", std::vector<double> (rpcStruct.LineNum, rpcStruct.LineNum + 20 / sizeof(double)), ' '); + this->SetAsVector("RPC/LINE_DEN_COEFF", std::vector<double> (rpcStruct.LineDen, rpcStruct.LineDen + 20 / sizeof(double)), ' '); + this->SetAsVector("RPC/SAMP_NUM_COEFF", std::vector<double> (rpcStruct.SampleNum, rpcStruct.SampleNum + 20 / sizeof(double)), ' '); + this->SetAsVector("RPC/SAMP_DEN_COEFF", std::vector<double> (rpcStruct.SampleDen, rpcStruct.SampleDen + 20 / sizeof(double)), ' '); + } + // Note that GCPs have already been exported + SetMetadataValue(kv.first.c_str(), kv.second.c_str(), band); + } +} + +void GDALImageIO::GDALMetadataToKeywordlist(const char* const* metadataList, ImageMetadataBase::Keywordlist &kwl) +{ + // The GDAL metadata string list is formatted as a “Name=value†list with the last pointer value being NULL. + for ( ; *metadataList != nullptr ; ++metadataList ) + { + std::string metadataLine = std::string(*metadataList); + // The key and the value are separated by the '=' symbol + std::string::size_type pos = metadataLine.find('='); + std::string fieldName = metadataLine.substr(0, pos); + std::string fieldValue = metadataLine.substr(pos+1); + + if((fieldName.size() > 36) && (fieldName.substr(0, 36) == "MDGeomNames[MDGeom::SensorGeometry].")) + { + // Sensor Geometry is imported directly in the ImageMetadata. + // TODO: Keys Starting with: MDGeomNames[MDGeom::SensorGeometry] + '.' should + // be decoded by the (future) SensorModelFactory. + } + else if (fieldName == MetaData::MDGeomNames.left.at(MDGeom::RPC)) + { + // RPC Models are imported directly in the ImageMetadata. + Projection::RPCParam rpcStruct; + rpcStruct.LineOffset = this->GetAs<double>("RPC/LINE_OFF"); + rpcStruct.SampleOffset = this->GetAs<double>("RPC/SAMP_OFF"); + rpcStruct.LatOffset = this->GetAs<double>("RPC/LAT_OFF"); + rpcStruct.LonOffset = this->GetAs<double>("RPC/LONG_OFF"); + rpcStruct.HeightOffset = this->GetAs<double>("RPC/HEIGHT_OFF"); + + rpcStruct.LineScale = this->GetAs<double>("RPC/LINE_SCALE"); + rpcStruct.SampleScale = this->GetAs<double>("RPC/SAMP_SCALE"); + rpcStruct.LatScale = this->GetAs<double>("RPC/LAT_SCALE"); + rpcStruct.LonScale = this->GetAs<double>("RPC/LONG_SCALE"); + rpcStruct.HeightScale = this->GetAs<double>("RPC/HEIGHT_SCALE"); + + std::vector<double> coeffs(20); + + coeffs = this->GetAsVector<double>("RPC/LINE_NUM_COEFF",' ',20); + std::copy(coeffs.begin(), coeffs.end(), rpcStruct.LineNum); + + coeffs = this->GetAsVector<double>("RPC/LINE_DEN_COEFF",' ',20); + std::copy(coeffs.begin(), coeffs.end(), rpcStruct.LineDen); + + coeffs = this->GetAsVector<double>("RPC/SAMP_NUM_COEFF",' ',20); + std::copy(coeffs.begin(), coeffs.end(), rpcStruct.SampleNum); + + coeffs = this->GetAsVector<double>("RPC/SAMP_DEN_COEFF",' ',20); + std::copy(coeffs.begin(), coeffs.end(), rpcStruct.SampleDen); + + m_Imd.Add(MDGeom::RPC, rpcStruct); + } + else + kwl.emplace(fieldName, fieldValue); + } +} + + } // end namespace otb diff --git a/Modules/IO/IOGDAL/src/otbGDALImageMetadataInterface.cxx b/Modules/IO/IOGDAL/src/otbGDALImageMetadataInterface.cxx new file mode 100644 index 0000000000000000000000000000000000000000..47b8d1002a89672b2befa11ba6d69311c4492ce7 --- /dev/null +++ b/Modules/IO/IOGDAL/src/otbGDALImageMetadataInterface.cxx @@ -0,0 +1,36 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "otbGDALImageMetadataInterface.h" + +namespace otb +{ + +GDALImageMetadataInterface::GDALImageMetadataInterface() +{ +} + +void +GDALImageMetadataInterface::Parse(const MetadataSupplierInterface *) +{ + otbGenericExceptionMacro(MissingMetadataException,<<"Metadata parsing not implemented") +} + +} // end namespace otb diff --git a/Modules/IO/IOGDAL/test/CMakeLists.txt b/Modules/IO/IOGDAL/test/CMakeLists.txt index ca4b3b01a385a691a1207e2b142b0870f17f56c3..9c239d2514cb3fb2097e59ed7749aad98d68a89a 100644 --- a/Modules/IO/IOGDAL/test/CMakeLists.txt +++ b/Modules/IO/IOGDAL/test/CMakeLists.txt @@ -31,6 +31,7 @@ otbGDALReadPxlComplex.cxx otbGDALImageIOTestCanRead.cxx otbMultiDatasetReadingInfo.cxx otbOGRVectorDataIOCanRead.cxx +otbGDALImageIOImportExportMetadata.cxx ) add_executable(otbIOGDALTestDriver ${OTBIOGDALTests}) @@ -128,6 +129,16 @@ otb_add_test(NAME ioTvGDALImageIOWriteMetadata COMMAND otbIOGDALTestDriver ${TEMP}/ioTvGDALImageIOWriteMetadata.hdr ${TEMP}/ioTvGDALImageIOWriteMetadata_Report.txt ) + +# TODO implement this test +# otb_add_test(NAME ioTvGDALImageIOImportExportMetadata_JPEG_99 COMMAND otbIOGDALTestDriver +# --compare-ascii ${NOTOL} ${BASELINE_FILES}/ioTvGDALImageIOImportExportMetadata_JPEG_99.txt +# ${TEMP}/ioTvGDALImageIOImportExportMetadata_JPEG_99.txt +# otbGDALImageIOImportExportMetadata +# ${INPUTDATA}/maur_rgb_24bpp.tif +# ${TEMP}/ioTvGDALImageIOImportExportMetadata_JPEG_99.tif +# ${TEMP}/ioTvGDALImageIOImportExportMetadata_JPEG_99.txt +# ) otb_add_test(NAME ioTvGDALOverviewsBuilder_TIFF COMMAND otbIOGDALTestDriver otbGDALOverviewsBuilder diff --git a/Modules/IO/IOGDAL/test/otbGDALImageIOImportExportMetadata.cxx b/Modules/IO/IOGDAL/test/otbGDALImageIOImportExportMetadata.cxx new file mode 100644 index 0000000000000000000000000000000000000000..c06580b4bd56ba79dd98779d000f66b227ed9150 --- /dev/null +++ b/Modules/IO/IOGDAL/test/otbGDALImageIOImportExportMetadata.cxx @@ -0,0 +1,52 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + + +#include "itkMacro.h" +#include <iostream> + +#include "otbGDALImageIO.h" + +//struct sGDALImageIO : public GDALImageIO +//{ +// +//}; + +int otbGDALImageIOImportExportMetadata(int itkNotUsed(argc), char* argv[]) +{ + // Verify the number of parameters in the command line + const char* inputFilename = argv[1]; + const char* outputFilename = argv[2]; + const char* outputTextFilename = argv[3]; + + std::ofstream outfile(outputTextFilename); + +// otb::sGDALImageIO::Pointer io = otb::sGDALImageIO::New(); +// io->CanReadFile(inputFilename); +// io->ImportMetadata(); +// outfile << io->m_Imd; +// +// otb::sGDALImageIO::Pointer io2 = otb::sGDALImageIO::New(); +// io2.CarWriteFile(outputFilename); +// io2->m_Imd = io->m_Imd; +// io2.ExportMetadata(); + + return EXIT_SUCCESS; +} diff --git a/Modules/IO/IOGDAL/test/otbIOGDALTestDriver.cxx b/Modules/IO/IOGDAL/test/otbIOGDALTestDriver.cxx index 04dd3d2846837d4296ca9106c21f52f1caa67c48..5458ac35a60dc97dea80a6f36e8b91db43066c6f 100644 --- a/Modules/IO/IOGDAL/test/otbIOGDALTestDriver.cxx +++ b/Modules/IO/IOGDAL/test/otbIOGDALTestDriver.cxx @@ -33,4 +33,5 @@ void RegisterTests() REGISTER_TEST(otbGDALImageIOTestCanRead); REGISTER_TEST(otbMultiDatasetReadingInfo); REGISTER_TEST(otbOGRVectorDataIOTestCanRead); + REGISTER_TEST(otbGDALImageIOImportExportMetadata); } diff --git a/Modules/IO/ImageIO/include/otbImageFileReader.hxx b/Modules/IO/ImageIO/include/otbImageFileReader.hxx index 9ed544879075d0a5976e9abc426d3baba6412d56..6452070af1f3664982b95b0223486868c31af9ab 100644 --- a/Modules/IO/ImageIO/include/otbImageFileReader.hxx +++ b/Modules/IO/ImageIO/include/otbImageFileReader.hxx @@ -37,6 +37,9 @@ #include "otbConvertPixelBuffer.h" #include "otbImageIOFactory.h" #include "otbMetaDataKey.h" +#include "otbImageMetadata.h" +#include "otbImageMetadataInterfaceFactory.h" +#include "otbImageCommons.h" #include "otbMacro.h" @@ -385,6 +388,12 @@ void ImageFileReader<TOutputImage, ConvertPixelTraits>::GenerateOutputInformatio output->SetDirection(direction); // Set the image direction cosines output->SetSpacing(spacing); // Set the image spacing + // detect Image supporting new ImageMetadata + ImageCommons* img_common = dynamic_cast<ImageCommons*>(this->GetOutput()); + + // Get ImageMetadata from ImageIO + ImageMetadata imd = m_ImageIO->GetImageMetadata(); + if (!m_KeywordListUpToDate && !m_FilenameHelper->GetSkipGeom()) { @@ -434,6 +443,13 @@ void ImageFileReader<TOutputImage, ConvertPixelTraits>::GenerateOutputInformatio otbLogMacro(Debug, << "No kwl metadata found in file " << lFileNameOssimKeywordlist); } } + MetadataSupplierInterface* mds = dynamic_cast<MetadataSupplierInterface*>(m_ImageIO.GetPointer()); + if (mds) + { + ImageMetadataInterfaceBase::Pointer imi = ImageMetadataInterfaceFactory::CreateIMI(imd, mds); + // update 'imd' with the parsed metadata + imd = imi->GetImageMetadata(); + } } // Don't add an empty ossim keyword list @@ -490,16 +506,31 @@ void ImageFileReader<TOutputImage, ConvertPixelTraits>::GenerateOutputInformatio itk::ExposeMetaData<ImageKeywordlist>(this->GetOutput()->GetMetaDataDictionary(), MetaDataKey::OSSIMKeywordlistKey, otb_kwl); // And add to new one itk::EncapsulateMetaData<ImageKeywordlist>(dict, MetaDataKey::OSSIMKeywordlistKey, otb_kwl); - } + if (m_KeywordListUpToDate) + { + // Read back from existing dictionary + if (img_common != nullptr) + { + imd = img_common->GetImageMetadata(); + } + } + if (m_FilenameHelper->GetSkipGeom()) + { + // Make sure the SensorGeometry is empty + imd.RemoveSensorGeometry(); + } + } // If Skip ProjectionRef is activated, remove ProjRef from dict if (m_FilenameHelper->GetSkipCarto()) { itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, ""); + imd.RemoveProjectedGeometry(); } // Copy MetaDataDictionary from instantiated reader to output image. + // TODO: disable when Ossim removed if (!m_FilenameHelper->GetSkipGeom()) { output->SetMetaDataDictionary(this->m_ImageIO->GetMetaDataDictionary()); @@ -514,7 +545,7 @@ void ImageFileReader<TOutputImage, ConvertPixelTraits>::GenerateOutputInformatio output->SetMetaDataDictionary(dictLight); this->SetMetaDataDictionary(dictLight); } - + IndexType start; start.Fill(0); @@ -533,9 +564,25 @@ void ImageFileReader<TOutputImage, ConvertPixelTraits>::GenerateOutputInformatio // invalid range itkGenericExceptionMacro("The given band range is either empty or invalid for a " << m_IOComponents << " bands input image!"); } + // ImageIO returned the metadata from all bands of the input raster. It needs to be adapted to the layout of m_BandList + ImageMetadata::ImageMetadataBandsType bandRangeMetadata; + for (auto elem: m_BandList) + { + bandRangeMetadata.push_back(imd.Bands[elem]); + } + imd.Bands = bandRangeMetadata; m_IOComponents = m_BandList.size(); } + // Delete band metadata if the Conversion policy changed the number of bands, in the case of + // grayscale to RGB for example. Because we cannot know how the metadata should be mapped. + // TODO: define proper behavior in this case. + using ConvertIOPixelTraits = otb::DefaultConvertPixelTraits<typename TOutputImage::IOPixelType>; + if (strcmp(output->GetNameOfClass(), "Image") == 0 && !(this->m_ImageIO->GetNumberOfComponents() == ConvertIOPixelTraits::GetNumberOfComponents())) + { + imd.Bands = ImageMetadata::ImageMetadataBandsType (ConvertIOPixelTraits::GetNumberOfComponents()); + } + // THOMAS : ajout // If a VectorImage, this requires us to set the // VectorLength before allocate @@ -545,6 +592,11 @@ void ImageFileReader<TOutputImage, ConvertPixelTraits>::GenerateOutputInformatio AccessorFunctorType::SetVectorLength(output, m_IOComponents); } + if (img_common != nullptr) + { + img_common->SetImageMetadata(imd); + } + output->SetLargestPossibleRegion(region); } diff --git a/Modules/IO/ImageIO/include/otbImageFileWriter.hxx b/Modules/IO/ImageIO/include/otbImageFileWriter.hxx index cfea2a97c896383cb2d00a2d5247feebb5b6904c..24c7d409a6c9c1a63323520a0b8d30139e376a8a 100644 --- a/Modules/IO/ImageIO/include/otbImageFileWriter.hxx +++ b/Modules/IO/ImageIO/include/otbImageFileWriter.hxx @@ -35,6 +35,7 @@ #include "itkMetaDataObject.h" #include "otbImageKeywordlist.h" #include "otbMetaDataKey.h" +#include "otbImageCommons.h" #include "otbConfigure.h" @@ -554,6 +555,12 @@ void ImageFileWriter<TInputImage>::GenerateOutputInformation(void) m_ImageIO->SetUseCompression(m_UseCompression); m_ImageIO->SetMetaDataDictionary(inputPtr->GetMetaDataDictionary()); + const ImageCommons* img_common = dynamic_cast<const ImageCommons*>(inputPtr.GetPointer()); + if (img_common != nullptr) + { + m_ImageIO->SetImageMetadata(img_common->GetImageMetadata()); + } + /** Create Image file */ // Setup the image IO for writing. // diff --git a/Modules/IO/TestKernel/include/otbTestTools.h b/Modules/IO/TestKernel/include/otbTestTools.h new file mode 100644 index 0000000000000000000000000000000000000000..22a8cac52169822e9f3356900cb903a90892a332 --- /dev/null +++ b/Modules/IO/TestKernel/include/otbTestTools.h @@ -0,0 +1,38 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#ifndef otbTestTools_h +#define otbTestTools_h + +#include "otbMetaDataKey.h" +#include "otbImageMetadata.h" + +namespace otb +{ +namespace testtools +{ + +void PrintMetadataBase(ImageMetadataBase imdb, std::ostream& oss); + +void PrintMetadata(ImageMetadata imd, std::ostream& oss); + +} +} +#endif diff --git a/Modules/IO/TestKernel/src/CMakeLists.txt b/Modules/IO/TestKernel/src/CMakeLists.txt index 6030369198d58c7fa16fee317b1cbca4527f2769..45aeafd675615e1516cb6f7ce21b9d10b63cc0bb 100644 --- a/Modules/IO/TestKernel/src/CMakeLists.txt +++ b/Modules/IO/TestKernel/src/CMakeLists.txt @@ -18,7 +18,7 @@ # limitations under the License. # -add_library(OTBTestKernel otbTestHelper.cxx) +add_library(OTBTestKernel otbTestHelper.cxx otbTestTools.cxx) target_link_libraries(OTBTestKernel ${OTBGdalAdapters_LIBRARIES} ${OTBImageIO_LIBRARIES} diff --git a/Modules/IO/TestKernel/src/otbTestTools.cxx b/Modules/IO/TestKernel/src/otbTestTools.cxx new file mode 100644 index 0000000000000000000000000000000000000000..f391f1ce03b903421bee21a3c7082e6892cdb3d9 --- /dev/null +++ b/Modules/IO/TestKernel/src/otbTestTools.cxx @@ -0,0 +1,86 @@ +/* + * Copyright (C) 2005-2020 Centre National d'Etudes Spatiales (CNES) + * + * This file is part of Orfeo Toolbox + * + * https://www.orfeo-toolbox.org/ + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +#include "otbTestTools.h" + +namespace otb +{ +namespace testtools +{ + +void PrintMetadataBase(ImageMetadataBase imdb, std::ostream& oss) +{ + std::unordered_map<std::string, std::string> kwl; + imdb.ToKeywordlist(kwl); + for (auto It = otb::MetaData::MDStrNames.left.begin() ; It != otb::MetaData::MDStrNames.left.end() ; ++It) + { + auto Key = kwl.find(It->second); + if (Key != kwl.end()) + oss << It->second << ' ' << Key->second << '\n'; + } + + for (auto It = otb::MetaData::MDNumNames.left.begin() ; It != otb::MetaData::MDNumNames.left.end() ; ++It) + { + auto Key = kwl.find(It->second); + if (Key != kwl.end()) + oss << It->second << ' ' << Key->second << '\n'; + } + + for (auto It = otb::MetaData::MDTimeNames.left.begin() ; It != otb::MetaData::MDTimeNames.left.end() ; ++It) + { + auto Key = kwl.find(It->second); + if (Key != kwl.end()) + oss << It->second << ' ' << Key->second << '\n'; + } + + for (auto It = otb::MetaData::MDGeomNames.left.begin() ; It != otb::MetaData::MDGeomNames.left.end() ; ++It) + { + auto Key = kwl.find(It->second); + if (Key != kwl.end()) + oss << It->second << ' ' << Key->second << '\n'; + } + + for (auto It = otb::MetaData::MDL1DNames.left.begin() ; It != otb::MetaData::MDL1DNames.left.end() ; ++It) + { + auto Key = kwl.find(It->second); + if (Key != kwl.end()) + oss << It->second << ' ' << Key->second << '\n'; + } + + for (auto It = otb::MetaData::MDL2DNames.left.begin() ; It != otb::MetaData::MDL2DNames.left.end() ; ++It) + { + auto Key = kwl.find(It->second); + if (Key != kwl.end()) + oss << It->second << ' ' << Key->second << '\n'; + } + + std::string prefix("Extra."); + for (const auto& kv : imdb.ExtraKeys) + oss << prefix + kv.first << ' ' << kv.second << '\n'; +} + +void PrintMetadata(ImageMetadata imd, std::ostream& oss) +{ + PrintMetadataBase(imd, oss); + for (ImageMetadataBase imdb : imd.Bands) + PrintMetadataBase(imdb, oss); +} + +}} diff --git a/Modules/Segmentation/Conversion/include/otbOGRDataSourceToLabelImageFilter.hxx b/Modules/Segmentation/Conversion/include/otbOGRDataSourceToLabelImageFilter.hxx index 05a9c0b726bda4783ec0895aedccd34b85ffaedd..274bd5d5b56e988d26af6dd3faf3430017d48d23 100644 --- a/Modules/Segmentation/Conversion/include/otbOGRDataSourceToLabelImageFilter.hxx +++ b/Modules/Segmentation/Conversion/include/otbOGRDataSourceToLabelImageFilter.hxx @@ -133,10 +133,8 @@ void OGRDataSourceToLabelImageFilter<TOutputImage>::GenerateOutputInformation() // Set spacing and origin outputPtr->SetSignedSpacing(m_OutputSpacing); outputPtr->SetOrigin(m_OutputOrigin); - - itk::MetaDataDictionary& dict = outputPtr->GetMetaDataDictionary(); - itk::EncapsulateMetaData<std::string>(dict, MetaDataKey::ProjectionRefKey, static_cast<std::string>(this->GetOutputProjectionRef())); - + outputPtr->SetProjectionRef(this->GetOutputProjectionRef()); + // Generate the OGRLayers from the input OGRDataSource for (unsigned int idx = 0; idx < this->GetNumberOfInputs(); ++idx) { @@ -155,6 +153,8 @@ void OGRDataSourceToLabelImageFilter<TOutputImage>::GenerateOutputInformation() noDataValueAvailable.resize(nbBands, true); std::vector<double> noDataValue; noDataValue.resize(nbBands, static_cast<double>(m_BackgroundValue)); + + itk::MetaDataDictionary& dict = outputPtr->GetMetaDataDictionary(); itk::EncapsulateMetaData<std::vector<bool>>(dict, MetaDataKey::NoDataValueAvailable, noDataValueAvailable); itk::EncapsulateMetaData<std::vector<double>>(dict, MetaDataKey::NoDataValue, noDataValue); } diff --git a/Modules/Segmentation/MorphologicalProfiles/otb-module.cmake b/Modules/Segmentation/MorphologicalProfiles/otb-module.cmake index 48682b42af3c448204e14b6015677e2c81a61655..3e4c70ca820dbadda468bec27fb445e0a9cf7499 100644 --- a/Modules/Segmentation/MorphologicalProfiles/otb-module.cmake +++ b/Modules/Segmentation/MorphologicalProfiles/otb-module.cmake @@ -26,7 +26,7 @@ otb_module(OTBMorphologicalProfiles OTBCommon OTBITK OTBImageBase - OTBObjectList + OTBImageList OTBFunctor TEST_DEPENDS diff --git a/Modules/ThirdParty/Qt/otb-module-init.cmake b/Modules/ThirdParty/Qt/otb-module-init.cmake index b7dc7b5ace083161294199c7189d52fbef80f4fe..2e112c88a05d5bf15d9333ece102e79895bb7da9 100644 --- a/Modules/ThirdParty/Qt/otb-module-init.cmake +++ b/Modules/ThirdParty/Qt/otb-module-init.cmake @@ -18,6 +18,7 @@ # limitations under the License. # +add_definitions(-DQT_NO_KEYWORDS) find_package(Qt5Core REQUIRED) find_package(Qt5Gui REQUIRED) find_package(Qt5Widgets REQUIRED) diff --git a/Modules/Visualization/Mapla/include/mvdMaplaApplication.h b/Modules/Visualization/Mapla/include/mvdMaplaApplication.h index 6b53eb9f20f27a2b5cb2a976f841e1186678a9af..57c4747fdb1404f6ce050f26bcb17f2d59eb9a77 100644 --- a/Modules/Visualization/Mapla/include/mvdMaplaApplication.h +++ b/Modules/Visualization/Mapla/include/mvdMaplaApplication.h @@ -120,13 +120,13 @@ public: /*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/ -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -150,7 +150,7 @@ private: // // Slots -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/Mapla/include/mvdMaplaMainWindow.h b/Modules/Visualization/Mapla/include/mvdMaplaMainWindow.h index e4f44e65fdfca783b7208d1849b7f65719b7976f..d8065ce0db13b81b92eb9aa3d399678569b02f82 100644 --- a/Modules/Visualization/Mapla/include/mvdMaplaMainWindow.h +++ b/Modules/Visualization/Mapla/include/mvdMaplaMainWindow.h @@ -108,7 +108,7 @@ public: // // SIGNALS. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -127,7 +127,7 @@ protected: // // Protected slots. -protected slots: +protected Q_SLOTS: /** */ @@ -193,7 +193,7 @@ private: // // Private slots. -private slots: +private Q_SLOTS: /** * \brief Qt auto-connected slot which is called when * 'File/Preferences' menu action is trigerred. diff --git a/Modules/Visualization/Monteverdi/include/mvdApplication.h b/Modules/Visualization/Monteverdi/include/mvdApplication.h index 3d8df9394f82d9c7c16d2b07d579b27eec28d0e0..9a01a69367e76f8a79cbbb9319fda20c01c3b093 100644 --- a/Modules/Visualization/Monteverdi/include/mvdApplication.h +++ b/Modules/Visualization/Monteverdi/include/mvdApplication.h @@ -135,13 +135,13 @@ public: /*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/ -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -173,7 +173,7 @@ private: // // Slots -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/Monteverdi/include/mvdMainWindow.h b/Modules/Visualization/Monteverdi/include/mvdMainWindow.h index 0b303a416b78478c26864e352329dccf5eb68847..b7f820290aba498dd760fab33b7a4276f6abc6c8 100644 --- a/Modules/Visualization/Monteverdi/include/mvdMainWindow.h +++ b/Modules/Visualization/Monteverdi/include/mvdMainWindow.h @@ -138,7 +138,7 @@ public: // // Public slots. -public slots: +public Q_SLOTS: /** */ @@ -152,7 +152,7 @@ public slots: // // SIGNALS. -signals: +Q_SIGNALS: void UserCoordinatesEditingFinished(const QString&); @@ -187,7 +187,7 @@ protected: // // Protected slots. -protected slots: +protected Q_SLOTS: /** */ @@ -421,7 +421,7 @@ private: // // Private slots. -private slots: +private Q_SLOTS: /** */ diff --git a/Modules/Visualization/Monteverdi/include/mvdPreferencesDialog.h b/Modules/Visualization/Monteverdi/include/mvdPreferencesDialog.h index 6884ace09125c5dbd3f5bde6edefacf094ffba0e..d1e25725d10eddaf56430471c03543112933322d 100644 --- a/Modules/Visualization/Monteverdi/include/mvdPreferencesDialog.h +++ b/Modules/Visualization/Monteverdi/include/mvdPreferencesDialog.h @@ -96,7 +96,7 @@ public: // // SIGNALS. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -126,7 +126,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** * \brief Qt auto-connected slot which is called when datasetPathButton menu diff --git a/Modules/Visualization/Monteverdi/src/mvdMainWindow.cxx b/Modules/Visualization/Monteverdi/src/mvdMainWindow.cxx index 32a2cc9d02458b9a6e9f533510f06bf03515cdc0..3225cc5121dd652ae4cc54d0b466630045f2e315 100644 --- a/Modules/Visualization/Monteverdi/src/mvdMainWindow.cxx +++ b/Modules/Visualization/Monteverdi/src/mvdMainWindow.cxx @@ -1250,31 +1250,31 @@ void MainWindow::on_action_SaveScreenshot_triggered() /*****************************************************************************/ void MainWindow::on_action_ZoomIn_triggered() { - emit UserZoomIn(); + Q_EMIT UserZoomIn(); } /*****************************************************************************/ void MainWindow::on_action_ZoomOut_triggered() { - emit UserZoomOut(); + Q_EMIT UserZoomOut(); } /*****************************************************************************/ void MainWindow::on_action_ZoomExtent_triggered() { - emit UserZoomExtent(); + Q_EMIT UserZoomExtent(); } /*****************************************************************************/ void MainWindow::on_action_ZoomFull_triggered() { - emit UserZoomFull(); + Q_EMIT UserZoomFull(); } /*****************************************************************************/ void MainWindow::on_action_ZoomLayer_triggered() { - emit UserZoomLayer(); + Q_EMIT UserZoomLayer(); } /*****************************************************************************/ diff --git a/Modules/Visualization/MonteverdiCore/include/mvdAbstractImageModel.h b/Modules/Visualization/MonteverdiCore/include/mvdAbstractImageModel.h index 5cd51a4d06e397fb42c60559f4a36de654f3b5e3..24fffff6dc67ec91a542e3c38ed0299b592e3874 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdAbstractImageModel.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdAbstractImageModel.h @@ -246,7 +246,7 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /** * \brief Refresh histogram-model based on no-data properties. @@ -257,7 +257,7 @@ public slots: // // Signals. -signals: +Q_SIGNALS: /** */ void SpacingChanged(const SpacingType&); @@ -350,7 +350,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' @@ -424,7 +424,7 @@ void AbstractImageModel::SetCurrentLod(CountType lod) m_CurrentLod = lod; // if everything ok emit the new spacing of the current lod - emit SpacingChanged(otb::internal::GetSignedSpacing(static_cast<ImageBaseType*>(ToImageBase()))); + Q_EMIT SpacingChanged(otb::internal::GetSignedSpacing(static_cast<ImageBaseType*>(ToImageBase()))); } /*****************************************************************************/ diff --git a/Modules/Visualization/MonteverdiCore/include/mvdAbstractLayerModel.h b/Modules/Visualization/MonteverdiCore/include/mvdAbstractLayerModel.h index c8518f0d728252c0e1356079a984711b7aa396ca..6fc2002057fb4b8fd2e60edec717a27e14f26433 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdAbstractLayerModel.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdAbstractLayerModel.h @@ -143,13 +143,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /** */ void VisibilityChanged(bool = true); @@ -202,7 +202,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd'. diff --git a/Modules/Visualization/MonteverdiCore/include/mvdAbstractModel.h b/Modules/Visualization/MonteverdiCore/include/mvdAbstractModel.h index 297de3199f9fe841c47a524aaf6faf29f3e9ec7c..1d9cdc72d4e8a942b4e1319f5c8f3f7e5f08c55e 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdAbstractModel.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdAbstractModel.h @@ -121,7 +121,7 @@ public: // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -154,7 +154,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd'. diff --git a/Modules/Visualization/MonteverdiCore/include/mvdAbstractWorker.h b/Modules/Visualization/MonteverdiCore/include/mvdAbstractWorker.h index 96b1fb4a555f276e77b8da18bf965cf16b40a3d1..9e8a53c9848ff73a6453481e13a10f91bcc4cfa0 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdAbstractWorker.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdAbstractWorker.h @@ -97,7 +97,7 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /** * \brief Call the implemented do job/task routine. @@ -108,7 +108,7 @@ public slots: // // Signals. -signals: +Q_SIGNALS: /** * \brief Signal emitted when progress text has changed. * @@ -189,7 +189,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd'. diff --git a/Modules/Visualization/MonteverdiCore/include/mvdApplicationsBrowser.h b/Modules/Visualization/MonteverdiCore/include/mvdApplicationsBrowser.h index 6bc82969e955b343dde76b974fd6f77e9bbf9ee4..ccd53479eb3091c7adf3f6c7bfe33c27cd288195 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdApplicationsBrowser.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdApplicationsBrowser.h @@ -129,13 +129,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: void AvailableApplicationsTagsChanged(const ApplicationsTagContainer&); /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -160,7 +160,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd'. diff --git a/Modules/Visualization/MonteverdiCore/include/mvdBackgroundTask.h b/Modules/Visualization/MonteverdiCore/include/mvdBackgroundTask.h index fc5a4c31286b71fc9c9713037b2cf37da316e046..c778397932189f4a7733d67c98396b0b36774a92 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdBackgroundTask.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdBackgroundTask.h @@ -104,13 +104,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -136,7 +136,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** */ void OnObjectDestroyed(QObject* object); diff --git a/Modules/Visualization/MonteverdiCore/include/mvdHistogramModel.h b/Modules/Visualization/MonteverdiCore/include/mvdHistogramModel.h index 5a7f30e4ea18ade01b4aca7c360d7d7167d3fb87..b3f47ec26f03fdf45ec34fef5729a03a8ea94ede 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdHistogramModel.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdHistogramModel.h @@ -199,7 +199,7 @@ public: // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -266,7 +266,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiCore/include/mvdI18nCoreApplication.h b/Modules/Visualization/MonteverdiCore/include/mvdI18nCoreApplication.h index b63af93c4e411c51754b24c2121309e539fedd1e..d1c000f43d7f82132f12af99f5ff2de32b4bc1fe 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdI18nCoreApplication.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdI18nCoreApplication.h @@ -327,13 +327,13 @@ public: static const char* DATASET_EXT; /*-[ PUBLIC SLOTS SECTION ]-----------------------------------------------**/ -public slots: +public Q_SLOTS: /** * \brief Accessor used to changed model which is managed by the * Application. * * This method emits the AboutToChangeModel() and ModelChanged() - * signals respectively, before and after, the model is changed. + * Q_SIGNALS respectively, before and after, the model is changed. * * \param model The newly managed model. */ @@ -345,7 +345,7 @@ public slots: // // SIGNALS. -signals: +Q_SIGNALS: /** * \brief Signal emitted when the AbstractModel of the MVC is about * to be changed. @@ -481,7 +481,7 @@ private: // // SLOTS -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiCore/include/mvdImageImporter.h b/Modules/Visualization/MonteverdiCore/include/mvdImageImporter.h index f0e4c57fe4638361ee52550bb202d3e18552a8f4..8b6a536e63a9cc1a88f8c83ea7e17e20011ed5ab 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdImageImporter.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdImageImporter.h @@ -115,13 +115,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /** * \brief Signal emitted when job/task has correctly been done. @@ -189,7 +189,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd'. diff --git a/Modules/Visualization/MonteverdiCore/include/mvdImagePlacenameLoader.h b/Modules/Visualization/MonteverdiCore/include/mvdImagePlacenameLoader.h index 35152a895327f0b4cc6e82a11e5656c134e8658f..a505d22d3d446a7bd5fdebade259c9c1c9ebea45 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdImagePlacenameLoader.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdImagePlacenameLoader.h @@ -78,11 +78,11 @@ public: /** \brief Constructor */ ImagePlacenameLoader(VectorImageModel* model); -public slots: +public Q_SLOTS: /** \brief load the placename */ void LoadPlacename(); -signals: +Q_SIGNALS: /** \brief Triggered after a non empty placename was loaded */ void PlacenameLoaded(const QString&); diff --git a/Modules/Visualization/MonteverdiCore/include/mvdImageProperties.h b/Modules/Visualization/MonteverdiCore/include/mvdImageProperties.h index c0bc0b13c9c4e57bd92fa0cf5906bb1ff3ed906d..a70ab808b2f8e048be3c9837018b99737b95f165 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdImageProperties.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdImageProperties.h @@ -143,13 +143,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -196,7 +196,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd'. diff --git a/Modules/Visualization/MonteverdiCore/include/mvdMyClass.h b/Modules/Visualization/MonteverdiCore/include/mvdMyClass.h index 153f80372f05cba0d2519f952559b9aca2c7387a..918d41a76c7dd58712f0978772a870296eb424b0 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdMyClass.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdMyClass.h @@ -96,13 +96,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -124,7 +124,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd'. diff --git a/Modules/Visualization/MonteverdiCore/include/mvdOverviewBuilder.h b/Modules/Visualization/MonteverdiCore/include/mvdOverviewBuilder.h index ff5a773219a57873c9fcbbab6d2b1485ddb21abf..df1d06e0f8875ea9595d4d1de17999abd7219566 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdOverviewBuilder.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdOverviewBuilder.h @@ -113,13 +113,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /** * \brief Signal emitted when job/task has correctly been done. @@ -176,7 +176,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd'. diff --git a/Modules/Visualization/MonteverdiCore/include/mvdProcessObjectObserver.h b/Modules/Visualization/MonteverdiCore/include/mvdProcessObjectObserver.h index 9c335ceaf24b7ee7df81116b9b561156c9916387..306f0f263ec8b09a4399379cefe02f33859c72e8 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdProcessObjectObserver.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdProcessObjectObserver.h @@ -115,13 +115,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -148,7 +148,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd'. diff --git a/Modules/Visualization/MonteverdiCore/include/mvdQuicklookModel.h b/Modules/Visualization/MonteverdiCore/include/mvdQuicklookModel.h index 33728e3f26dfb6471eea1553a8d04a0973837bde..8aa9911efe68924959aaa06e09505aff45118672 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdQuicklookModel.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdQuicklookModel.h @@ -134,14 +134,14 @@ public: /*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/ // - // Public slots. -public slots: + // Public Q_SLOTS. +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /** */ void SettingsUpdated(); @@ -172,7 +172,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiCore/include/mvdStackedLayerModel.h b/Modules/Visualization/MonteverdiCore/include/mvdStackedLayerModel.h index 4829e77ae05d8f474a89c5ce3084e73bef7ff1a6..5324dac629abd34da14d3cf5e953e9167d254033 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdStackedLayerModel.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdStackedLayerModel.h @@ -201,7 +201,7 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: void Clear(); void Deleting(unsigned int index); inline void Delete(const KeyType&); @@ -220,7 +220,7 @@ public slots: // // Signals. -signals: +Q_SIGNALS: void AboutToChangeSelectedLayerModel(const StackedLayerModel::KeyType&); void SelectedLayerModelChanged(const StackedLayerModel::KeyType&); @@ -308,7 +308,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; #if OTB_DEBUG @@ -450,7 +450,7 @@ inline StackedLayerModel::ConstIterator StackedLayerModel::End() const /*****************************************************************************/ inline void StackedLayerModel::EndEditPixelInfo(const QPoint& screen, const PointType& view) { - emit PixelInfoChanged(screen, view, m_PixelInfos); + Q_EMIT PixelInfoChanged(screen, view, m_PixelInfos); } /*****************************************************************************/ @@ -738,13 +738,13 @@ inline void StackedLayerModel::SetCurrent(SizeType index, bool force) // << "->" // << QString( "'%1'" ).arg( key.c_str() ); - emit CurrentAboutToBeChanged(index); - emit AboutToChangeSelectedLayerModel(key); + Q_EMIT CurrentAboutToBeChanged(index); + Q_EMIT AboutToChangeSelectedLayerModel(key); m_Current = index; - emit CurrentChanged(index); - emit SelectedLayerModelChanged(key); + Q_EMIT CurrentChanged(index); + Q_EMIT SelectedLayerModelChanged(key); } /*****************************************************************************/ @@ -755,11 +755,11 @@ inline void StackedLayerModel::SetReference(SizeType index, bool force) if (index == m_Reference && !force) return; - emit ReferenceAboutToBeChanged(index); + Q_EMIT ReferenceAboutToBeChanged(index); m_Reference = index; - emit ReferenceChanged(index); + Q_EMIT ReferenceChanged(index); } /*****************************************************************************/ diff --git a/Modules/Visualization/MonteverdiCore/include/mvdVectorImageModel.h b/Modules/Visualization/MonteverdiCore/include/mvdVectorImageModel.h index 40d51233f1bc868846650be0ce7ce2487465fa2c..30f71773859b54a97938bbbd5c55edd725c98b63 100644 --- a/Modules/Visualization/MonteverdiCore/include/mvdVectorImageModel.h +++ b/Modules/Visualization/MonteverdiCore/include/mvdVectorImageModel.h @@ -189,8 +189,8 @@ public: /*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/ // - // Public slots. -public slots: + // Public Q_SLOTS. +public Q_SLOTS: /** */ void OnPhysicalCursorPositionChanged(const QPoint&, const PointType&, const PointType&, const DefaultImageType::PixelType&); @@ -199,7 +199,7 @@ public slots: // // Signals. -signals: +Q_SIGNALS: /** */ void SettingsUpdated(AbstractImageModel* imageModel = NULL); @@ -303,7 +303,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** */ void OnModelUpdated(); }; diff --git a/Modules/Visualization/MonteverdiCore/src/mvdAbstractLayerModel.cxx b/Modules/Visualization/MonteverdiCore/src/mvdAbstractLayerModel.cxx index d5f7031c795b454fd6ad6b8f97fef6397dda78b5..f2ca1989c0cb885611977e19cf6d52d671502f68 100644 --- a/Modules/Visualization/MonteverdiCore/src/mvdAbstractLayerModel.cxx +++ b/Modules/Visualization/MonteverdiCore/src/mvdAbstractLayerModel.cxx @@ -159,7 +159,7 @@ void AbstractLayerModel::SetName(const QString& name) if (name != m_Name) { m_Name = name; - emit NameChanged(); + Q_EMIT NameChanged(); } } @@ -178,8 +178,8 @@ bool AbstractLayerModel::virtual_HasKwl() const /*******************************************************************************/ void AbstractLayerModel::virtual_SignalVisibilityChanged(bool isVisible) { - emit VisibilityChanged(isVisible); - emit VisibilityChanged(this, isVisible); + Q_EMIT VisibilityChanged(isVisible); + Q_EMIT VisibilityChanged(this, isVisible); } /*******************************************************************************/ diff --git a/Modules/Visualization/MonteverdiCore/src/mvdAbstractWorker.cxx b/Modules/Visualization/MonteverdiCore/src/mvdAbstractWorker.cxx index ef2121996e6ff69146bf2a3341f0b7ea01070598..6da9127977d1b4ce6b8e187db83d2c797a3e5f09 100644 --- a/Modules/Visualization/MonteverdiCore/src/mvdAbstractWorker.cxx +++ b/Modules/Visualization/MonteverdiCore/src/mvdAbstractWorker.cxx @@ -100,7 +100,7 @@ void AbstractWorker::Do() noexcept // Emit task/job has correctly been done giving resulting object // to main thread. - emit Done(result); + Q_EMIT Done(result); } catch (std::exception& exc) { @@ -110,11 +110,11 @@ void AbstractWorker::Do() noexcept // Emit task/job has incorrectly been done giving clone of // exception to main thread. - emit ExceptionRaised(FromStdString(exc.what())); + Q_EMIT ExceptionRaised(FromStdString(exc.what())); } // Emit task/job has finished (thread can be signal to quit()). - emit Finished(); + Q_EMIT Finished(); } /*******************************************************************************/ diff --git a/Modules/Visualization/MonteverdiCore/src/mvdApplicationsBrowser.cxx b/Modules/Visualization/MonteverdiCore/src/mvdApplicationsBrowser.cxx index 2548010d85c27d978ef7edfc2763dedbe5038acc..3f0b136dc744c7baa9dcfa4e17e2b4a007620170 100644 --- a/Modules/Visualization/MonteverdiCore/src/mvdApplicationsBrowser.cxx +++ b/Modules/Visualization/MonteverdiCore/src/mvdApplicationsBrowser.cxx @@ -188,9 +188,9 @@ void ApplicationsBrowser::SearchAvailableApplicationsTags() } // - // emit a signal with the ApplicationsTagContainer as + // Q_EMIT a signal with the ApplicationsTagContainer as // parameter - emit AvailableApplicationsTagsChanged(outputContainer); + Q_EMIT AvailableApplicationsTagsChanged(outputContainer); } /*******************************************************************************/ diff --git a/Modules/Visualization/MonteverdiCore/src/mvdI18nCoreApplication.cxx b/Modules/Visualization/MonteverdiCore/src/mvdI18nCoreApplication.cxx index e7e98bcc31e0d0a6f13a68ab7f706624e235653e..3f8d98080dedf7916dd526b8a12ef8ed2f818d6f 100644 --- a/Modules/Visualization/MonteverdiCore/src/mvdI18nCoreApplication.cxx +++ b/Modules/Visualization/MonteverdiCore/src/mvdI18nCoreApplication.cxx @@ -333,7 +333,7 @@ void I18nCoreApplication::Initialize() /*******************************************************************************/ void I18nCoreApplication::SetModel(AbstractModel* model) { - emit AboutToChangeModel(model); + Q_EMIT AboutToChangeModel(model); delete m_Model; @@ -342,7 +342,7 @@ void I18nCoreApplication::SetModel(AbstractModel* model) if (model != NULL) m_Model->setParent(this); - emit ModelChanged(m_Model); + Q_EMIT ModelChanged(m_Model); } /*******************************************************************************/ @@ -429,7 +429,7 @@ void I18nCoreApplication::InitializeLocale() qDebug() << "Available codecs:"; - foreach (const QByteArray& codec, codecs) + Q_FOREACH (const QByteArray& codec, codecs) qDebug() << "\t" << codec; } diff --git a/Modules/Visualization/MonteverdiCore/src/mvdImageImporter.cxx b/Modules/Visualization/MonteverdiCore/src/mvdImageImporter.cxx index 4e05035ea37e8409fb3a083aefd744aa8eacc0c6..856c328ad844bd637da6d67aa7ea37e22f36f5a2 100644 --- a/Modules/Visualization/MonteverdiCore/src/mvdImageImporter.cxx +++ b/Modules/Visualization/MonteverdiCore/src/mvdImageImporter.cxx @@ -83,17 +83,17 @@ ImageImporter::~ImageImporter() QObject* ImageImporter::virtual_Do() { /* - emit ProgressTextChanged( + Q_EMIT ProgressTextChanged( tr( "Importing image '%1' as dataset into cache directory..." ) .arg( QFileInfo( m_Filename ).fileName() ) ); */ - // emit ProgressTextChanged( GetFirstProgressText() ); + // Q_EMIT ProgressTextChanged( GetFirstProgressText() ); - emit ProgressValueChanged(-1); + Q_EMIT ProgressValueChanged(-1); - emit ProgressRangeChanged(0, 0); + Q_EMIT ProgressRangeChanged(0, 0); // Load model. switch (m_ModelType) diff --git a/Modules/Visualization/MonteverdiCore/src/mvdImagePlacenameLoader.cxx b/Modules/Visualization/MonteverdiCore/src/mvdImagePlacenameLoader.cxx index fde03ac32b93dbf60df961bb92e3ee09b8a328b9..cf232ca9500511371db5b5585298cafd4e1fb7b9 100644 --- a/Modules/Visualization/MonteverdiCore/src/mvdImagePlacenameLoader.cxx +++ b/Modules/Visualization/MonteverdiCore/src/mvdImagePlacenameLoader.cxx @@ -56,10 +56,10 @@ void ImagePlacenameLoader::LoadPlacename() if (!placename.empty()) { // emit a signal to - emit PlacenameLoaded(FromStdString(placename)); + Q_EMIT PlacenameLoaded(FromStdString(placename)); } - emit Finished(); + Q_EMIT Finished(); } } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiCore/src/mvdOverviewBuilder.cxx b/Modules/Visualization/MonteverdiCore/src/mvdOverviewBuilder.cxx index 6b3a5c1672018a1b32eb4aa39bc40c68e0fbe0f2..504b8ebe51672ff0fc7551c6656360d1c4baadb9 100644 --- a/Modules/Visualization/MonteverdiCore/src/mvdOverviewBuilder.cxx +++ b/Modules/Visualization/MonteverdiCore/src/mvdOverviewBuilder.cxx @@ -94,20 +94,20 @@ void OverviewBuilder::SetProgress(double value) // << value << "\t" // << ( 100 * m_Index + static_cast< int >( 100.0 * value ) ); - emit ProgressValueChanged(100 * m_Index + static_cast<int>(100.0 * value)); + Q_EMIT ProgressValueChanged(100 * m_Index + static_cast<int>(100.0 * value)); } /*******************************************************************************/ QObject* OverviewBuilder::virtual_Do() { /* - emit ProgressTextChanged( + Q_EMIT ProgressTextChanged( tr( "Importing image '%1' as dataset into cache directory..." ) .arg( QFileInfo( m_Filename ).fileName() ) ); */ - // emit ProgressTextChanged( GetFirstProgressText() ); + // Q_EMIT ProgressTextChanged( GetFirstProgressText() ); // // Count elements to process. @@ -117,7 +117,7 @@ QObject* OverviewBuilder::virtual_Do() if (!it->IsNull() && (*it)->GetNbResolutions() > 0) ++m_Count; - emit ProgressRangeChanged(0, 100 * m_Count); + Q_EMIT ProgressRangeChanged(0, 100 * m_Count); // // Process elements. @@ -137,12 +137,12 @@ QObject* OverviewBuilder::virtual_Do() (*it)->RemoveObserver(id); - emit ProgressTextChanged( + Q_EMIT ProgressTextChanged( QString(tr("Generating overviews for file %1/%2 '%3'.")).arg(m_Index + 1).arg(m_Count).arg(QFile::decodeName((*it)->GetInputFileName().c_str()))); } } - emit ProgressValueChanged(100 * m_Count); + Q_EMIT ProgressValueChanged(100 * m_Count); return NULL; } diff --git a/Modules/Visualization/MonteverdiCore/src/mvdStackedLayerModel.cxx b/Modules/Visualization/MonteverdiCore/src/mvdStackedLayerModel.cxx index 76e3c8ac7538b605546b540a7ca44fdcefcf8873..04ba1fa09db055aa2bc2f130ea9bb4185ed84d06 100644 --- a/Modules/Visualization/MonteverdiCore/src/mvdStackedLayerModel.cxx +++ b/Modules/Visualization/MonteverdiCore/src/mvdStackedLayerModel.cxx @@ -103,33 +103,33 @@ void StackedLayerModel::Clear() if (emitSignal0) - emit ContentAboutToBeReset(); + Q_EMIT ContentAboutToBeReset(); // // Clear current. if (emitSignal1) { - emit CurrentAboutToBeChanged(StackedLayerModel::NIL_INDEX); - emit AboutToChangeSelectedLayerModel(KeyType()); + Q_EMIT CurrentAboutToBeChanged(StackedLayerModel::NIL_INDEX); + Q_EMIT AboutToChangeSelectedLayerModel(KeyType()); } m_Current = StackedLayerModel::NIL_INDEX; if (emitSignal1) { - emit CurrentChanged(m_Current); - emit SelectedLayerModelChanged(KeyType()); + Q_EMIT CurrentChanged(m_Current); + Q_EMIT SelectedLayerModelChanged(KeyType()); } // // Clear reference. if (emitSignal2) - emit ReferenceAboutToBeChanged(StackedLayerModel::NIL_INDEX); + Q_EMIT ReferenceAboutToBeChanged(StackedLayerModel::NIL_INDEX); m_Reference = StackedLayerModel::NIL_INDEX; if (emitSignal2) - emit ReferenceChanged(m_Reference); + Q_EMIT ReferenceChanged(m_Reference); // // Clear content. @@ -150,7 +150,7 @@ void StackedLayerModel::Clear() m_Keys.clear(); if (emitSignal0) - emit ContentReset(); + Q_EMIT ContentReset(); } /*****************************************************************************/ @@ -224,8 +224,8 @@ void StackedLayerModel::Deleting(unsigned int index) // // Emit signals. - emit ContentAboutToBeChanged(); - emit LayerAboutToBeDeleted(index); + Q_EMIT ContentAboutToBeChanged(); + Q_EMIT LayerAboutToBeDeleted(index); // // Clear satellite date. @@ -270,8 +270,8 @@ void StackedLayerModel::Delete(SizeType index) // the work of deleting model is now done in the above function // Deleting(unsigned int index) // Emit signals. - emit LayerDeleted(index); - emit ContentChanged(); + Q_EMIT LayerDeleted(index); + Q_EMIT ContentChanged(); } /*****************************************************************************/ @@ -279,7 +279,7 @@ void StackedLayerModel::EndEditResolutions() { // qDebug() << this << "::EndEditResolutions()"; - emit ResolutionsChanged(m_PixelInfos); + Q_EMIT ResolutionsChanged(m_PixelInfos); } /*******************************************************************************/ @@ -332,7 +332,7 @@ StackedLayerModel::KeyType StackedLayerModel::Insert(AbstractLayerModel* model, // // Emit signals. - emit ContentAboutToBeChanged(); + Q_EMIT ContentAboutToBeChanged(); // // Clear satellite date. @@ -360,8 +360,8 @@ StackedLayerModel::KeyType StackedLayerModel::Insert(AbstractLayerModel* model, // // Emit signals. - emit LayerAdded(index); - emit ContentChanged(); + Q_EMIT LayerAdded(index); + Q_EMIT ContentChanged(); // // Return generated key. @@ -376,20 +376,20 @@ void StackedLayerModel::LowerLayer(SizeType index) SizeType next = Next(index); - emit OrderAboutToBeChanged(); + Q_EMIT OrderAboutToBeChanged(); { ClearPixelInfos(); std::swap(*(m_Keys.begin() + index), *(m_Keys.begin() + next)); } - emit OrderChanged(); + Q_EMIT OrderChanged(); // WARNING: This may be buggy if index!=m_Current - emit CurrentAboutToBeChanged(next); + Q_EMIT CurrentAboutToBeChanged(next); { m_Current = next; } - emit CurrentChanged(next); + Q_EMIT CurrentChanged(next); // WARNING: This may be buggy if index!=m_Reference SetReference(m_Reference == next ? index : (m_Reference == index ? next : m_Reference)); @@ -407,7 +407,7 @@ void StackedLayerModel::MoveTo(SizeType index, SizeType position) // // Move element. - emit OrderAboutToBeChanged(); + Q_EMIT OrderAboutToBeChanged(); { ClearPixelInfos(); @@ -416,7 +416,7 @@ void StackedLayerModel::MoveTo(SizeType index, SizeType position) m_Keys.erase(m_Keys.begin() + index); m_Keys.insert(m_Keys.begin() + position, key); } - emit OrderChanged(); + Q_EMIT OrderChanged(); // // Compute new current element. @@ -471,20 +471,20 @@ void StackedLayerModel::RaiseLayer(SizeType index) SizeType prev = Prev(index); - emit OrderAboutToBeChanged(); + Q_EMIT OrderAboutToBeChanged(); { ClearPixelInfos(); std::swap(*(m_Keys.begin() + index), *(m_Keys.begin() + prev)); } - emit OrderChanged(); + Q_EMIT OrderChanged(); // WARNING: This may be buggy if index!=m_Current. - emit CurrentAboutToBeChanged(prev); + Q_EMIT CurrentAboutToBeChanged(prev); { m_Current = prev; } - emit CurrentChanged(prev); + Q_EMIT CurrentChanged(prev); // WARNING: This may be buggy if index!=m_Reference. SetReference(m_Reference == prev ? index : (m_Reference == index ? prev : m_Reference)); @@ -502,13 +502,13 @@ void StackedLayerModel::RotateLayerUp(SizeType index) KeyType currentKey(GetKey(m_Current)); KeyType referenceKey(GetKey(m_Reference)); - emit OrderAboutToBeChanged(); + Q_EMIT OrderAboutToBeChanged(); { ClearPixelInfos(); std::rotate(m_Keys.begin(), m_Keys.begin() + index, m_Keys.end()); } - emit OrderChanged(); + Q_EMIT OrderChanged(); if (!currentKey.empty()) { @@ -516,11 +516,11 @@ void StackedLayerModel::RotateLayerUp(SizeType index) assert(current != StackedLayerModel::NIL_INDEX); - emit CurrentAboutToBeChanged(current); + Q_EMIT CurrentAboutToBeChanged(current); { m_Current = current; } - emit CurrentChanged(m_Current); + Q_EMIT CurrentChanged(m_Current); } if (!referenceKey.empty()) @@ -529,11 +529,11 @@ void StackedLayerModel::RotateLayerUp(SizeType index) assert(reference != StackedLayerModel::NIL_INDEX); - emit ReferenceAboutToBeChanged(reference); + Q_EMIT ReferenceAboutToBeChanged(reference); { m_Reference = reference; } - emit ReferenceChanged(m_Reference); + Q_EMIT ReferenceChanged(m_Reference); } // qDebug() << "current:" << index; @@ -551,13 +551,13 @@ void StackedLayerModel::RotateLayerDown(SizeType index) KeyType currentKey(GetKey(m_Current)); KeyType referenceKey(GetKey(m_Reference)); - emit OrderAboutToBeChanged(); + Q_EMIT OrderAboutToBeChanged(); { ClearPixelInfos(); std::rotate(m_Keys.rbegin(), m_Keys.rbegin() + index, m_Keys.rend()); } - emit OrderChanged(); + Q_EMIT OrderChanged(); if (!currentKey.empty()) { @@ -565,11 +565,11 @@ void StackedLayerModel::RotateLayerDown(SizeType index) assert(current != StackedLayerModel::NIL_INDEX); - emit CurrentAboutToBeChanged(current); + Q_EMIT CurrentAboutToBeChanged(current); { m_Current = current; } - emit CurrentChanged(current); + Q_EMIT CurrentChanged(current); } if (!referenceKey.empty()) @@ -578,11 +578,11 @@ void StackedLayerModel::RotateLayerDown(SizeType index) assert(reference != StackedLayerModel::NIL_INDEX); - emit ReferenceAboutToBeChanged(reference); + Q_EMIT ReferenceAboutToBeChanged(reference); { m_Reference = reference; } - emit ReferenceChanged(reference); + Q_EMIT ReferenceChanged(reference); } // qDebug() << "current:" << index; diff --git a/Modules/Visualization/MonteverdiCore/src/mvdVectorImageModel.cxx b/Modules/Visualization/MonteverdiCore/src/mvdVectorImageModel.cxx index 7481f1ffb41d55e38b056254b57375dc69c5251a..a49e43eb68aee6cd2556625b96082723fcdf89d2 100644 --- a/Modules/Visualization/MonteverdiCore/src/mvdVectorImageModel.cxx +++ b/Modules/Visualization/MonteverdiCore/src/mvdVectorImageModel.cxx @@ -617,10 +617,10 @@ void VectorImageModel::OnModelUpdated() ApplySettings(); // Emit settings update to notify display refresh. - emit SettingsUpdated(this); + Q_EMIT SettingsUpdated(this); // Emit properties update. - emit PropertiesUpdated(this); + Q_EMIT PropertiesUpdated(this); } /*****************************************************************************/ @@ -665,7 +665,7 @@ void VectorImageModel::OnPhysicalCursorPositionChanged(const QPoint&, const Poin bool isInsideNativeLargestRegion = GetNativeLargestRegion().IsInside(currentIndex); - emit CurrentIndexUpdated(currentIndex, isInsideNativeLargestRegion); + Q_EMIT CurrentIndexUpdated(currentIndex, isInsideNativeLargestRegion); // // Display the radiometry of the displayed channels @@ -868,13 +868,13 @@ void VectorImageModel::OnPhysicalCursorPositionChanged(const QPoint&, const Poin #endif // update the status bar - emit CurrentPhysicalUpdated(cartoList); - emit CurrentGeographicUpdated(geoList); - emit CurrentRadioUpdated(ToQString(ossRadio.str().c_str())); + Q_EMIT CurrentPhysicalUpdated(cartoList); + Q_EMIT CurrentGeographicUpdated(geoList); + Q_EMIT CurrentRadioUpdated(ToQString(ossRadio.str().c_str())); #if USE_RGB_CHANNELS_LIMIT - emit CurrentPixelValueUpdated(pixel, stringList); + Q_EMIT CurrentPixelValueUpdated(pixel, stringList); #else - emit CurrentPixelValueUpdated(pixel, bandNames); + Q_EMIT CurrentPixelValueUpdated(pixel, bandNames); #endif } diff --git a/Modules/Visualization/MonteverdiGui/include/mvdAboutDialog.h b/Modules/Visualization/MonteverdiGui/include/mvdAboutDialog.h index 857affc3a382e827600826df9b49aa7df6ebc8d3..342ac89d9a62acd0a6f34558fd36f9ba9666bbea 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdAboutDialog.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdAboutDialog.h @@ -79,7 +79,7 @@ public: // // SIGNALS. -signals: +Q_SIGNALS: // // Protected methods. @@ -99,7 +99,7 @@ private: // // SLOTS. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdAbstractDragAndDropEventFilter.h b/Modules/Visualization/MonteverdiGui/include/mvdAbstractDragAndDropEventFilter.h index 5ed3514be20013dadfb3fc7ce92eb38d6e590e11..36d2eca0ae5499609e7dc781df9ef7745c73455a 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdAbstractDragAndDropEventFilter.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdAbstractDragAndDropEventFilter.h @@ -102,13 +102,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -153,7 +153,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdAbstractImageViewManipulator.h b/Modules/Visualization/MonteverdiGui/include/mvdAbstractImageViewManipulator.h index 083114499ff386dcaf0c47b6a0d64e25f3f942a7..db014931f8f5b1a601c0634b4cc8b841130f9ee0 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdAbstractImageViewManipulator.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdAbstractImageViewManipulator.h @@ -191,7 +191,7 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /** */ virtual void CenterOn(const PointType& point) = 0; @@ -203,7 +203,7 @@ public slots: // // SIGNALS. -signals: +Q_SIGNALS: /** */ void RefreshViewRequested(); @@ -277,7 +277,7 @@ private: // // SLOTS. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdAbstractImageViewRenderer.h b/Modules/Visualization/MonteverdiGui/include/mvdAbstractImageViewRenderer.h index 189c2479000727195afbcd2475d4b36ce65e13ba..13e19ef4c21080843ebb107f2be92ad17477827e 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdAbstractImageViewRenderer.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdAbstractImageViewRenderer.h @@ -235,7 +235,7 @@ public: /*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/ // public slots -public slots: +public Q_SLOTS: inline void ClearScene(bool keepViewport = false); inline void UpdateScene(); inline void RefreshScene(); @@ -246,7 +246,7 @@ public slots: // // SIGNALS. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -333,7 +333,7 @@ private: // // SLOTS. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdAbstractModelController.h b/Modules/Visualization/MonteverdiGui/include/mvdAbstractModelController.h index 8dc198a4b8d0c5a0f64dd7488b5ff883eb4fa285..cb46f240fd174858f08e0f2459ad48a56a949222 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdAbstractModelController.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdAbstractModelController.h @@ -124,7 +124,7 @@ public: // // Slots. -public slots: +public Q_SLOTS: /** */ @@ -134,7 +134,7 @@ public slots: // // Signals. -signals: +Q_SIGNALS: /** */ void AboutToDisconnectModel(AbstractModel*); @@ -214,7 +214,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** * Slot called before object is destroyed. * It is used to disconnect model from controller when controller is diff --git a/Modules/Visualization/MonteverdiGui/include/mvdApplicationsToolBox.h b/Modules/Visualization/MonteverdiGui/include/mvdApplicationsToolBox.h index dd69305e7ec0b1cbaa5f693cb9b5fd41605fe681..6884d88b2ed7ee50171cf83ca78c9d2b91b34b31 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdApplicationsToolBox.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdApplicationsToolBox.h @@ -106,7 +106,7 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: void OnAvailableApplicationsTagsChanged(const ApplicationsTagContainer& appsTags); void OnSearchBoxChanged(const QString& search); void OnAlgorithmTreeDoubleClick(QTreeWidgetItem* item, int column); @@ -115,7 +115,7 @@ public slots: // // Signals. -signals: +Q_SIGNALS: void ApplicationToLaunchSelected(const QString&); /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -171,7 +171,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; /*****************************************************************************/ diff --git a/Modules/Visualization/MonteverdiGui/include/mvdApplicationsToolBoxController.h b/Modules/Visualization/MonteverdiGui/include/mvdApplicationsToolBoxController.h index 3d6eb3ef913e1d9732038e631f9b2567c509c49d..2708cf213d9099e95a64e324f2c16a4bac94de11 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdApplicationsToolBoxController.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdApplicationsToolBoxController.h @@ -108,7 +108,7 @@ public: // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -145,7 +145,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd'. diff --git a/Modules/Visualization/MonteverdiGui/include/mvdColorBandDynamicsWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdColorBandDynamicsWidget.h index 9fd0064ea9b3a7b5e6b3eb4700b38b6a7d2bee4f..488e64b2052ea3af695ec4bda57744e62aae8cea 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdColorBandDynamicsWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdColorBandDynamicsWidget.h @@ -179,7 +179,7 @@ public: // // Signals. -signals: +Q_SIGNALS: /** */ void LowQuantileChanged(RgbwChannel, double); /** */ @@ -237,7 +237,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: void on_lowIntensityLineEdit_editingFinished(); void on_highIntensityLineEdit_editingFinished(); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdColorDynamicsController.h b/Modules/Visualization/MonteverdiGui/include/mvdColorDynamicsController.h index b64d4d8a389ba28f28f66bc96606aa541e45bf19..b77c0afc157c4593c0de39010b0ddea999b423cb 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdColorDynamicsController.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdColorDynamicsController.h @@ -102,7 +102,7 @@ public: // // Slots. -public slots: +public Q_SLOTS: /** * \brief Slot called when the band-index of a RGB channel has * changed. @@ -132,7 +132,7 @@ public slots: // // Signals. -signals: +Q_SIGNALS: /** * \brief */ @@ -258,7 +258,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** */ void RefreshHistogram(); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdColorDynamicsWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdColorDynamicsWidget.h index d8902e26afbdadac3711a854aed176d5694e4e08..080ce7dafcb2fc99ebe935d52b091dd1dd730fe7 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdColorDynamicsWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdColorDynamicsWidget.h @@ -182,7 +182,7 @@ public: // // Public slots. -public slots: +public Q_SLOTS: /** */ @@ -192,7 +192,7 @@ public slots: // // Signals. -signals: +Q_SIGNALS: /** */ void LowQuantileChanged(RgbwChannel, double); @@ -290,7 +290,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** */ diff --git a/Modules/Visualization/MonteverdiGui/include/mvdColorSetupController.h b/Modules/Visualization/MonteverdiGui/include/mvdColorSetupController.h index 5041cb0e89621264e2a5f3197ad754e93d0c2e20..71f8b8f4d823cee4dd05e8fc52ebbd9ff9469d37 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdColorSetupController.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdColorSetupController.h @@ -105,7 +105,7 @@ public: // // Signals. -signals: +Q_SIGNALS: /** * \brief Signal emitted when the band-index of a RGB channel has * been changed. This signal is used to forward events to other @@ -178,7 +178,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** * \brief Slot called when the current index of a RGB channel of the * controlled widget has changed. diff --git a/Modules/Visualization/MonteverdiGui/include/mvdColorSetupWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdColorSetupWidget.h index 28939ab62411d2f89711885852e9147a16b248a4..3c17bb8adb8c02c301dbef7f5bb96c865fd0a0b4 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdColorSetupWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdColorSetupWidget.h @@ -183,7 +183,7 @@ public: // // SIGNALS. -signals: +Q_SIGNALS: /** * \brief Signal emitted when the current-index of a RGB * video-channel has been modified. @@ -246,7 +246,7 @@ private: // // SLOTS. -private slots: +private Q_SLOTS: /** * \brief Slot called when the current-index of the red * video-channel has been modified. @@ -255,7 +255,7 @@ private slots: */ inline void on_rComboBox_currentIndexChanged(int index) { - emit CurrentRgbIndexChanged(RGBW_CHANNEL_RED, index); + Q_EMIT CurrentRgbIndexChanged(RGBW_CHANNEL_RED, index); } /** @@ -266,7 +266,7 @@ private slots: */ inline void on_gComboBox_currentIndexChanged(int index) { - emit CurrentRgbIndexChanged(RGBW_CHANNEL_GREEN, index); + Q_EMIT CurrentRgbIndexChanged(RGBW_CHANNEL_GREEN, index); } /** @@ -277,7 +277,7 @@ private slots: */ inline void on_bComboBox_currentIndexChanged(int index) { - emit CurrentRgbIndexChanged(RGBW_CHANNEL_BLUE, index); + Q_EMIT CurrentRgbIndexChanged(RGBW_CHANNEL_BLUE, index); } /** @@ -288,7 +288,7 @@ private slots: */ inline void on_wComboBox_currentIndexChanged(int index) { - emit CurrentGrayIndexChanged(index); + Q_EMIT CurrentGrayIndexChanged(index); } /** @@ -298,7 +298,7 @@ private slots: */ inline void on_wCheckBox_toggled(bool activated) { - emit GrayscaleActivated(activated); + Q_EMIT GrayscaleActivated(activated); } /** diff --git a/Modules/Visualization/MonteverdiGui/include/mvdDoubleValidator.h b/Modules/Visualization/MonteverdiGui/include/mvdDoubleValidator.h index dd48bba74885aba7317bb00c45c11ddcdf5839bd..9fb24e5b16706b405696683d6b4ff7b25d8cc37d 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdDoubleValidator.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdDoubleValidator.h @@ -105,13 +105,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -133,7 +133,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd'. diff --git a/Modules/Visualization/MonteverdiGui/include/mvdDropLineEdit.h b/Modules/Visualization/MonteverdiGui/include/mvdDropLineEdit.h index 43758c1ebfc0f2f4ff1cc144d2a66582836f89c9..222c5f32808c52cff700a94ea3a4ec5266a8fd2d 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdDropLineEdit.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdDropLineEdit.h @@ -104,13 +104,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -141,7 +141,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdFilenameDragAndDropEventFilter.h b/Modules/Visualization/MonteverdiGui/include/mvdFilenameDragAndDropEventFilter.h index 20621f5adfa8db06dda2b115a17b28fb7640d13e..e76fb0cd228fbcbbef2d9c33b33d7d731e6276e6 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdFilenameDragAndDropEventFilter.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdFilenameDragAndDropEventFilter.h @@ -97,13 +97,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /** */ @@ -154,7 +154,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdHistogramController.h b/Modules/Visualization/MonteverdiGui/include/mvdHistogramController.h index f37f46f99959a00ce1bf9b167a5f9509cdf9864f..155e39412c1859bce75ce5d6a8eb85f8f59fa69e 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdHistogramController.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdHistogramController.h @@ -106,7 +106,7 @@ public: // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -144,7 +144,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** * \brief Slot called when the band-index of a RGB channel has * changed. diff --git a/Modules/Visualization/MonteverdiGui/include/mvdHistogramPlotPicker.h b/Modules/Visualization/MonteverdiGui/include/mvdHistogramPlotPicker.h index 6a7c5b9dc03f6e6b076701bf94554c6ae0a91aa4..2b48088c0aa5bb17c338c5c0bd548808b8ac80ad 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdHistogramPlotPicker.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdHistogramPlotPicker.h @@ -132,13 +132,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -193,7 +193,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdHistogramWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdHistogramWidget.h index 783a948107ecda8a82d98bf605b2771c39baa8a9..3b5fc09e98d745a5397a508b14c2d0c4d06064cd 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdHistogramWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdHistogramWidget.h @@ -162,7 +162,7 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /** * \brief */ @@ -172,7 +172,7 @@ public slots: // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -293,7 +293,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** */ void on_zoom1Button_clicked(); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdI18nApplication.h b/Modules/Visualization/MonteverdiGui/include/mvdI18nApplication.h index f4732db6f4682c98315e93e82b4bf679eaac2c02..b267efedf37b3e57489002f84095b9934e55dae8 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdI18nApplication.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdI18nApplication.h @@ -130,13 +130,13 @@ public: public: /*-[ PUBLIC SLOTS SECTION ]-----------------------------------------------**/ -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // SIGNALS. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -160,7 +160,7 @@ private: // // SLOTS -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdI18nMainWindow.h b/Modules/Visualization/MonteverdiGui/include/mvdI18nMainWindow.h index d92c07ced1b2fcb8636e92acb67e9d4420bccaf1..ba012d0f53b867282739511d224ac23fee0db400 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdI18nMainWindow.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdI18nMainWindow.h @@ -112,7 +112,7 @@ public: // // SIGNALS. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -182,7 +182,7 @@ protected: // // Protected slots. -protected slots: +protected Q_SLOTS: /** */ @@ -226,7 +226,7 @@ private: // // Private slots. -private slots: +private Q_SLOTS: /** * \brief Qt auto-connected slot which is called when File/Quit menu diff --git a/Modules/Visualization/MonteverdiGui/include/mvdImageViewManipulator.h b/Modules/Visualization/MonteverdiGui/include/mvdImageViewManipulator.h index e4808f7773550aef65979c4933c143046ac65f72..882648c942ecf2e02aad40b1b0aaf3aa3d9c9035 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdImageViewManipulator.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdImageViewManipulator.h @@ -188,7 +188,7 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: // // AbstractImageViewManipulator overloads. @@ -201,7 +201,7 @@ public slots: // // Signals. -signals: +Q_SIGNALS: /** */ void RaiseLayerRequested(); @@ -371,7 +371,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** */ void OnTimeout(); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdImageViewRenderer.h b/Modules/Visualization/MonteverdiGui/include/mvdImageViewRenderer.h index 2f248a03e33bb1269c5ab7f014fafb6fe969a0be..7569abb788a8f877cafd50941a416571d39f95f5 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdImageViewRenderer.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdImageViewRenderer.h @@ -190,14 +190,14 @@ public: /*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/ // public slots -public slots: +public Q_SLOTS: void UpdatePixelInfo(const QPoint& screen, const PointType& view, const PixelInfo::Vector& pixels) override; /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // SIGNALS. -signals: +Q_SIGNALS: void ClearProjectionRequired(); void SetProjectionRequired(); void UpdateProjectionRequired(); @@ -275,7 +275,7 @@ private: // // SLOTS. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdImageViewWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdImageViewWidget.h index 2eb5a6ec65d82b532ea1e70de36392d32b176f92..03d597a7df82db0a34b071513b942e80d8afe4a4 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdImageViewWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdImageViewWidget.h @@ -155,7 +155,7 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /** */ bool SetGLSLEnabled( bool ) noexcept; @@ -194,7 +194,7 @@ public slots: // // SIGNALS. -signals: +Q_SIGNALS: /** */ void PhysicalCursorPositionChanged(const QPoint& screen, const PointType& view, const PointType& physical, const DefaultImageType::PixelType&); @@ -308,7 +308,7 @@ private: #endif // USE_XP_REGION_OPTIM /*-[ PRIVATE SLOTS SECTION ]-----------------------------------------------*/ -private slots: +private Q_SLOTS: /** */ void OnRoiChanged(const PointType&, const SizeType&, const SpacingType&, const PointType&); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdImportImagesDialog.h b/Modules/Visualization/MonteverdiGui/include/mvdImportImagesDialog.h index 2d2ed80d39407a5c11bcefe00a4448dfb9e0fbc8..d8196a7706a6a1b4102fd6fb1b7d75de2353cc57 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdImportImagesDialog.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdImportImagesDialog.h @@ -115,13 +115,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -172,7 +172,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: void on_buttonBox_clicked(QAbstractButton*); void on_pyramidWidget_BaseValueChanged(int); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdImportSubDatasetDialog.h b/Modules/Visualization/MonteverdiGui/include/mvdImportSubDatasetDialog.h index 59debc6d1d75eac261b8e0b0aa69cfe12fbe48f8..d27e71a7b22d688be1e85595b4e5ca8b22e200a1 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdImportSubDatasetDialog.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdImportSubDatasetDialog.h @@ -113,13 +113,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -174,7 +174,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** */ void on_allButton_clicked(); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdKeymapDialog.h b/Modules/Visualization/MonteverdiGui/include/mvdKeymapDialog.h index 556fbcb946f83953ff1a91adc5831fe111f10600..444daada70f45da54c90b48e92bf2ca5a65104ab 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdKeymapDialog.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdKeymapDialog.h @@ -79,7 +79,7 @@ public: // // SIGNALS. -signals: +Q_SIGNALS: // // Protected methods. @@ -99,7 +99,7 @@ private: // // SLOTS. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdLayerStackController.h b/Modules/Visualization/MonteverdiGui/include/mvdLayerStackController.h index e3162e7cc7024be7d19e1e11d63941ad199a2cf6..11490bf265461f229ca6661adb39cedee77357f6 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdLayerStackController.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdLayerStackController.h @@ -97,13 +97,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /** */ void ApplyAllRequested(); @@ -153,7 +153,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** */ void OnCurrentChanged(int); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdLayerStackItemModel.h b/Modules/Visualization/MonteverdiGui/include/mvdLayerStackItemModel.h index 464679c0c289d6cb05ba0c8e8c893f950545e383..9efca75cd1bcfb8b42d228b043113e5606ab63ff 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdLayerStackItemModel.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdLayerStackItemModel.h @@ -225,13 +225,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: // Bugfix for layer deletion void LayerDeletingModel(unsigned int index); @@ -269,7 +269,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** */ // void OnContentAboutToBeChanged(); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdLayerStackWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdLayerStackWidget.h index 60e9387957134fb6e58e967d6e257bb5a63b442a..7fd1ba1e89205497532ed4e8416a452e8af10e5f 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdLayerStackWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdLayerStackWidget.h @@ -150,13 +150,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /** */ // bugFix for layer deletion @@ -231,7 +231,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** * \see http://qt-project.org/doc/qt-4.8/qitemselectionmodel.html#currentRowChanged */ diff --git a/Modules/Visualization/MonteverdiGui/include/mvdMainWindowTitleLoader.h b/Modules/Visualization/MonteverdiGui/include/mvdMainWindowTitleLoader.h index 012d091b7987aff54ea408e1dbd1b0db3ab24250..a248d471476203d43ede9643d61278fb09c5db78 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdMainWindowTitleLoader.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdMainWindowTitleLoader.h @@ -78,11 +78,11 @@ public: /** \brief Constructor */ MainWindowTitleLoader(VectorImageModel* model); -public slots: +public Q_SLOTS: /** \brief Trigger the dataset creation */ void LoadTitle(); -signals: +Q_SIGNALS: /** \brief Triggered after model is ready */ void TitleLoaded(const QString&); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdMultiResolutionPyramidWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdMultiResolutionPyramidWidget.h index a936554c37e15325e9ba2556a9927c7acf60fddb..62e751e85c6b752736f76917c755da5775b3b66e 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdMultiResolutionPyramidWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdMultiResolutionPyramidWidget.h @@ -107,13 +107,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: void BaseValueChanged(int); void LevelsValueChanged(int); @@ -157,7 +157,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: void on_baseSpinBox_valueChanged(int); void on_levelsSpinBox_valueChanged(int); void on_sizeSpinBox_valueChanged(int); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdMyWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdMyWidget.h index 891b13e39ab13c637f87eaab57aaa4675f56ceea..17fb8f2f451a48c426a152146fb408485b057c7e 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdMyWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdMyWidget.h @@ -101,13 +101,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -134,7 +134,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdOTBApplicationsModel.h b/Modules/Visualization/MonteverdiGui/include/mvdOTBApplicationsModel.h index 6a0f49e01e9b985d41c1e35c66019a9028bca2f0..1335c3a17a8de5e9b372818b3226d584bff437fd 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdOTBApplicationsModel.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdOTBApplicationsModel.h @@ -117,7 +117,7 @@ public: // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -155,7 +155,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdPixelDescriptionWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdPixelDescriptionWidget.h index 86fd1a645cbd45684d0d6913ca650e0771517506..269732075b1365fca5d5aef3cbbf61b1d7f9f645 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdPixelDescriptionWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdPixelDescriptionWidget.h @@ -102,7 +102,7 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: void OnCurrentPhysicalUpdated(const QStringList&); @@ -114,7 +114,7 @@ public slots: // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -166,7 +166,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; /*****************************************************************************/ diff --git a/Modules/Visualization/MonteverdiGui/include/mvdProjectionBarWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdProjectionBarWidget.h index 9139e41bce188e44cf4bc70969826a98c8d4ee7f..ec833f61fc7a125e86e261a753b5e3cd9f0df5cb 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdProjectionBarWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdProjectionBarWidget.h @@ -82,7 +82,7 @@ public: /** \brief Destructor. */ ~ProjectionBarWidget() override; -public slots: +public Q_SLOTS: void SetProjectionScale(double scale_x, double scale_y); private: @@ -92,12 +92,12 @@ private: Ui::ProjectionBarWidget* m_UI; /** - * emit a signal to change the scale if projectionScaleLineEdit is changed + * Q_EMIT a signal to change the scale if projectionScaleLineEdit is changed * and if the input text is valid. */ void ChangeScale(); -private slots: +private Q_SLOTS: /** * When user edit the projection scale line */ @@ -107,7 +107,7 @@ private slots: */ void on_projectionScaleLineEdit_returnPressed(); -signals: +Q_SIGNALS: /** */ void ProjectionScaleChanged(double); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdQtWidgetView.h b/Modules/Visualization/MonteverdiGui/include/mvdQtWidgetView.h index 013e844bdc590efc827b2ec71eccd6b060bd95eb..cb44f96e7534c4404dbf63e82c95ca51693509cc 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdQtWidgetView.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdQtWidgetView.h @@ -87,7 +87,7 @@ private: void SetupFileSelectionWidget(QWidget*); -private slots: +private Q_SLOTS: // slot in charge of emitting a signal to the catalogue mainWindow. // when received, the main application need to get the output diff --git a/Modules/Visualization/MonteverdiGui/include/mvdQuicklookViewManipulator.h b/Modules/Visualization/MonteverdiGui/include/mvdQuicklookViewManipulator.h index fc191d08ad625bded2edd1f4b43e7f7040cb23b5..34ada84235b3e9cb69ad5d7a7698e462f3c0b959 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdQuicklookViewManipulator.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdQuicklookViewManipulator.h @@ -128,13 +128,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -169,7 +169,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** */ void OnRoiChanged(const PointType& origin, const SizeType& size, const SpacingType& spacing, const PointType& center); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdQuicklookViewRenderer.h b/Modules/Visualization/MonteverdiGui/include/mvdQuicklookViewRenderer.h index 4424169f426641bd4fd60c7ddc0234cc21d07338..0623043a2df4f3dfda320e8f6341f5b02c633ded 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdQuicklookViewRenderer.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdQuicklookViewRenderer.h @@ -127,13 +127,13 @@ public: /*-[ PUBLIC SLOTS SECTION ]------------------------------------------------*/ // public slots -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // SIGNALS. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -180,7 +180,7 @@ private: // // SLOTS. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdSearchableTreeWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdSearchableTreeWidget.h index 3a5c2fa32ab020f8f4263ea0ecfb12f85db1e0fb..a314752c710a945e999fde5c3bdaa3b1b6965578 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdSearchableTreeWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdSearchableTreeWidget.h @@ -105,14 +105,14 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -153,7 +153,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** * \brief Slot called when the current item of the QWidgetTree has diff --git a/Modules/Visualization/MonteverdiGui/include/mvdShaderWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdShaderWidget.h index 639bca9f0ca2bd58b5be51becc992b322a173bdd..dd901cc895f6389a9c9db3f4905ba8a8b5446f34 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdShaderWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdShaderWidget.h @@ -110,7 +110,7 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: void GrayscaleActivated(bool status); @@ -118,7 +118,7 @@ public slots: // // Signals. -signals: +Q_SIGNALS: void SettingsChanged(); /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -159,7 +159,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: void on_effectComboBox_currentIndexChanged(const QString&); void on_sizeSpinBox_valueChanged(int); void on_valueLineEdit_editingFinished(); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdStatusBarWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdStatusBarWidget.h index c95ccc92aa818828b2790898dbb90cef24cf7d91..156e6fc6e0176ce022419da187980dd31ea30e74 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdStatusBarWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdStatusBarWidget.h @@ -101,7 +101,7 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /** */ @@ -123,7 +123,7 @@ public slots: // // Signals. -signals: +Q_SIGNALS: /** */ void ScaleChanged(double); @@ -165,7 +165,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** */ // void SetPixelIndexText( const QString& ); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdTaskProgressDialog.h b/Modules/Visualization/MonteverdiGui/include/mvdTaskProgressDialog.h index 17e68a5a92e553c80ca33bff2231ccdfefccb394..4f55cafb68b2c9eec63b00e71fdda35c24bebee9 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdTaskProgressDialog.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdTaskProgressDialog.h @@ -114,13 +114,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -156,7 +156,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: /** */ void OnDone(QObject* result); diff --git a/Modules/Visualization/MonteverdiGui/include/mvdTreeWidget.h b/Modules/Visualization/MonteverdiGui/include/mvdTreeWidget.h index 61265a753f4c182674bf0648e8444cf4c2895a51..c33de0e07572cf8a9ed255fc39666ccf3f048daa 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdTreeWidget.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdTreeWidget.h @@ -126,13 +126,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /** */ @@ -173,7 +173,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdTreeWidgetItem.h b/Modules/Visualization/MonteverdiGui/include/mvdTreeWidgetItem.h index 04d7a53c5959a2bad98bbfd4eec5ca331b19c792..6c671f52d16c03b11f8dd8df50448fdebe6ee013 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdTreeWidgetItem.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdTreeWidgetItem.h @@ -146,13 +146,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /*-[ PROTECTED SECTION ]---------------------------------------------------*/ @@ -188,7 +188,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/include/mvdTreeWidgetItemDragAndDropEventFilter.h b/Modules/Visualization/MonteverdiGui/include/mvdTreeWidgetItemDragAndDropEventFilter.h index 9aabb0e68bf003c46be8ee0942478a741348c7ff..3616f374e6ebc9a4f078f24dcf14bd53a5a02a64 100644 --- a/Modules/Visualization/MonteverdiGui/include/mvdTreeWidgetItemDragAndDropEventFilter.h +++ b/Modules/Visualization/MonteverdiGui/include/mvdTreeWidgetItemDragAndDropEventFilter.h @@ -97,13 +97,13 @@ public: // // Public SLOTS. -public slots: +public Q_SLOTS: /*-[ SIGNALS SECTION ]-----------------------------------------------------*/ // // Signals. -signals: +Q_SIGNALS: /** */ @@ -150,7 +150,7 @@ private: // // Slots. -private slots: +private Q_SLOTS: }; } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/src/mvdAbstractModelController.cxx b/Modules/Visualization/MonteverdiGui/src/mvdAbstractModelController.cxx index b3bb100ec955aad1cb467fb3427267069b4855e4..3dd2902f5daff6f2cc9b519d2bff07944a9a7217 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdAbstractModelController.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdAbstractModelController.cxx @@ -105,13 +105,13 @@ void AbstractModelController::private_Connect(AbstractModel* model) if (model == NULL) return; - emit AboutToConnectModel(model); + Q_EMIT AboutToConnectModel(model); QObject::connect(model, SIGNAL(destroyed(QObject*)), this, SLOT(OnDestroyed(QObject*))); Connect(model); - emit ModelConnected(model); + Q_EMIT ModelConnected(model); } /*****************************************************************************/ @@ -120,13 +120,13 @@ void AbstractModelController::private_Disconnect(AbstractModel* model) if (model == NULL) return; - emit AboutToDisconnectModel(model); + Q_EMIT AboutToDisconnectModel(model); Disconnect(model); QObject::disconnect(model, SIGNAL(destroyed(QObject*)), this, SLOT(OnDestroyed(QObject*))); - emit ModelDisconnected(model); + Q_EMIT ModelDisconnected(model); } /*****************************************************************************/ @@ -146,7 +146,7 @@ void AbstractModelController::ResetWidget() // Signal model has been updated. // When resetting widget, data is read from model and set into // widget so, there's no need to signal back model update. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); #endif } diff --git a/Modules/Visualization/MonteverdiGui/src/mvdApplicationsToolBox.cxx b/Modules/Visualization/MonteverdiGui/src/mvdApplicationsToolBox.cxx index b2b6ea110f18e41e074b982cc6d3e402ca7438a2..66662fb7488006efda3a18f325ce2726cd5eeb67 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdApplicationsToolBox.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdApplicationsToolBox.cxx @@ -224,7 +224,7 @@ void ApplicationsToolBox::LaunchApplication(const QString& appName) { assert(!appName.isEmpty()); - emit ApplicationToLaunchSelected(appName); + Q_EMIT ApplicationToLaunchSelected(appName); } /*******************************************************************************/ diff --git a/Modules/Visualization/MonteverdiGui/src/mvdColorBandDynamicsWidget.cxx b/Modules/Visualization/MonteverdiGui/src/mvdColorBandDynamicsWidget.cxx index df979b9d723425d9e59c6e65e214e195b4a704eb..6f2fe8103545fd4de83b397b0239153ea75989c6 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdColorBandDynamicsWidget.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdColorBandDynamicsWidget.cxx @@ -233,7 +233,7 @@ void ColorBandDynamicsWidget::on_lowIntensityLineEdit_editingFinished() #endif } - emit LowIntensityChanged(m_Channel, value); + Q_EMIT LowIntensityChanged(m_Channel, value); } /*****************************************************************************/ @@ -258,37 +258,37 @@ void ColorBandDynamicsWidget::on_highIntensityLineEdit_editingFinished() #endif } - emit HighIntensityChanged(m_Channel, value); + Q_EMIT HighIntensityChanged(m_Channel, value); } /*****************************************************************************/ void ColorBandDynamicsWidget::on_lowQuantileSpinBox_valueChanged(double value) { - emit LowQuantileChanged(m_Channel, value); + Q_EMIT LowQuantileChanged(m_Channel, value); } /*****************************************************************************/ void ColorBandDynamicsWidget::on_highQuantileSpinBox_valueChanged(double value) { - emit HighQuantileChanged(m_Channel, value); + Q_EMIT HighQuantileChanged(m_Channel, value); } /*****************************************************************************/ void ColorBandDynamicsWidget::on_minMaxButton_clicked() { - emit ResetIntensityClicked(m_Channel); + Q_EMIT ResetIntensityClicked(m_Channel); } /*****************************************************************************/ void ColorBandDynamicsWidget::on_defaultsButton_clicked() { - emit ResetQuantileClicked(m_Channel); + Q_EMIT ResetQuantileClicked(m_Channel); } /*****************************************************************************/ void ColorBandDynamicsWidget::on_applyAllButton_clicked() { - emit ApplyAllClicked(m_Channel, m_UI->lowQuantileSpinBox->value(), m_UI->highQuantileSpinBox->value()); + Q_EMIT ApplyAllClicked(m_Channel, m_UI->lowQuantileSpinBox->value(), m_UI->highQuantileSpinBox->value()); } /*****************************************************************************/ @@ -307,7 +307,7 @@ void ColorBandDynamicsWidget::on_linkButton_toggled(bool checked) } */ - emit LinkToggled(m_Channel, checked); + Q_EMIT LinkToggled(m_Channel, checked); } } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/src/mvdColorDynamicsController.cxx b/Modules/Visualization/MonteverdiGui/src/mvdColorDynamicsController.cxx index 9ba734db2e98b001616d72fc8df441751794663c..2e947289ce99cae1ccb373d1567522bd7ca1284a 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdColorDynamicsController.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdColorDynamicsController.cxx @@ -418,8 +418,8 @@ void ColorDynamicsController::ResetIntensities(RgbwChannel channels) } this->blockSignals(thisSignalsBlocks); - emit LowIntensityChanged(channel, min, false); - emit HighIntensityChanged(channel, max, false); + Q_EMIT LowIntensityChanged(channel, min, false); + Q_EMIT HighIntensityChanged(channel, max, false); } } @@ -477,8 +477,8 @@ void ColorDynamicsController::SetIntensities(RgbwChannel channels) } this->blockSignals(thisSignalsBlocked); - emit LowIntensityChanged(channel, low, true); - emit HighIntensityChanged(channel, hi, true); + Q_EMIT LowIntensityChanged(channel, low, true); + Q_EMIT HighIntensityChanged(channel, hi, true); } } @@ -715,10 +715,10 @@ void ColorDynamicsController::RefreshHistogram() } // Signal histogram has been refreshed. - emit HistogramRefreshed(); + Q_EMIT HistogramRefreshed(); // Signal model has been updated. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } /*****************************************************************************/ @@ -737,7 +737,7 @@ void ColorDynamicsController::OnRgbChannelIndexChanged(RgbwChannel channel, int) ResetQuantiles(channel); // Signal model has been updated. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } /*****************************************************************************/ @@ -752,7 +752,7 @@ void ColorDynamicsController::OnGrayChannelIndexChanged(int) ResetQuantiles(RGBW_CHANNEL_WHITE); // Signal model has been updated. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } /*******************************************************************************/ @@ -771,7 +771,7 @@ void ColorDynamicsController::OnGrayscaleActivated(bool activated) ResetQuantiles(activated ? RGBW_CHANNEL_WHITE : RGBW_CHANNEL_RGB); // Signal model has been updated. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } /*****************************************************************************/ @@ -834,11 +834,11 @@ void ColorDynamicsController::OnLowQuantileChanged(RgbwChannel channel, double v } colorBandDynWgt->blockSignals(widgetSignalsBlocked); - emit LowIntensityChanged(chan, intensity, true); + Q_EMIT LowIntensityChanged(chan, intensity, true); } // Signal model has been updated. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } /*****************************************************************************/ @@ -901,11 +901,11 @@ void ColorDynamicsController::OnHighQuantileChanged(RgbwChannel channel, double } widgetSignalsBlocked = colorBandDynWgt->blockSignals(widgetSignalsBlocked); - emit HighIntensityChanged(chan, intensity, true); + Q_EMIT HighIntensityChanged(chan, intensity, true); } // Signal model has been updated. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } /*****************************************************************************/ @@ -959,11 +959,11 @@ void ColorDynamicsController::OnLowIntensityChanged(RgbwChannel channel, double wgtSignalsBlocked = colorBandDynWgt->blockSignals(wgtSignalsBlocked); } - emit LowIntensityChanged(chan, value, true); + Q_EMIT LowIntensityChanged(chan, value, true); } // Signal model has been updated. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } /*****************************************************************************/ @@ -1018,11 +1018,11 @@ void ColorDynamicsController::OnHighIntensityChanged(RgbwChannel channel, double colorBandDynWgt->blockSignals(widgetSignalsBlocked); } - emit HighIntensityChanged(chan, value, true); + Q_EMIT HighIntensityChanged(chan, value, true); } // Signal model has been updated. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } /*****************************************************************************/ @@ -1035,10 +1035,10 @@ void ColorDynamicsController::OnResetIntensityClicked(RgbwChannel channel) ResetIntensities(channel); // Emit signal to force histogram refresh. - emit HistogramRefreshed(); + Q_EMIT HistogramRefreshed(); - // Now, emit this controller's signal to cause display refresh. - emit ModelUpdated(); + // Now, Q_EMIT this controller's signal to cause display refresh. + Q_EMIT ModelUpdated(); } /*****************************************************************************/ @@ -1051,10 +1051,10 @@ void ColorDynamicsController::OnResetQuantileClicked(RgbwChannel channel) ResetQuantiles(channel); // Emit signal to force histogram refresh. - emit HistogramRefreshed(); + Q_EMIT HistogramRefreshed(); - // Now, emit this controller's signal to cause display refresh. - emit ModelUpdated(); + // Now, Q_EMIT this controller's signal to cause display refresh. + Q_EMIT ModelUpdated(); } /*****************************************************************************/ @@ -1120,15 +1120,15 @@ void ColorDynamicsController::OnApplyAllClicked(RgbwChannel, double low, double } colorBandDynWgt->blockSignals(widgetSignalsBlocked); - emit LowIntensityChanged(chan, lintensity, false); - emit HighIntensityChanged(chan, uintensity, false); + Q_EMIT LowIntensityChanged(chan, lintensity, false); + Q_EMIT HighIntensityChanged(chan, uintensity, false); } // Force histogram refresh. - emit HistogramRefreshed(); + Q_EMIT HistogramRefreshed(); - // Now, emit this controller's signal to cause display refresh. - emit ModelUpdated(); + // Now, Q_EMIT this controller's signal to cause display refresh. + Q_EMIT ModelUpdated(); } /*****************************************************************************/ @@ -1205,7 +1205,7 @@ void ColorDynamicsController::OnLinkToggled(RgbwChannel channel, bool checked) { RestoreQuantiles(channel); - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } } @@ -1233,7 +1233,7 @@ void ColorDynamicsController::OnGammaValueChanged(double value) imageModel->GetSettings().SetGamma(value); // Emit refresh signal. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } /*****************************************************************************/ diff --git a/Modules/Visualization/MonteverdiGui/src/mvdColorDynamicsWidget.cxx b/Modules/Visualization/MonteverdiGui/src/mvdColorDynamicsWidget.cxx index c43a90a9451731b5a2ebcdd98b5deb6e56841eda..031da632fa2c63e96249476e26dc93490f8ed2ae 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdColorDynamicsWidget.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdColorDynamicsWidget.cxx @@ -317,7 +317,7 @@ void ColorDynamicsWidget::SetNoDataButtonChecked(bool checked) /*****************************************************************************/ void ColorDynamicsWidget::on_noDataCheckBox_toggled(bool enabled) { - emit NoDataFlagToggled(enabled); + Q_EMIT NoDataFlagToggled(enabled); } /*****************************************************************************/ @@ -330,7 +330,7 @@ void ColorDynamicsWidget::on_noDataLineEdit_textChanged(const QString& text) { } - emit NoDataValueChanged(value); + Q_EMIT NoDataValueChanged(value); } /*****************************************************************************/ @@ -348,16 +348,16 @@ void ColorDynamicsWidget::on_noDataButton_toggled(bool checked) if (checked) { - emit NoDataButtonPressed(); + Q_EMIT NoDataButtonPressed(); } } /*****************************************************************************/ void ColorDynamicsWidget::on_gammaSlider_valueChanged(int value) { - emit GammaCursorPositionChanged(value); + Q_EMIT GammaCursorPositionChanged(value); - emit GammaValueChanged(GetGamma()); + Q_EMIT GammaValueChanged(GetGamma()); // Display Gamma value as a tooltip when value changed QToolTip::showText(mapToGlobal(m_UI->gammaSlider->pos()), tr("Gamma: ") % QString::number(GetGamma())); diff --git a/Modules/Visualization/MonteverdiGui/src/mvdColorSetupController.cxx b/Modules/Visualization/MonteverdiGui/src/mvdColorSetupController.cxx index 3abbff9905e12cbaf69cf5f2c25972d16e28a738..bdddf5e8c4035fc38cb63d85c8f8629304f23fe1 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdColorSetupController.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdColorSetupController.cxx @@ -313,10 +313,10 @@ void ColorSetupController::OnCurrentRgbIndexChanged(RgbwChannel channel, int ind // Signal band-index of RGB channel has changed to other // controllers. - emit RgbChannelIndexChanged(channel, index); + Q_EMIT RgbChannelIndexChanged(channel, index); // Signal model has been updated. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } /*******************************************************************************/ @@ -333,10 +333,10 @@ void ColorSetupController::OnCurrentGrayIndexChanged(int index) // Signal band-index of gray channel has changed to other // controllers. - emit GrayChannelIndexChanged(index); + Q_EMIT GrayChannelIndexChanged(index); // Signal model has been updated. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } /*******************************************************************************/ @@ -353,10 +353,10 @@ void ColorSetupController::OnGrayscaleActivated(bool activated) // Signal grayscale-mode activation-state has changed to other // controllers. - emit GrayscaleActivated(activated); + Q_EMIT GrayscaleActivated(activated); // Signal model has been updated. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } /*******************************************************************************/ @@ -370,7 +370,7 @@ void ColorSetupController::OnAlphaValueChanged(double alpha) imageModel->GetSettings().SetAlpha(alpha); // Signal model has been updated. - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/src/mvdColorSetupWidget.cxx b/Modules/Visualization/MonteverdiGui/src/mvdColorSetupWidget.cxx index 0395d1b828d54283f3bb03157c995b5a48baf2a5..e0d8a658aa1dd6b13b31ab762d2a67626b82a5f1 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdColorSetupWidget.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdColorSetupWidget.cxx @@ -198,7 +198,7 @@ void ColorSetupWidget::on_alphaSlider_valueChanged(int value) { // qDebug() << "on_alphaSlider_valueChanged(" << value << ")"; - emit AlphaValueChanged(ToAlpha(value)); + Q_EMIT AlphaValueChanged(ToAlpha(value)); } /*******************************************************************************/ diff --git a/Modules/Visualization/MonteverdiGui/src/mvdFilenameDragAndDropEventFilter.cxx b/Modules/Visualization/MonteverdiGui/src/mvdFilenameDragAndDropEventFilter.cxx index 91f8e339d1e5b65722076381f9fcc59b6a322377..bc2e4d5a38937174bf89ea3c1a3420e568ba324b 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdFilenameDragAndDropEventFilter.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdFilenameDragAndDropEventFilter.cxx @@ -171,7 +171,7 @@ bool FilenameDragAndDropEventFilter::DropEvent(QObject* watched, QDropEvent* e) { filenames.push_back(it->toLocalFile()); - emit FilenameDropped(filenames.back()); + Q_EMIT FilenameDropped(filenames.back()); } } else @@ -180,7 +180,7 @@ bool FilenameDragAndDropEventFilter::DropEvent(QObject* watched, QDropEvent* e) } } - emit FilenamesDropped(filenames); + Q_EMIT FilenamesDropped(filenames); // // Eatup event. diff --git a/Modules/Visualization/MonteverdiGui/src/mvdImageViewManipulator.cxx b/Modules/Visualization/MonteverdiGui/src/mvdImageViewManipulator.cxx index 84bee7b797b049103fc289502d9833cddcb9353e..91d78ea36629eb86522993c102f690837ed41f0b 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdImageViewManipulator.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdImageViewManipulator.cxx @@ -231,7 +231,7 @@ void ImageViewManipulator::CenterOn(const PointType& point) m_ViewSettings->Center(point); - emit RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), point); + Q_EMIT RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), point); } /******************************************************************************/ @@ -272,9 +272,9 @@ void ImageViewManipulator::ZoomTo(double scale) m_ViewSettings->Center(center); // Emit ROI changed. - emit RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), center); + Q_EMIT RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), center); - // emit RenderingContextChanged(center,GetSpacing()[0]); + // Q_EMIT RenderingContextChanged(center,GetSpacing()[0]); } /******************************************************************************/ @@ -286,7 +286,7 @@ void ImageViewManipulator::ZoomIn() Scale(QPoint(size[0] / 2, size[1] / 2), m_ZoomGranularity * MOUSE_WHEEL_STEP_DEGREES, &point); - emit RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), point); + Q_EMIT RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), point); } /******************************************************************************/ @@ -298,7 +298,7 @@ void ImageViewManipulator::ZoomOut() Scale(QPoint(size[0] / 2, size[1] / 2), -m_ZoomGranularity * MOUSE_WHEEL_STEP_DEGREES, &point); - emit RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), point); + Q_EMIT RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), point); } /******************************************************************************/ @@ -325,7 +325,7 @@ void ImageViewManipulator::ResetViewport() m_NativeSpacing.Fill(1.0); m_ZoomFactor = 1.0; - emit RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), m_ViewSettings->GetViewportCenter()); + Q_EMIT RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), m_ViewSettings->GetViewportCenter()); } /******************************************************************************/ @@ -348,7 +348,7 @@ void ImageViewManipulator::MousePressEvent(QMouseEvent* e) break; case Qt::RightButton: - emit ToggleLayerVisibilityRequested(false); + Q_EMIT ToggleLayerVisibilityRequested(false); break; case Qt::MidButton: @@ -400,9 +400,9 @@ void ImageViewManipulator::MouseMoveEvent(QMouseEvent* e) m_MousePressPosition = e->pos(); - emit RefreshViewRequested(); + Q_EMIT RefreshViewRequested(); - emit RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), m_ViewSettings->GetViewportCenter()); + Q_EMIT RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), m_ViewSettings->GetViewportCenter()); } } @@ -433,11 +433,11 @@ void ImageViewManipulator::MouseReleaseEvent(QMouseEvent* e) m_MousePressOrigin = PointType(); m_IsMouseDragging = false; - emit RefreshViewRequested(); + Q_EMIT RefreshViewRequested(); break; case Qt::RightButton: - emit ToggleLayerVisibilityRequested(true); + Q_EMIT ToggleLayerVisibilityRequested(true); break; case Qt::MidButton: @@ -521,45 +521,45 @@ void ImageViewManipulator::WheelEvent(QWheelEvent* e) int degrees = e->delta() / MOUSE_WHEEL_STEP_FACTOR; if (modifiers == Qt::ControlModifier) - emit RotateLayersRequested(e->delta() / (MOUSE_WHEEL_STEP_FACTOR * MOUSE_WHEEL_STEP_DEGREES)); + Q_EMIT RotateLayersRequested(e->delta() / (MOUSE_WHEEL_STEP_FACTOR * MOUSE_WHEEL_STEP_DEGREES)); // else if (modifiers == Qt::MetaModifier) { // qDebug() << "META+Wheel" << e->delta(); - emit ShiftAlphaRequested(static_cast<double>(m_AlphaGranularity * e->delta() / (MOUSE_WHEEL_STEP_FACTOR * MOUSE_WHEEL_STEP_DEGREES)) / 100.0); + Q_EMIT ShiftAlphaRequested(static_cast<double>(m_AlphaGranularity * e->delta() / (MOUSE_WHEEL_STEP_FACTOR * MOUSE_WHEEL_STEP_DEGREES)) / 100.0); } else if (modifiers == (Qt::MetaModifier | Qt::ShiftModifier)) { // qDebug() << "META+SHIFT+Wheel" << e->delta(); - emit UpdateGammaRequested(ImageViewManipulator::Factor(degrees, MOUSE_WHEEL_STEP_DEGREES)); + Q_EMIT UpdateGammaRequested(ImageViewManipulator::Factor(degrees, MOUSE_WHEEL_STEP_DEGREES)); } // else if (modifiers == Qt::AltModifier) { // qDebug() << "ALT+Wheel" << e->delta(); - emit ResizeShaderRequested(ImageViewManipulator::Factor(degrees, MOUSE_WHEEL_STEP_DEGREES)); + Q_EMIT ResizeShaderRequested(ImageViewManipulator::Factor(degrees, MOUSE_WHEEL_STEP_DEGREES)); } else if (modifiers == (Qt::AltModifier | Qt::ShiftModifier)) { // qDebug() << "ALT+SHIFT+Wheel" << e->delta(); - emit ReparamShaderRequested(ImageViewManipulator::Factor(degrees, MOUSE_WHEEL_STEP_DEGREES)); + Q_EMIT ReparamShaderRequested(ImageViewManipulator::Factor(degrees, MOUSE_WHEEL_STEP_DEGREES)); } // else if (modifiers == (Qt::ControlModifier | Qt::AltModifier)) { // qDebug() << "CTRL+ALT+Wheel" << e->delta(); - emit ShiftDynamicsRequested(m_DynamicsShiftGranularity * static_cast<double>(e->delta() / (MOUSE_WHEEL_STEP_FACTOR * MOUSE_WHEEL_STEP_DEGREES))); + Q_EMIT ShiftDynamicsRequested(m_DynamicsShiftGranularity * static_cast<double>(e->delta() / (MOUSE_WHEEL_STEP_FACTOR * MOUSE_WHEEL_STEP_DEGREES))); } else if (modifiers == (Qt::ControlModifier | Qt::AltModifier | Qt::ShiftModifier)) { // qDebug() << "CTRL+ALT+SHIFT+Wheel" << e->delta(); - emit ScaleDynamicsRequested(ImageViewManipulator::Factor(degrees, MOUSE_WHEEL_STEP_DEGREES)); + Q_EMIT ScaleDynamicsRequested(ImageViewManipulator::Factor(degrees, MOUSE_WHEEL_STEP_DEGREES)); } // else if (modifiers == Qt::NoModifier) @@ -581,9 +581,9 @@ void ImageViewManipulator::WheelEvent(QWheelEvent* e) Scale(e->pos(), degrees, &point); - emit RefreshViewRequested(); + Q_EMIT RefreshViewRequested(); - emit RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), point); + Q_EMIT RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), point); } } @@ -628,96 +628,96 @@ void ImageViewManipulator::KeyPressEvent(QKeyEvent* e) case Qt::Key_PageUp: if (e->modifiers() == Qt::ShiftModifier) - emit LayerToTopRequested(); + Q_EMIT LayerToTopRequested(); else - emit RaiseLayerRequested(); + Q_EMIT RaiseLayerRequested(); break; case Qt::Key_PageDown: if (e->modifiers() == Qt::ShiftModifier) - emit LayerToBottomRequested(); + Q_EMIT LayerToBottomRequested(); else - emit LowerLayerRequested(); + Q_EMIT LowerLayerRequested(); break; case Qt::Key_Home: if (e->modifiers() == Qt::ShiftModifier) - emit SelectFirstLayerRequested(); + Q_EMIT SelectFirstLayerRequested(); else - emit SelectPreviousLayerRequested(); + Q_EMIT SelectPreviousLayerRequested(); break; case Qt::Key_End: if (e->modifiers() == Qt::ShiftModifier) - emit SelectLastLayerRequested(); + Q_EMIT SelectLastLayerRequested(); else - emit SelectNextLayerRequested(); + Q_EMIT SelectNextLayerRequested(); break; case Qt::Key_Delete: if (modifiers.testFlag(Qt::ShiftModifier)) - emit DeleteAllRequested(); + Q_EMIT DeleteAllRequested(); else - emit DeleteSelectedRequested(); + Q_EMIT DeleteSelectedRequested(); break; case Qt::Key_1: - emit ZoomToFullResolutionRequested(); + Q_EMIT ZoomToFullResolutionRequested(); break; case Qt::Key_2: - emit ZoomToLayerExtentRequested(); + Q_EMIT ZoomToLayerExtentRequested(); break; case Qt::Key_3: - emit ZoomToFullExtentRequested(); + Q_EMIT ZoomToFullExtentRequested(); break; case Qt::Key_A: - emit ApplyAllRequested(); + Q_EMIT ApplyAllRequested(); break; case Qt::Key_C: - emit ShaderEffectRequested(EFFECT_CHESSBOARD); + Q_EMIT ShaderEffectRequested(EFFECT_CHESSBOARD); break; case Qt::Key_G: - emit ShaderEffectRequested(EFFECT_GRADIENT); + Q_EMIT ShaderEffectRequested(EFFECT_GRADIENT); break; case Qt::Key_D: - emit ShaderEffectRequested(EFFECT_LOCAL_CONTRAST); + Q_EMIT ShaderEffectRequested(EFFECT_LOCAL_CONTRAST); break; case Qt::Key_H: - emit ShaderEffectRequested(EFFECT_SWIPE_H); + Q_EMIT ShaderEffectRequested(EFFECT_SWIPE_H); break; case Qt::Key_N: - emit ShaderEffectRequested(EFFECT_NORMAL); + Q_EMIT ShaderEffectRequested(EFFECT_NORMAL); break; case Qt::Key_P: if (modifiers.testFlag(Qt::ControlModifier)) - emit TakeScreenshotRequested(modifiers.testFlag(Qt::ShiftModifier)); + Q_EMIT TakeScreenshotRequested(modifiers.testFlag(Qt::ShiftModifier)); else - emit SetReferenceRequested(); + Q_EMIT SetReferenceRequested(); break; case Qt::Key_Q: - emit ResetQuantilesRequested(modifiers.testFlag(Qt::ShiftModifier)); + Q_EMIT ResetQuantilesRequested(modifiers.testFlag(Qt::ShiftModifier)); break; case Qt::Key_S: - emit ShaderEffectRequested(EFFECT_SPECTRAL_ANGLE); + Q_EMIT ShaderEffectRequested(EFFECT_SPECTRAL_ANGLE); break; case Qt::Key_T: - emit ShaderEffectRequested(EFFECT_LOCAL_TRANSLUCENCY); + Q_EMIT ShaderEffectRequested(EFFECT_LOCAL_TRANSLUCENCY); break; case Qt::Key_V: - emit ShaderEffectRequested(EFFECT_SWIPE_V); + Q_EMIT ShaderEffectRequested(EFFECT_SWIPE_V); break; default: @@ -772,9 +772,9 @@ void ImageViewManipulator::KeyPressEvent(QKeyEvent* e) // Refresh if (needsRefresh) { - emit RefreshViewRequested(); + Q_EMIT RefreshViewRequested(); - emit RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), m_ViewSettings->GetViewportCenter()); + Q_EMIT RoiChanged(GetOrigin(), GetViewportSize(), GetSpacing(), m_ViewSettings->GetViewportCenter()); } } @@ -869,7 +869,7 @@ void ImageViewManipulator::OnTimeout() SetFastRenderMode(false); - emit RefreshViewRequested(); + Q_EMIT RefreshViewRequested(); delete m_Timer; m_Timer = NULL; diff --git a/Modules/Visualization/MonteverdiGui/src/mvdImageViewRenderer.cxx b/Modules/Visualization/MonteverdiGui/src/mvdImageViewRenderer.cxx index 917fb0300ad3444f2a26d30e7386cbd5dde43bb7..5ebd3a848f3f8f90bbdbb7dddefd3706fd159f85 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdImageViewRenderer.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdImageViewRenderer.cxx @@ -803,7 +803,7 @@ void ImageViewRenderer::virtual_ClearScene(bool keepViewport) // // MANTIS-1244: image-view not reset when layer-stack is cleared. // { - emit ResetViewport(); + Q_EMIT ResetViewport(); // } } @@ -932,7 +932,7 @@ void ImageViewRenderer::virtual_RefreshScene() // m_GlView->GetSettings()->SetUseProjection( false ); - // emit ClearProjectionRequired(); + // Q_EMIT ClearProjectionRequired(); return; } @@ -951,7 +951,7 @@ void ImageViewRenderer::virtual_RefreshScene() m_GlView->GetSettings()->SetUseProjection(false); - emit ClearProjectionRequired(); + Q_EMIT ClearProjectionRequired(); return; } @@ -996,13 +996,13 @@ void ImageViewRenderer::virtual_RefreshScene() { virtual_SetProjection(); - emit SetProjectionRequired(); + Q_EMIT SetProjectionRequired(); } else if (m_ReferencePair.first != referencePair.first) { virtual_UpdateProjection(); - emit UpdateProjectionRequired(); + Q_EMIT UpdateProjectionRequired(); } } diff --git a/Modules/Visualization/MonteverdiGui/src/mvdImageViewWidget.cxx b/Modules/Visualization/MonteverdiGui/src/mvdImageViewWidget.cxx index 9436261478cb8f57eb4be0d4be89c26503fd1815..a4ca731949d13110b07774ed2a85c228e45f69bd 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdImageViewWidget.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdImageViewWidget.cxx @@ -583,13 +583,13 @@ void ImageViewWidget::mouseMoveEvent(QMouseEvent* e) // // Emit reference-layer pixel data. - emit PixelInfoChanged(e->pos(), ptView, stackedLayerModel->PixelInfos()); + Q_EMIT PixelInfoChanged(e->pos(), ptView, stackedLayerModel->PixelInfos()); if (stackedLayerModel->HasCurrent()) - emit PhysicalCursorPositionChanged(e->pos(), ptView, pixels[stackedLayerModel->GetCurrentIndex()].m_Point, + Q_EMIT PhysicalCursorPositionChanged(e->pos(), ptView, pixels[stackedLayerModel->GetCurrentIndex()].m_Point, pixels[stackedLayerModel->GetCurrentIndex()].m_Pixel); else - emit PhysicalCursorPositionChanged(e->pos(), ptView, PointType(), DefaultImageType::PixelType()); + Q_EMIT PhysicalCursorPositionChanged(e->pos(), ptView, PointType(), DefaultImageType::PixelType()); } else if (isAnyEffectActive) { @@ -1032,7 +1032,7 @@ void ImageViewWidget::OnApplyAllRequested() } } - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } } @@ -1057,7 +1057,7 @@ ImageViewWidget } } - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } /******************************************************************************/ @@ -1283,7 +1283,7 @@ void ImageViewWidget::OnResetQuantilesRequested(bool isGlobal) } */ - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } } @@ -1310,7 +1310,7 @@ void ImageViewWidget::OnResizeShaderRequested(double factor) imageModel->GetSettings().SetSize(static_cast<double>(imageModel->GetSettings().GetSize()) * factor); - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } } @@ -1338,7 +1338,7 @@ void ImageViewWidget::OnReparamShaderRequested(double factor) imageModel->GetSettings().SetValue(static_cast<double>(imageModel->GetSettings().GetValue()) * factor); - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } } @@ -1352,7 +1352,7 @@ void ImageViewWidget::OnRoiChanged(const PointType&, const SizeType&, const Spac // << "[" << point[ 0 ] << "," << point[ 1 ] << "]" // << "[" << center[ 0 ] << "," << center[ 1 ] << "]"; - emit CenterChanged(center); + Q_EMIT CenterChanged(center); AbstractImageModel* imageModel = m_Renderer->GetReferenceModel<AbstractImageModel>(); @@ -1387,10 +1387,10 @@ void ImageViewWidget::OnRoiChanged(const PointType&, const SizeType&, const Spac update(); // Emit absolute scale. - emit ScaleChanged(rsx, rsy); + Q_EMIT ScaleChanged(rsx, rsy); // Emit zooming scale-factor. - emit RoiChanged(center, rsx, rsy); + Q_EMIT RoiChanged(center, rsx, rsy); } /******************************************************************************/ @@ -1481,7 +1481,7 @@ void ImageViewWidget::OnScaleDynamicsRequested(double factor) } */ - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } } @@ -1637,7 +1637,7 @@ void ImageViewWidget::OnShaderEffectRequested(Effect effect) imageModel->GetSettings().SetEffect(effect); - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } } @@ -1662,7 +1662,7 @@ void ImageViewWidget::OnShiftAlphaRequested(double delta) imageModel->GetSettings().SetAlpha(imageModel->GetSettings().GetAlpha() + delta); - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } } @@ -1768,7 +1768,7 @@ void ImageViewWidget::OnShiftDynamicsRequested(double delta) } */ - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } } @@ -1867,7 +1867,7 @@ void ImageViewWidget::OnUpdateGammaRequested(double factor) imageModel->GetSettings().SetGamma(imageModel->GetSettings().GetGamma() * factor); - emit ModelUpdated(); + Q_EMIT ModelUpdated(); } } diff --git a/Modules/Visualization/MonteverdiGui/src/mvdLayerStackItemModel.cxx b/Modules/Visualization/MonteverdiGui/src/mvdLayerStackItemModel.cxx index 29932954901820010270ad60788e2730956166d6..a34b02d61af11a37542349694603177d72a7d44a 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdLayerStackItemModel.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdLayerStackItemModel.cxx @@ -151,7 +151,7 @@ void LayerStackItemModel::Disconnect(AbstractLayerModel* layer) /*****************************************************************************/ void LayerStackItemModel::SetStack(StackedLayerModel* model) { - // emit layoutAboutToBeChanged(); + // Q_EMIT layoutAboutToBeChanged(); if (m_StackedLayerModel != NULL) { @@ -244,7 +244,7 @@ void LayerStackItemModel::SetStack(StackedLayerModel* model) for (StackedLayerModel::ConstIterator it(m_StackedLayerModel->Begin()); it != m_StackedLayerModel->End(); ++it) Connect(it->second); - // emit layoutChanged(); + // Q_EMIT layoutChanged(); } /*****************************************************************************/ @@ -537,7 +537,7 @@ bool LayerStackItemModel::insertRows(int row, int count, const QModelIndex& p) } endInsertRows(); - // emit dataChanged( index( row, 0 ), index( last, columnCount() - 1 ) ); + // Q_EMIT dataChanged( index( row, 0 ), index( last, columnCount() - 1 ) ); return true; } @@ -552,7 +552,7 @@ QMimeData* LayerStackItemModel::mimeData(const QModelIndexList& indexes) const UrlList urls; - foreach (const QModelIndex& idx, indexes) + Q_FOREACH (const QModelIndex& idx, indexes) if (idx.isValid()) { assert(idx.internalPointer() != NULL); @@ -603,7 +603,7 @@ bool LayerStackItemModel::removeRows(int row, int count, const QModelIndex& p) beginRemoveRows(p, row, row + count - 1); { // StackedLayerModel need to be shortened now - emit LayerDeletingModel(row); + Q_EMIT LayerDeletingModel(row); // TODO: Release additional row data here. } @@ -656,7 +656,7 @@ bool LayerStackItemModel::setData(const QModelIndex& idx, const QVariant& value, if (!strValue.isEmpty()) { layer->SetName(strValue); - emit dataChanged(idx, idx); + Q_EMIT dataChanged(idx, idx); return true; } } @@ -676,7 +676,7 @@ bool LayerStackItemModel::setData(const QModelIndex& idx, const QVariant& value, assert(false && "Unhandled Qt::CheckedState value."); break; } - emit dataChanged(idx, idx); + Q_EMIT dataChanged(idx, idx); return true; break; @@ -705,7 +705,7 @@ Qt::DropActions LayerStackItemModel::supportedDropActions() const // { // qDebug() << this << "::OnAboutContentChanged()"; -// emit layoutAboutToBeChanged(); +// Q_EMIT layoutAboutToBeChanged(); // } /*****************************************************************************/ @@ -723,12 +723,12 @@ Qt::DropActions LayerStackItemModel::supportedDropActions() const // // endResetModel(); // // if( m_StackedLayerModel->GetCount()>0 ) -// // emit dataChanged( +// // Q_EMIT dataChanged( // // index( 0, 0 ), // // index( m_StackedLayerModel->GetCount() - 1, COLUMN_COUNT -1 ) // // ); -// emit layoutChanged(); +// Q_EMIT layoutChanged(); // } /*****************************************************************************/ @@ -742,7 +742,7 @@ void LayerStackItemModel::OnImageSettingsUpdated(AbstractImageModel* image) assert(row != StackedLayerModel::NIL_INDEX); - emit dataChanged(createIndex(row, LayerStackItemModel::COLUMN_EFFECT, image), createIndex(row, LayerStackItemModel::COLUMN_EFFECT, image)); + Q_EMIT dataChanged(createIndex(row, LayerStackItemModel::COLUMN_EFFECT, image), createIndex(row, LayerStackItemModel::COLUMN_EFFECT, image)); } /*****************************************************************************/ @@ -791,7 +791,7 @@ void LayerStackItemModel::OnLayerVisibilityChanged(AbstractLayerModel* layer, bo QModelIndex idx(createIndex(m_StackedLayerModel->IndexOf(layer), COLUMN_NAME, layer)); - emit dataChanged(idx, idx); + Q_EMIT dataChanged(idx, idx); } /*****************************************************************************/ @@ -800,7 +800,7 @@ void LayerStackItemModel::OnPixelInfoChanged(const QPoint&, const PointType&, co if (pixels.empty()) return; - emit dataChanged(index(0, COLUMN_I), index(pixels.size() - 1, COLUMN_COUNT - 1)); + Q_EMIT dataChanged(index(0, COLUMN_I), index(pixels.size() - 1, COLUMN_COUNT - 1)); } /*****************************************************************************/ @@ -830,7 +830,7 @@ void LayerStackItemModel::OnReferenceChanged(size_t idx) assert(LayerStackItemModel::COLUMN_COUNT > 0); - emit dataChanged(createIndex(idx, 0, layer), createIndex(idx, LayerStackItemModel::COLUMN_COUNT - 1, layer)); + Q_EMIT dataChanged(createIndex(idx, 0, layer), createIndex(idx, LayerStackItemModel::COLUMN_COUNT - 1, layer)); } /*****************************************************************************/ @@ -839,7 +839,7 @@ void LayerStackItemModel::OnResolutionsChanged(const PixelInfo::Vector& pixels) if (pixels.empty()) return; - emit dataChanged(index(0, COLUMN_RESOLUTION), index(pixels.size() - 1, COLUMN_RESOLUTION)); + Q_EMIT dataChanged(index(0, COLUMN_RESOLUTION), index(pixels.size() - 1, COLUMN_RESOLUTION)); } /*****************************************************************************/ diff --git a/Modules/Visualization/MonteverdiGui/src/mvdLayerStackWidget.cxx b/Modules/Visualization/MonteverdiGui/src/mvdLayerStackWidget.cxx index 0427e871c92602ade86f64ed32dca2a460bf6941..616df244ddef7205c7de7d55a13d7492e4148bd2 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdLayerStackWidget.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdLayerStackWidget.cxx @@ -183,7 +183,7 @@ bool LayerStackWidget::eventFilter(QObject* object, QEvent* e) case Qt::Key_C: if (keyEvent->modifiers() == Qt::ControlModifier && m_UI->treeView->currentIndex().isValid()) { - emit CopyLayerRequested(LayerStackItemModel::GetLayer(m_UI->treeView->currentIndex())); + Q_EMIT CopyLayerRequested(LayerStackItemModel::GetLayer(m_UI->treeView->currentIndex())); return true; } @@ -192,13 +192,13 @@ bool LayerStackWidget::eventFilter(QObject* object, QEvent* e) case Qt::Key_Delete: if (keyEvent->modifiers() == Qt::NoModifier) { - emit DeleteLayerRequested(); + Q_EMIT DeleteLayerRequested(); return true; } else if (keyEvent->modifiers() == Qt::ShiftModifier) { - emit DeleteAllLayersRequested(); + Q_EMIT DeleteAllLayersRequested(); return true; } @@ -215,7 +215,7 @@ bool LayerStackWidget::eventFilter(QObject* object, QEvent* e) if (wEvent->modifiers() == Qt::ControlModifier) { - emit RotateLayersRequested(wEvent->delta() / (MOUSE_WHEEL_STEP_FACTOR * MOUSE_WHEEL_STEP_DEGREES)); + Q_EMIT RotateLayersRequested(wEvent->delta() / (MOUSE_WHEEL_STEP_FACTOR * MOUSE_WHEEL_STEP_DEGREES)); return true; } @@ -372,7 +372,7 @@ void LayerStackWidget::OnCurrentRowChanged(const QModelIndex& current, const QMo // << this // << "::OnCurrentRowChange(" << current.row() << "," << previous.row() << ")"; - emit CurrentChanged(current.row()); + Q_EMIT CurrentChanged(current.row()); } /*******************************************************************************/ @@ -385,7 +385,7 @@ void LayerStackWidget::OnSelectionChanged(const QItemSelection& selected, const QModelIndexList indexes(selected.indexes()); // assert( indexes.empty() || indexes.size()==1 ); - emit SelectionChanged(indexes.empty() ? -1 : indexes.front().row()); + Q_EMIT SelectionChanged(indexes.empty() ? -1 : indexes.front().row()); } } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/src/mvdMainWindowTitleLoader.cxx b/Modules/Visualization/MonteverdiGui/src/mvdMainWindowTitleLoader.cxx index ae685bd6485298490216c8b7dbed23e547552c4b..c87de6aa2c9d9d38f7fbf2d8dea5f03370d43ac6 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdMainWindowTitleLoader.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdMainWindowTitleLoader.cxx @@ -58,14 +58,14 @@ void MainWindowTitleLoader::LoadTitle() oss<<m_Model->GetNativeLargestRegion().GetSize()[0]; oss<<"x"<<m_Model->GetNativeLargestRegion().GetSize()[1]<<tr(" pixels)").toLatin1().constData(); - emit TitleLoaded(FromStdString(oss.str()) ); + Q_EMIT TitleLoaded(FromStdString(oss.str()) ); // add the placename to the title if any std::string placename = m_Model->GetCenterPixelPlaceName(); if (!placename.empty()) { oss <<" - " <<ToStdString( tr("Location") )<< " : " << placename; - emit TitleLoaded(FromStdString(oss.str()) ); + Q_EMIT TitleLoaded(FromStdString(oss.str()) ); } #else @@ -82,11 +82,11 @@ void MainWindowTitleLoader::LoadTitle() qDebug() << "Title:" << title; - emit TitleLoaded(title); + Q_EMIT TitleLoaded(title); #endif - emit Finished(); + Q_EMIT Finished(); } } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/src/mvdMultiResolutionPyramidWidget.cxx b/Modules/Visualization/MonteverdiGui/src/mvdMultiResolutionPyramidWidget.cxx index dff0a0634d5fa9fffe4314d88bed95563cb94659..b9aca7361bbb224dded9e7d5bcba66f99f1ffddb 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdMultiResolutionPyramidWidget.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdMultiResolutionPyramidWidget.cxx @@ -293,7 +293,7 @@ void MultiResolutionPyramidWidget::on_baseSpinBox_valueChanged(int value) UpdateSize(); - emit BaseValueChanged(value); + Q_EMIT BaseValueChanged(value); } /*****************************************************************************/ @@ -312,7 +312,7 @@ void MultiResolutionPyramidWidget::on_levelsSpinBox_valueChanged(int value) UpdateSize(); - emit LevelsValueChanged(value); + Q_EMIT LevelsValueChanged(value); } /*****************************************************************************/ @@ -341,7 +341,7 @@ void MultiResolutionPyramidWidget::on_sizeSpinBox_valueChanged(int value) UpdateResolutions(); - emit SizeValueChanged(value); + Q_EMIT SizeValueChanged(value); } } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/src/mvdProjectionBarWidget.cxx b/Modules/Visualization/MonteverdiGui/src/mvdProjectionBarWidget.cxx index 7549bf9c3552ef71e8ac6efba11f518e7c07b8a3..71c0683a00e156cbf53cd49fc979f36daf4422ed 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdProjectionBarWidget.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdProjectionBarWidget.cxx @@ -91,6 +91,6 @@ void ProjectionBarWidget::ChangeScale() } // Emit scale changed. - emit ProjectionScaleChanged(numerator / denominator); + Q_EMIT ProjectionScaleChanged(numerator / denominator); } } diff --git a/Modules/Visualization/MonteverdiGui/src/mvdQtWidgetView.cxx b/Modules/Visualization/MonteverdiGui/src/mvdQtWidgetView.cxx index 3bd6757244ffc8b3fcc69d473731987129c19022..5164e24cf71c6dc42526de8116722670b1e8d812 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdQtWidgetView.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdQtWidgetView.cxx @@ -260,7 +260,7 @@ void QtWidgetView::OnApplicationExecutionDone(int status) .arg(status), QMessageBox::Ok); - emit ExecutionDone(status); + Q_EMIT ExecutionDone(status); return; } @@ -287,7 +287,7 @@ void QtWidgetView::OnApplicationExecutionDone(int status) // try to cast it otb::Wrapper::OutputImageParameter* outputParam = dynamic_cast<otb::Wrapper::OutputImageParameter*>(param); - // emit the output image filename selected + // Q_EMIT the output image filename selected if (outputParam != NULL) { QFileInfo fileInfo(outputParam->GetFileName()); @@ -303,7 +303,7 @@ void QtWidgetView::OnApplicationExecutionDone(int status) */ ++count; - emit OTBApplicationOutputImageChanged(QString(otbApp->GetName()), QFile::decodeName(outputParam->GetFileName())); + Q_EMIT OTBApplicationOutputImageChanged(QString(otbApp->GetName()), QFile::decodeName(outputParam->GetFileName())); /* } */ @@ -311,7 +311,7 @@ void QtWidgetView::OnApplicationExecutionDone(int status) } } - emit ExecutionDone(status); + Q_EMIT ExecutionDone(status); } } // end of namespace Wrapper diff --git a/Modules/Visualization/MonteverdiGui/src/mvdQuicklookViewManipulator.cxx b/Modules/Visualization/MonteverdiGui/src/mvdQuicklookViewManipulator.cxx index 3cb2e62ce301713c83c2d54e41e8e73d99d67a68..8c236ded41ccddbedc9681ea404ca0bfed270888 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdQuicklookViewManipulator.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdQuicklookViewManipulator.cxx @@ -137,7 +137,7 @@ void QuicklookViewManipulator::MousePressEvent(QMouseEvent* e) m_ViewSettings->ScreenToViewPortTransform(static_cast<double>(m_MousePressPosition.x()), static_cast<double>(m_MousePressPosition.y()), center[0], center[1]); - emit CenterRoiRequested(center); + Q_EMIT CenterRoiRequested(center); } } @@ -162,7 +162,7 @@ void QuicklookViewManipulator::MouseMoveEvent(QMouseEvent* e) m_MousePressPosition = e->pos(); - emit CenterRoiRequested(center); + Q_EMIT CenterRoiRequested(center); } } @@ -183,7 +183,7 @@ void QuicklookViewManipulator::ResizeEvent(QResizeEvent* e) { ImageViewManipulator::ResizeEvent(e); - emit ZoomToExtentRequested(); + Q_EMIT ZoomToExtentRequested(); } /******************************************************************************/ @@ -223,7 +223,7 @@ void QuicklookViewManipulator::OnRoiChanged(const PointType& origin, const SizeT m_RoiSize = size; m_RoiSpacing = spacing; - emit RefreshViewRequested(); + Q_EMIT RefreshViewRequested(); } } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/src/mvdShaderWidget.cxx b/Modules/Visualization/MonteverdiGui/src/mvdShaderWidget.cxx index dda555ee3bcca12be357aec5838fb61a291c46aa..d9543d8ad0fb4181040931c7beea96a8de15092d 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdShaderWidget.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdShaderWidget.cxx @@ -154,7 +154,7 @@ void ShaderWidget::virtual_SetSettings(ImageSettings* settings) QString comboBoxEffect = m_UI->effectComboBox->itemText(i); if (QString::compare(comboBoxEffect, tradEffect) == 0) { - // This change will emit currentIndexChanged SIGNAL + // This change will Q_EMIT currentIndexChanged SIGNAL // and then call on_effectComboBox_currentIndexChanged QString oldText = m_UI->effectComboBox->currentText(); if (m_UI->effectComboBox->currentIndex() != i) @@ -206,7 +206,7 @@ void ShaderWidget::on_effectComboBox_currentIndexChanged(const QString& text) m_UI->valueLineEdit->setVisible(textName != NULL); m_UI->valueLineEdit->setText(settings->HasValue() ? ToQString(settings->GetValue()) : QString()); - emit SettingsChanged(); + Q_EMIT SettingsChanged(); break; } @@ -220,7 +220,7 @@ void ShaderWidget::on_sizeSpinBox_valueChanged(int value) GetSettings()->SetSize(value); - emit SettingsChanged(); + Q_EMIT SettingsChanged(); } /*******************************************************************************/ @@ -241,7 +241,7 @@ void ShaderWidget::on_valueLineEdit_editingFinished() if (!isOk) return; - emit SettingsChanged(); + Q_EMIT SettingsChanged(); } diff --git a/Modules/Visualization/MonteverdiGui/src/mvdStatusBarWidget.cxx b/Modules/Visualization/MonteverdiGui/src/mvdStatusBarWidget.cxx index cd32457235b0026129bfd2f5a077ec9ac42dfd7d..60d811429af6d48d5adccf0e043a007c9f6af197 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdStatusBarWidget.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdStatusBarWidget.cxx @@ -191,8 +191,8 @@ void StatusBarWidget::on_pixelIndexLineEdit_returnPressed() // // If both pixel-index coordinates have correctly been converted, - // emit pixel-index changed signal. - emit PixelIndexChanged(index); + // Q_EMIT pixel-index changed signal. + Q_EMIT PixelIndexChanged(index); } /*****************************************************************************/ @@ -287,7 +287,7 @@ void StatusBarWidget::ChangeScale() // // Emit scale changed. - emit ScaleChanged(numerator / denominator); + Q_EMIT ScaleChanged(numerator / denominator); } } // end namespace 'mvd' diff --git a/Modules/Visualization/MonteverdiGui/src/mvdTreeWidget.cxx b/Modules/Visualization/MonteverdiGui/src/mvdTreeWidget.cxx index 60e67d3507ced7f226f5638656199920b1504089..5f94b2643d07f3d72302159b439d2d9600612388 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdTreeWidget.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdTreeWidget.cxx @@ -447,7 +447,7 @@ void TreeWidget::dropEvent(QDropEvent* e) switch( e->dropAction() ) { case Qt::MoveAction: - emit ItemMoved( *it, itemAt( e->pos() ) ); + Q_EMIT ItemMoved( *it, itemAt( e->pos() ) ); break; default: @@ -462,7 +462,7 @@ void TreeWidget::dropEvent(QDropEvent* e) if (e->source() == this) for (QTreeWidgetItemList::const_iterator it = itemList.begin(); it != itemList.end(); ++it) - emit ItemMoved(*it, target); + Q_EMIT ItemMoved(*it, target); } /*******************************************************************************/ diff --git a/Modules/Visualization/MonteverdiGui/src/mvdTreeWidgetItemDragAndDropEventFilter.cxx b/Modules/Visualization/MonteverdiGui/src/mvdTreeWidgetItemDragAndDropEventFilter.cxx index 48e92c1f8f8f96b506b7b054e2053ef1f2353d7b..c87e2f13c9bb81e33569be2fd6294ec68ef0c6c8 100644 --- a/Modules/Visualization/MonteverdiGui/src/mvdTreeWidgetItemDragAndDropEventFilter.cxx +++ b/Modules/Visualization/MonteverdiGui/src/mvdTreeWidgetItemDragAndDropEventFilter.cxx @@ -134,7 +134,7 @@ bool TreeWidgetItemDragAndDropEventFilter::DropEvent(QObject*, QDropEvent* e) for (QTreeWidgetItemList::const_iterator it = items.begin(); it != items.end(); ++it) { - emit ItemDropped(*it); + Q_EMIT ItemDropped(*it); } // diff --git a/Modules/Wrappers/ApplicationEngine/include/otbWrapperMetaDataHelper.h b/Modules/Wrappers/ApplicationEngine/include/otbWrapperMetaDataHelper.h index fddba78ef55f1fd63f33c133d6c6daab99e627a9..ce6ec8a7ffbdaff6c9836e9fd7231e0dfc2fea9e 100644 --- a/Modules/Wrappers/ApplicationEngine/include/otbWrapperMetaDataHelper.h +++ b/Modules/Wrappers/ApplicationEngine/include/otbWrapperMetaDataHelper.h @@ -24,6 +24,7 @@ #include "otbMetaDataKey.h" #include "otbImageKeywordlist.h" #include "otbVectorDataKeywordlist.h" +#include "otbGeometryMetadata.h" #include "itkMetaDataDictionary.h" #include "OTBApplicationEngineExport.h" @@ -67,8 +68,8 @@ OTBApplicationEngine_EXPORT void SetInt(itk::MetaDataDictionary& dict, const std OTBApplicationEngine_EXPORT double GetDouble(const itk::MetaDataDictionary& dict, const std::string& key); OTBApplicationEngine_EXPORT void SetDouble(itk::MetaDataDictionary& dict, const std::string& key, double val); -OTBApplicationEngine_EXPORT otb::OTB_GCP GetGCP(const itk::MetaDataDictionary& dict, const std::string& key); -OTBApplicationEngine_EXPORT void SetGCP(itk::MetaDataDictionary& dict, const std::string& key, const otb::OTB_GCP& val); +OTBApplicationEngine_EXPORT otb::GCP GetGCP(const itk::MetaDataDictionary& dict, const std::string& key); +OTBApplicationEngine_EXPORT void SetGCP(itk::MetaDataDictionary& dict, const std::string& key, const otb::GCP& val); OTBApplicationEngine_EXPORT otb::MetaDataKey::VectorType GetVector(const itk::MetaDataDictionary& dict, const std::string& key); OTBApplicationEngine_EXPORT void SetVector(itk::MetaDataDictionary& dict, const std::string& key, const otb::MetaDataKey::VectorType& val); diff --git a/Modules/Wrappers/ApplicationEngine/src/otbWrapperMetaDataHelper.cxx b/Modules/Wrappers/ApplicationEngine/src/otbWrapperMetaDataHelper.cxx index e0483c5ad938a50b41acb18b3f17d4fa96387d6c..b6193b204865f6fda20d45828c8b65f7387f1689 100644 --- a/Modules/Wrappers/ApplicationEngine/src/otbWrapperMetaDataHelper.cxx +++ b/Modules/Wrappers/ApplicationEngine/src/otbWrapperMetaDataHelper.cxx @@ -43,7 +43,7 @@ MDType GetType(const std::string& val) case otb::MetaDataKey::TDOUBLE: ret = MDType::Double; break; - case otb::MetaDataKey::TOTB_GCP: + case otb::MetaDataKey::TGCP: ret = MDType::GCP; break; case otb::MetaDataKey::TVECTOR: @@ -100,16 +100,16 @@ void SetDouble(itk::MetaDataDictionary& dict, const std::string& key, double val itk::EncapsulateMetaData<double>(dict, key, val); } -otb::OTB_GCP GetGCP(const itk::MetaDataDictionary& dict, const std::string& key) +otb::GCP GetGCP(const itk::MetaDataDictionary& dict, const std::string& key) { - otb::OTB_GCP ret; - itk::ExposeMetaData<otb::OTB_GCP>(dict, key, ret); + otb::GCP ret; + itk::ExposeMetaData<otb::GCP>(dict, key, ret); return ret; } -void SetGCP(itk::MetaDataDictionary& dict, const std::string& key, const otb::OTB_GCP& val) +void SetGCP(itk::MetaDataDictionary& dict, const std::string& key, const otb::GCP& val) { - itk::EncapsulateMetaData<otb::OTB_GCP>(dict, key, val); + itk::EncapsulateMetaData<otb::GCP>(dict, key, val); } otb::MetaDataKey::VectorType GetVector(const itk::MetaDataDictionary& dict, const std::string& key) diff --git a/Modules/Wrappers/QtWidget/include/itkQtProgressBar.h b/Modules/Wrappers/QtWidget/include/itkQtProgressBar.h index edfb44f3b0bdb42159a5776637fb46e815e2622e..e3dff08e5b7ac0dd360c0ad4ecf694f100c5d159 100644 --- a/Modules/Wrappers/QtWidget/include/itkQtProgressBar.h +++ b/Modules/Wrappers/QtWidget/include/itkQtProgressBar.h @@ -54,7 +54,7 @@ public: /** Manage a Progress event */ void Observe(itk::Object* caller); -signals: +Q_SIGNALS: void SetValueChanged(int); private: diff --git a/Modules/Wrappers/QtWidget/include/otbQtApplication.h b/Modules/Wrappers/QtWidget/include/otbQtApplication.h index e68bc5cdc2c8e4b8c152a6207cf5a5802f0a81c7..f4479e1e75239c9e4f9a158c7dc7854e40d79ed5 100644 --- a/Modules/Wrappers/QtWidget/include/otbQtApplication.h +++ b/Modules/Wrappers/QtWidget/include/otbQtApplication.h @@ -40,7 +40,7 @@ public: bool notify(QObject* object, QEvent* event) override; -signals: +Q_SIGNALS: void UnhandledException(QString message); }; diff --git a/Modules/Wrappers/QtWidget/include/otbQtFileSelectionWidget.h b/Modules/Wrappers/QtWidget/include/otbQtFileSelectionWidget.h index 56739c1957470375d2be1ea86c3f44e9647fafed..156b5d1cb3c37629d07c657fde5c23e9c64ec619 100644 --- a/Modules/Wrappers/QtWidget/include/otbQtFileSelectionWidget.h +++ b/Modules/Wrappers/QtWidget/include/otbQtFileSelectionWidget.h @@ -80,10 +80,10 @@ public: void SetIOMode(IOMode); IOMode GetIOMode() const; -signals: +Q_SIGNALS: void FilenameChanged(); -protected slots: +protected Q_SLOTS: void SelectFile(); void CallFilenameChanged(); void SetFileName(const QString&); diff --git a/Modules/Wrappers/QtWidget/include/otbQtLogOutput.h b/Modules/Wrappers/QtWidget/include/otbQtLogOutput.h index 65c1ad67fe98c41247aa31f0232b72f9bfd1d5f6..357858703f478fec93be526b127140ccae58ddd8 100644 --- a/Modules/Wrappers/QtWidget/include/otbQtLogOutput.h +++ b/Modules/Wrappers/QtWidget/include/otbQtLogOutput.h @@ -64,7 +64,7 @@ public: /** Write to a buffer */ void Write(std::string const& content, double timestamp) override; -signals: +Q_SIGNALS: void NewContentLog(QString); protected: diff --git a/Modules/Wrappers/QtWidget/include/otbQtStringSelectionWidget.h b/Modules/Wrappers/QtWidget/include/otbQtStringSelectionWidget.h index 908492633469ab1448bb263ede56e4db3da94ca7..fea434818f6cc53a4c5b5fb3a3761604fb806df5 100644 --- a/Modules/Wrappers/QtWidget/include/otbQtStringSelectionWidget.h +++ b/Modules/Wrappers/QtWidget/include/otbQtStringSelectionWidget.h @@ -43,7 +43,7 @@ class OTBQtWidget_EXPORT QtStringSelectionWidget : public QWidget Q_PROPERTY(QString text READ GetText WRITE SetText RESET ClearText); -signals: +Q_SIGNALS: void InternalQLineEditEditionFinished(); public: @@ -62,7 +62,7 @@ public: void ClearText(); -protected slots: +protected Q_SLOTS: void OnEditionFinished(); private: diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetBoolParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetBoolParameter.h index 9a7c66d28795f6a5d0e1416a696d64301d9c6a18..535b13ff53810ef1b1cee6d25959ef59341149fb 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetBoolParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetBoolParameter.h @@ -43,7 +43,7 @@ public: QtWidgetBoolParameter(BoolParameter*, QtWidgetModel*, QWidget*); ~QtWidgetBoolParameter() override; -public slots: +public Q_SLOTS: void SetValue(bool value); private: diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetChoiceParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetChoiceParameter.h index 4772f8182c773eb1aeea2b3aeec68317b84922d6..49c3bcd9176c752e47eaf693a1516b5c30165fa5 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetChoiceParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetChoiceParameter.h @@ -42,7 +42,7 @@ public: QtWidgetChoiceParameter(ChoiceParameter*, QtWidgetModel*, QWidget*); ~QtWidgetChoiceParameter() override; -protected slots: +protected Q_SLOTS: void SetValue(int value); private: diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetDirectoryParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetDirectoryParameter.h index 27c78f2b1f6050dddb42743de17e30db78c1db4e..caddd76bece97fc3511e79a7d8136965bda2a8c0 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetDirectoryParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetDirectoryParameter.h @@ -43,7 +43,7 @@ public: QtWidgetDirectoryParameter(DirectoryParameter*, QtWidgetModel*, QWidget*); ~QtWidgetDirectoryParameter() override; -protected slots: +protected Q_SLOTS: void SetFileName(const QString& value); void SelectFile(); diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetFloatParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetFloatParameter.h index 1f270122ec75ea3980fee30dc63c5a669ef6287c..d7bbeeb7d73d235eb336ef6093fafc235800d789 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetFloatParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetFloatParameter.h @@ -44,7 +44,7 @@ public: QtWidgetFloatParameter(FloatParameter*, QtWidgetModel*, QWidget*); ~QtWidgetFloatParameter() override; -private slots: +private Q_SLOTS: void OnCleared(); void OnValueChanged(double); void OnEditingFinished(); diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetInputFilenameParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetInputFilenameParameter.h index 0cf963610f20b622280f0cbe6a81758ebe395fc6..d37ac9dbff13153d8607f7a83ce4ac1cf6a1a370 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetInputFilenameParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetInputFilenameParameter.h @@ -46,7 +46,7 @@ public: const QLineEdit* GetInput() const; QLineEdit* GetInput(); -protected slots: +protected Q_SLOTS: void SetFileName(const QString& value); void SelectFile(); diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetInputImageParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetInputImageParameter.h index a1c0678863be574e503aa411f52150897b11e76a..3c54b057650b0b98f5f7c84670a880f3d423f3f7 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetInputImageParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetInputImageParameter.h @@ -46,14 +46,14 @@ public: const QLineEdit* GetInput() const; QLineEdit* GetInput(); -signals: +Q_SIGNALS: void FileNameIsSet(); -protected slots: +protected Q_SLOTS: bool SetFileName(const QString& value); void SelectFile(); -private slots: +private Q_SLOTS: void OnEditingFinished(); private: diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetInputVectorDataParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetInputVectorDataParameter.h index 41c625acfaf62dd8741b2871dd747b6aa4551904..0a887791a758426e188109c6e784431fb8a96f9f 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetInputVectorDataParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetInputVectorDataParameter.h @@ -46,7 +46,7 @@ public: const QLineEdit* GetInput() const; QLineEdit* GetInput(); -protected slots: +protected Q_SLOTS: bool SetFileName(const QString& value); void SelectFile(); diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetIntParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetIntParameter.h index 0fc627b27bea54611a9a7c861408d86b69dc04c2..d28e6bb22ab841ef711faf5b6bcf83cb1c7d9d61 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetIntParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetIntParameter.h @@ -45,7 +45,7 @@ public: QtWidgetIntParameter(IntParameter*, QtWidgetModel*, QWidget*); ~QtWidgetIntParameter() override; -private slots: +private Q_SLOTS: void OnCleared(); void OnValueChanged(int); void OnEditingFinished(); diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetListEditWidget.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetListEditWidget.h index dde3263478661a7b2cc7d3fea7293e1da9fbd592..1d54404a3e922440d16861e7e5410ab09ae78f11 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetListEditWidget.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetListEditWidget.h @@ -63,10 +63,10 @@ public: ListEditItemModel* GetItemModel(); -public slots: +public Q_SLOTS: void OnFilenameDropped(const QString&); -signals: +Q_SIGNALS: void Updated(); void ValueChanged(); @@ -92,7 +92,7 @@ private: */ Ui::ListEditWidget* m_UI; -private slots: +private Q_SLOTS: void on_addButton_clicked(); void on_browseButton_clicked(); void on_downButton_clicked(); diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetListViewParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetListViewParameter.h index 53b3aff31dfedcba0224d23715b1b941a039e193..044ce26b11f2e7914b86650aa81062bb4fb41c70 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetListViewParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetListViewParameter.h @@ -47,7 +47,7 @@ public: return m_SelectedItems; } -protected slots: +protected Q_SLOTS: void SelectedItems(); private: diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetMainWindow.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetMainWindow.h index 7b3c5d9b03128ad110f3c887b311d007df8f7a4d..038088535b00d1b3ef76e9202b74c0f73fccccab 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetMainWindow.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetMainWindow.h @@ -55,11 +55,11 @@ public: void closeEvent(QCloseEvent* event) override; -signals: +Q_SIGNALS: void ExecuteAndWriteOutput(); void Stop(); -public slots: +public Q_SLOTS: void UnhandledException(QString message); void UpdateMessageAfterApplicationReady(bool val); void UpdateMessageAfterExecution(int status); diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetModel.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetModel.h index f689926c99886c974364568fd6f16544bb2cdb5c..8b19eef179d1211c9e28b83cc84eb5fcecf56958 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetModel.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetModel.h @@ -49,7 +49,7 @@ public: m_Application->Stop(); } -signals: +Q_SIGNALS: /** * \brief Signal emitted when the OTB-application has finished. * @@ -110,7 +110,7 @@ public: /** Logger debug message sender */ void SendLogDEBUG(const std::string& mes); -signals: +Q_SIGNALS: void SetApplicationReady(bool); void SetProgressReportBegin(); @@ -133,7 +133,7 @@ signals: void UpdateGui(); -public slots: +public Q_SLOTS: /** * \brief Slots called every time one of the widget needs to be * updated (e.g. by specialized parameter widgets). @@ -147,7 +147,7 @@ public slots: */ void ExecuteAndWriteOutputSlot(); -private slots: +private Q_SLOTS: /** * \brief * diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetOutputFilenameParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetOutputFilenameParameter.h index c601313c9df6bb4eaf1071fa593e88cb1e274570..455879bf9c99cc6a3acd4430f8502b3185982797 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetOutputFilenameParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetOutputFilenameParameter.h @@ -46,10 +46,10 @@ public: const QLineEdit* GetInput() const; QLineEdit* GetInput(); -public slots: +public Q_SLOTS: void SetFileName(const QString& value); -protected slots: +protected Q_SLOTS: void SelectFile(); private: diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetOutputImageParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetOutputImageParameter.h index 77e3460493bb1c3232ad983a653f0f6261d88597..44a8056e9ddd5d8412b994be80b4d5a4d25f8c62 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetOutputImageParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetOutputImageParameter.h @@ -50,10 +50,10 @@ public: /** Get the PixelType*/ // itkGetMacro(PixelType, int); -public slots: +public Q_SLOTS: void SetFileName(const QString& value); -protected slots: +protected Q_SLOTS: void SelectFile(); void SetPixelType(int pixelType); diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetOutputVectorDataParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetOutputVectorDataParameter.h index 7935512e0e1d27aee9d330479b6ce58b6f783b7a..0313bfcd8a2510afa56bcd5887dcc71fc4b57114 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetOutputVectorDataParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetOutputVectorDataParameter.h @@ -50,10 +50,10 @@ public: /** Get the PixelType*/ // itkGetMacro(PixelType, int); -public slots: +public Q_SLOTS: void SetFileName(const QString& value); -protected slots: +protected Q_SLOTS: void SelectFile(); private: diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetParameterBase.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetParameterBase.h index f1ef1160c083299c8f98fd40914bbeadb782190f..daeb77019084046e035daaf557c564939cba6d5a 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetParameterBase.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetParameterBase.h @@ -62,14 +62,14 @@ public: m_IsChecked = value; } -public slots: +public Q_SLOTS: void UpdateGUI(); virtual void SetActivationState(bool value); -protected slots: +protected Q_SLOTS: void ParameterChanged(const QString& key); -signals: +Q_SIGNALS: void ParameterActiveStatus(bool value); protected: diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetParameterGroup.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetParameterGroup.h index bc6f3db4db896b7b64ff71cbac8a09d15a6b7e3e..a5fa89a37d862cbba57d25604c01a4556cc9a465 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetParameterGroup.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetParameterGroup.h @@ -44,7 +44,7 @@ public: QtWidgetParameterGroup(ParameterGroup::Pointer, QtWidgetModel*, QWidget*); ~QtWidgetParameterGroup() override; -public slots: +public Q_SLOTS: void SetActivationState(bool value) override; private: diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetParameterList.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetParameterList.h index 753419436e4cf7dd550ca711d2d49f8c988cd81c..76b6b06b21bdf2cfbc155894b46bee3f141ae4b2 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetParameterList.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetParameterList.h @@ -51,7 +51,7 @@ public: // // Signals. -signals: +Q_SIGNALS: void NotifyUpdate(); // @@ -69,7 +69,7 @@ private: private: // // Private slots. -private slots: +private Q_SLOTS: }; } // Wrapper diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetRAMParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetRAMParameter.h index bc96f90b9590d1bdc4156f49736fbd64394c7790..fd093abf21000108c6d803ea5ee4040ddfa5727f 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetRAMParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetRAMParameter.h @@ -43,7 +43,7 @@ public: QtWidgetRAMParameter(RAMParameter*, QtWidgetModel*, QWidget*); ~QtWidgetRAMParameter() override; -protected slots: +protected Q_SLOTS: void SetValue(int value); private: diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetSimpleProgressReport.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetSimpleProgressReport.h index a448325ec67ad0009ffa48817beb1a8ff4c6cde7..0c6f369c4f5589ca60e29397d044b86bab618631 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetSimpleProgressReport.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetSimpleProgressReport.h @@ -52,11 +52,11 @@ public: void ProcessEvent(itk::Object* caller, const itk::EventObject& event); -public slots: +public Q_SLOTS: void Init(); void ReportProcess(); -signals: +Q_SIGNALS: void AddNewProcessToReport(); void SetText(QString); diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetSpinBoxes.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetSpinBoxes.h index 61bcecfaced952d586d7a4d2e240a724c81e7812..3de560249cae3ae3cc0c93b848c132dac6281287 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetSpinBoxes.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetSpinBoxes.h @@ -46,7 +46,7 @@ public: static const int CLEAR_ICON_SIZE = 16; -signals: +Q_SIGNALS: // Triggered when the clear button is pressed void Cleared(); @@ -73,7 +73,7 @@ public: void SetValueNoSignal(int); -signals: +Q_SIGNALS: // Triggered when the clear button is pressed void Cleared(); @@ -101,7 +101,7 @@ public: void SetValueNoSignal(double); -signals: +Q_SIGNALS: // Triggered when the clear button is pressed void Cleared(); diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetStringParameter.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetStringParameter.h index 3a9be9ea713c8855cc85cafe48bf75fda0b4fe8b..40925bc0ed4926666d892cdd2729c1fe38fb2d2b 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetStringParameter.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetStringParameter.h @@ -42,7 +42,7 @@ public: QtWidgetStringParameter(StringParameter*, QtWidgetModel*, QWidget*); ~QtWidgetStringParameter() override; -protected slots: +protected Q_SLOTS: void SetValue(const QString& value); private: diff --git a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetView.h b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetView.h index e0c4e5fa3c49ad0c299d778eafa96d1af73e5def..106da58c35cd6ad6762233688dacd86242c1ae54 100644 --- a/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetView.h +++ b/Modules/Wrappers/QtWidget/include/otbWrapperQtWidgetView.h @@ -66,7 +66,7 @@ public: void Disable(); void Enable(); -signals: +Q_SIGNALS: void ExecuteAndWriteOutput(); void Stop(); void OTBApplicationOutputImageChanged(const QString&, const QString&); @@ -77,7 +77,7 @@ protected: virtual QWidget* CreateInputWidgets(); -protected slots: +protected Q_SLOTS: virtual void OnExecButtonClicked() { diff --git a/Modules/Wrappers/QtWidget/src/itkQtProgressBar.cxx b/Modules/Wrappers/QtWidget/src/itkQtProgressBar.cxx index 9f4a03f8fca57c997195aa1131920eff3ea5df67..07db08efe3f8e7fbaf42417c0ffbb67cf1a3bd84 100644 --- a/Modules/Wrappers/QtWidget/src/itkQtProgressBar.cxx +++ b/Modules/Wrappers/QtWidget/src/itkQtProgressBar.cxx @@ -62,7 +62,7 @@ void QtProgressBar::ProcessEvent(itk::Object* caller, const itk::EventObject& ev if (process) { const int value2 = static_cast<int>(process->GetProgress() * this->maximum()); - emit SetValueChanged(value2); + Q_EMIT SetValueChanged(value2); } } } @@ -77,7 +77,7 @@ void QtProgressBar::ConstProcessEvent(const itk::Object* caller, const itk::Even { const int v = static_cast<int>(process->GetProgress() * this->maximum()); - emit SetValueChanged(v); + Q_EMIT SetValueChanged(v); } } } diff --git a/Modules/Wrappers/QtWidget/src/otbQtApplication.cxx b/Modules/Wrappers/QtWidget/src/otbQtApplication.cxx index 07ad7d99d79908c7c86d0842cda71991b351ec00..7dd07cd8e30cc9ed326f456d8281bf54eeb27e22 100644 --- a/Modules/Wrappers/QtWidget/src/otbQtApplication.cxx +++ b/Modules/Wrappers/QtWidget/src/otbQtApplication.cxx @@ -40,7 +40,7 @@ bool QtApplication::notify(QObject* object, QEvent* ev) QString message = QString("<center><font color=\"#FF0000\">"); message.append(ex.what()); message.append("</font></center>"); - emit UnhandledException(message); + Q_EMIT UnhandledException(message); } return false; } diff --git a/Modules/Wrappers/QtWidget/src/otbQtFileSelectionWidget.cxx b/Modules/Wrappers/QtWidget/src/otbQtFileSelectionWidget.cxx index 7bf480faa585d911c2d0310820d49efc69fe6477..70e5ee112f6b012e12b378590ca9cf0027eaf98a 100644 --- a/Modules/Wrappers/QtWidget/src/otbQtFileSelectionWidget.cxx +++ b/Modules/Wrappers/QtWidget/src/otbQtFileSelectionWidget.cxx @@ -93,14 +93,14 @@ void QtFileSelectionWidget::SelectFile() void QtFileSelectionWidget::CallFilenameChanged() { - emit FilenameChanged(); + Q_EMIT FilenameChanged(); } void QtFileSelectionWidget::SetFileName(const QString& filename) { m_Input->setText(filename); - emit FilenameChanged(); + Q_EMIT FilenameChanged(); } } } diff --git a/Modules/Wrappers/QtWidget/src/otbQtLogOutput.cxx b/Modules/Wrappers/QtWidget/src/otbQtLogOutput.cxx index 5a291f1afde167f16657ceea4a33de5dfc1c709a..c1d73af31653ceb24cf20635536215576b1f9a51 100644 --- a/Modules/Wrappers/QtWidget/src/otbQtLogOutput.cxx +++ b/Modules/Wrappers/QtWidget/src/otbQtLogOutput.cxx @@ -48,14 +48,14 @@ void QtLogOutput::Write(double timestamp) { std::ostringstream oss; oss << timestamp; - emit NewContentLog(QString(oss.str().c_str())); + Q_EMIT NewContentLog(QString(oss.str().c_str())); } /** Write to a buffer */ void QtLogOutput::Write(std::string const& content) { - emit NewContentLog(QString(content.c_str())); + Q_EMIT NewContentLog(QString(content.c_str())); } @@ -64,7 +64,7 @@ void QtLogOutput::Write(std::string const& content, double timestamp) { std::ostringstream oss; oss << timestamp << " : " << content; - emit NewContentLog(QString(oss.str().c_str())); + Q_EMIT NewContentLog(QString(oss.str().c_str())); } void QtLogOutput::PrintSelf(std::ostream& os, itk::Indent indent) const diff --git a/Modules/Wrappers/QtWidget/src/otbQtStringSelectionWidget.cxx b/Modules/Wrappers/QtWidget/src/otbQtStringSelectionWidget.cxx index 013d5544d5d3a1a86b499cae645deca9d6ec46b9..052be20d831c2333c05cab4ee41f7790611767d8 100644 --- a/Modules/Wrappers/QtWidget/src/otbQtStringSelectionWidget.cxx +++ b/Modules/Wrappers/QtWidget/src/otbQtStringSelectionWidget.cxx @@ -95,7 +95,7 @@ void QtStringSelectionWidget::DoCreateWidget() void QtStringSelectionWidget::OnEditionFinished() { // used to propagate m_Input (QLineEdit type) editingFinished signal - emit InternalQLineEditEditionFinished(); + Q_EMIT InternalQLineEditEditionFinished(); } } } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetBoolParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetBoolParameter.cxx index e1e0afcc16e564c2c31512f3e407e5472807f17f..6031ee3828882b8ba386edc6bee2a079f6e6d77f 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetBoolParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetBoolParameter.cxx @@ -42,7 +42,7 @@ void QtWidgetBoolParameter::SetValue(bool value) paramDown->SetValue(value); QString key(paramDown->GetKey()); - emit ParameterChanged(key); + Q_EMIT ParameterChanged(key); } } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetChoiceParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetChoiceParameter.cxx index 502592a590f9733962e5791e60bb01538f0393da..09b794cec0844503eedb12a357fc7f9520fbba0b 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetChoiceParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetChoiceParameter.cxx @@ -104,7 +104,7 @@ void QtWidgetChoiceParameter::SetValue(int value) m_ChoiceParam->SetValue(value); QString key(m_ChoiceParam->GetKey()); - emit ParameterChanged(key); + Q_EMIT ParameterChanged(key); } } } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetDirectoryParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetDirectoryParameter.cxx index 88776bfb027a07539e708ca1bfffd752e50d099f..81b4ce608bfe00ba7f4182c4cdd2a8c0e5723d49 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetDirectoryParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetDirectoryParameter.cxx @@ -89,7 +89,7 @@ void QtWidgetDirectoryParameter::SetFileName(const QString& value) // notify of value change QString key(m_DirectoryParam->GetKey()); - emit ParameterChanged(key); + Q_EMIT ParameterChanged(key); } } } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputFilenameParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputFilenameParameter.cxx index a24b88b952d0ecf718b4e245d9b9b218b071e50a..cd6aac41106b5dc602f4cc9aa16c47f9c8f0de9f 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputFilenameParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputFilenameParameter.cxx @@ -103,7 +103,7 @@ void QtWidgetInputFilenameParameter::SetFileName(const QString& value) // notify of value change QString key(m_FilenameParam->GetKey()); - emit ParameterChanged(key); + Q_EMIT ParameterChanged(key); } } } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputImageParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputImageParameter.cxx index d320d30e4ca64f179dc3db19e38c49f61250b147..8396a074003557651f8e0bdda6a137935c71ffbb 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputImageParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputImageParameter.cxx @@ -122,8 +122,8 @@ bool QtWidgetInputImageParameter::SetFileName(const QString& value) // notify of value change QString key(m_InputImageParam->GetKey()); - emit ParameterChanged(key); - emit FileNameIsSet(); + Q_EMIT ParameterChanged(key); + Q_EMIT FileNameIsSet(); } else res = false; diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputVectorDataParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputVectorDataParameter.cxx index 824c2f35aaaae3d9bbae8a006c9d01e7ed9d2d3c..d04125154975a6e9767e30bae0ac6d57549ded81 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputVectorDataParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetInputVectorDataParameter.cxx @@ -117,7 +117,7 @@ bool QtWidgetInputVectorDataParameter::SetFileName(const QString& value) { // notify of value change QString key(m_InputVectorDataParam->GetKey()); - emit ParameterChanged(key); + Q_EMIT ParameterChanged(key); } else res = false; diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetListEditItemModel.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetListEditItemModel.cxx index 88a948966ebcbd61b30653ed5e5997ff31c7eaff..d8cba6978f948f46170950a31ab8faebcb92feaf 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetListEditItemModel.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetListEditItemModel.cxx @@ -338,7 +338,7 @@ bool ListEditItemModel::setData(const QModelIndex& idx, const QVariant& value, i { case Qt::EditRole: stringList->SetNthFileName(idx.row(), QFile::encodeName(value.toString()).data()); - emit dataChanged(idx, idx); + Q_EMIT dataChanged(idx, idx); return true; break; @@ -373,11 +373,11 @@ bool ListEditItemModel::Swap(int row1, int row2) assert(row1 != row2); - emit layoutAboutToBeChanged(); + Q_EMIT layoutAboutToBeChanged(); m_StringList->Swap(row1, row2); - emit layoutChanged(); + Q_EMIT layoutChanged(); return true; } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetListEditWidget.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetListEditWidget.cxx index fa372b6f544d050b880c47571e4e585474b0891a..fffc6cdee0d13b8e5c94490fd8ff59b864587618 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetListEditWidget.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetListEditWidget.cxx @@ -490,10 +490,10 @@ void ListEditWidget::OnDataChanged(const QModelIndex&, const QModelIndex&) // Notify the ParameterList that the parameter has been modified (UserValue) // ParameterList is not available in this class, transfer the signal to WidgetParameterList - emit ValueChanged(); + Q_EMIT ValueChanged(); // Then, trigger the update the application parameters - emit Updated(); + Q_EMIT Updated(); } /*****************************************************************************/ @@ -501,7 +501,7 @@ void ListEditWidget::OnModelReset() { // qDebug() << this << "::OnModelReset()"; - emit Updated(); + Q_EMIT Updated(); } /*****************************************************************************/ @@ -509,7 +509,7 @@ void ListEditWidget::OnRowsInserted(const QModelIndex&, int, int) { // qDebug() << this << "::OnRowsInserted()"; - emit Updated(); + Q_EMIT Updated(); } /*****************************************************************************/ @@ -517,7 +517,7 @@ void ListEditWidget::OnRowsRemoved(const QModelIndex&, int, int) { // qDebug() << this << "::OnRowsRemoved()"; - emit Updated(); + Q_EMIT Updated(); } } // end namespace 'Wrapper' diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetMainWindow.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetMainWindow.cxx index 4007fea48b576673a5c739320b518a1a36abac3e..5784de39b5a1ec44c71c1619b35d2289f5a1383c 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetMainWindow.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetMainWindow.cxx @@ -134,7 +134,7 @@ void QtMainWindow::on_executeButton_clicked() gui->Disable(); ui->statusBar->showMessage(tr("Running...")); ui->executeButton->setText(tr("Cancel")); - emit ExecuteAndWriteOutput(); + Q_EMIT ExecuteAndWriteOutput(); } } } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetModel.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetModel.cxx index a60bb644db0cd2621044983343d0d7668322db05..2a19956f5e61c8ecdbad3eebb802e953ebf74077 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetModel.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetModel.cxx @@ -63,47 +63,47 @@ void QtWidgetModel::NotifyUpdate() { m_Application->GetLogger()->Debug("Caught otb::ApplicationException during application update:\n"); m_Application->GetLogger()->Debug(string(err.what()) + "\n"); - emit ExceptionRaised(err.what()); + Q_EMIT ExceptionRaised(err.what()); } catch (otb::ImageFileReaderException& err) { m_Application->GetLogger()->Debug("Caught otb::ImageFileReaderException during application update:\n"); m_Application->GetLogger()->Debug(string(err.what()) + "\n"); m_Application->GetLogger()->Fatal(err.GetDescription() + string("\n")); - emit ExceptionRaised(err.what()); + Q_EMIT ExceptionRaised(err.what()); } catch (itk::ExceptionObject& err) { m_Application->GetLogger()->Debug("Caught itk::ExceptionObject during application update:\n"); m_Application->GetLogger()->Debug(string(err.what()) + "\n"); m_Application->GetLogger()->Fatal(string(err.GetDescription()) + "\n"); - emit ExceptionRaised(err.GetDescription()); + Q_EMIT ExceptionRaised(err.GetDescription()); } catch (std::exception& err) { m_Application->GetLogger()->Fatal(string("Caught std::exception during application update: ") + err.what() + "\n"); - emit ExceptionRaised(err.what()); + Q_EMIT ExceptionRaised(err.what()); } catch (...) { m_Application->GetLogger()->Fatal("Caught unknown exception during application update.\n"); - emit ExceptionRaised("Unknown exception"); + Q_EMIT ExceptionRaised("Unknown exception"); } - emit UpdateGui(); + Q_EMIT UpdateGui(); // Notify all if (!m_IsRunning) { bool applicationStatus = m_Application->IsApplicationReady(); - emit SetApplicationReady(applicationStatus); + Q_EMIT SetApplicationReady(applicationStatus); } } void QtWidgetModel::ExecuteAndWriteOutputSlot() { // Deactivate the Execute button while processing - emit SetApplicationReady(false); + Q_EMIT SetApplicationReady(false); m_IsRunning = true; // launch the output image writing @@ -115,12 +115,12 @@ void QtWidgetModel::ExecuteAndWriteOutputSlot() QObject::connect(m_taskAppli, &AppliThread::ApplicationExecutionDone, this, &QtWidgetModel::OnApplicationExecutionDone); // Tell the Progress Reporter to begin - emit SetProgressReportBegin(); + Q_EMIT SetProgressReportBegin(); // Run the application m_taskAppli->start(); - emit SetApplicationReady(true); + Q_EMIT SetApplicationReady(true); } void QtWidgetModel::Stop() @@ -139,7 +139,7 @@ void QtWidgetModel::OnApplicationExecutionDone(int status) // For the progressReport to close the Progress widget // and the GUI to update message - emit SetProgressReportDone(status); + Q_EMIT SetProgressReportDone(status); if (status >= 0) { @@ -192,14 +192,14 @@ void AppliThread::run() // in debug. m_Application->GetLogger()->Debug("Caught otb::ApplicationException during application execution:\n"); m_Application->GetLogger()->Debug(string(err.what()) + "\n"); - emit ExceptionRaised(err.what()); + Q_EMIT ExceptionRaised(err.what()); } catch (otb::ImageFileReaderException& err) { m_Application->GetLogger()->Debug("Caught otb::ImageFileReaderException during application execution:\n"); m_Application->GetLogger()->Debug(string(err.what()) + "\n"); m_Application->GetLogger()->Fatal(err.GetDescription() + string("\n")); - emit ExceptionRaised(err.what()); + Q_EMIT ExceptionRaised(err.what()); } catch (itk::ProcessAborted& /*err*/) { @@ -210,21 +210,21 @@ void AppliThread::run() m_Application->GetLogger()->Debug("Caught itk::ExceptionObject during application execution:\n"); m_Application->GetLogger()->Debug(string(err.what()) + "\n"); m_Application->GetLogger()->Fatal(string(err.GetDescription()) + "\n"); - emit ExceptionRaised(err.what()); + Q_EMIT ExceptionRaised(err.what()); } catch (std::exception& err) { m_Application->GetLogger()->Fatal(string("Caught std::exception during application execution: ") + err.what() + "\n"); - emit ExceptionRaised(err.what()); + Q_EMIT ExceptionRaised(err.what()); } catch (...) { m_Application->GetLogger()->Fatal("Caught unknown exception during application execution.\n"); - emit ExceptionRaised("Unknown exception."); + Q_EMIT ExceptionRaised("Unknown exception."); } // Signal OTB-application has ended with result status. - emit ApplicationExecutionDone(result); + Q_EMIT ApplicationExecutionDone(result); } bool QtWidgetModel::IsRunning() const diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetOutputFilenameParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetOutputFilenameParameter.cxx index b37ccb1e11e3654569ac482a628c7de81912b439..865e75c77e2f691e89d7271f3bb06ebb504e07f1 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetOutputFilenameParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetOutputFilenameParameter.cxx @@ -101,7 +101,7 @@ void QtWidgetOutputFilenameParameter::SetFileName(const QString& value) // notify of value change QString key(m_FilenameParam->GetKey()); - emit ParameterChanged(key); + Q_EMIT ParameterChanged(key); } } } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetOutputImageParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetOutputImageParameter.cxx index 6a4a89701f52f766803ad7b33efc652471f94bd9..1291ccc94660dc5f1eb282a7f1521e7ea2ab78c2 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetOutputImageParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetOutputImageParameter.cxx @@ -125,7 +125,7 @@ void QtWidgetOutputImageParameter::SetFileName(const QString& value) // notify of value change QString key(m_OutputImageParam->GetKey()); - emit ParameterChanged(key); + Q_EMIT ParameterChanged(key); } void QtWidgetOutputImageParameter::SetPixelType(int pixelType) diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetOutputVectorDataParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetOutputVectorDataParameter.cxx index 7903e7ee07b67a4825c1f62d4e58a1f657f6799a..831198361cccbcbb2fa05b26e0a33e91071d8b44 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetOutputVectorDataParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetOutputVectorDataParameter.cxx @@ -100,7 +100,7 @@ void QtWidgetOutputVectorDataParameter::SetFileName(const QString& value) // notify of value change QString key(m_OutputVectorDataParam->GetKey()); - emit ParameterChanged(key); + Q_EMIT ParameterChanged(key); } } } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterBase.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterBase.cxx index ee8bc77cfe7e693e16162fc2da7d659a714dbe8d..87ff0489d29130d77f48a63ae4ce1dc96bb9ff9d 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterBase.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterBase.cxx @@ -52,7 +52,7 @@ void QtWidgetParameterBase::UpdateGUI() if (!m_Param->GetMandatory()) { bool state = m_Param->GetActive(); - emit ParameterActiveStatus(state); + Q_EMIT ParameterActiveStatus(state); } else { @@ -60,7 +60,7 @@ void QtWidgetParameterBase::UpdateGUI() // activated Group if (m_Param->GetRoot()->GetActive()) { - emit ParameterActiveStatus(true); + Q_EMIT ParameterActiveStatus(true); } } } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterList.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterList.cxx index 866c4ed5ecf12de97688287a9de05821ba19de48..b617a3ebca472f0a69795143c2aa2d69ed9048ee 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterList.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetParameterList.cxx @@ -71,7 +71,7 @@ void QtWidgetParameterList::DoCreateWidget() // // Connections (Update UserValue flag). - QObject::connect(widget, &ListEditWidget::ValueChanged, this, [=]() { emit ParameterChanged(GetParam()->GetKey()); }); + QObject::connect(widget, &ListEditWidget::ValueChanged, this, [=]() { Q_EMIT ParameterChanged(GetParam()->GetKey()); }); // Connections (Update app parameters). QObject::connect(widget, &ListEditWidget::Updated, this, &QtWidgetParameterList::NotifyUpdate); diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetSimpleProgressReport.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetSimpleProgressReport.cxx index 14a2b1009eec3d374503e796fbee31d5bfab695e..1ae427178f52032c837e5e1afed856df020ade14 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetSimpleProgressReport.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetSimpleProgressReport.cxx @@ -63,7 +63,7 @@ void QtWidgetSimpleProgressReport::ProcessEvent(itk::Object* itkNotUsed(caller), { m_CurrentProcess = eventToWatch->GetProcess(); m_CurrentDescription = eventToWatch->GetProcessDescription(); - emit AddNewProcessToReport(); + Q_EMIT AddNewProcessToReport(); } } } @@ -71,13 +71,13 @@ void QtWidgetSimpleProgressReport::ProcessEvent(itk::Object* itkNotUsed(caller), void QtWidgetSimpleProgressReport::ReportProcess() { this->Observe(m_CurrentProcess); - emit SetText(QString::fromStdString(m_CurrentDescription)); + Q_EMIT SetText(QString::fromStdString(m_CurrentDescription)); } void QtWidgetSimpleProgressReport::Init() { this->setValue(0); - emit SetText(QString("")); + Q_EMIT SetText(QString("")); } } } diff --git a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetStringParameter.cxx b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetStringParameter.cxx index 9d821d5f7555cc9ed654fa2b862948d713a3113b..de4fa1fc5692fd4a6e43c8eeb6f7beb4f3f24d88 100644 --- a/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetStringParameter.cxx +++ b/Modules/Wrappers/QtWidget/src/otbWrapperQtWidgetStringParameter.cxx @@ -73,7 +73,7 @@ void QtWidgetStringParameter::SetValue(const QString& value) m_StringParam->SetValue(value.toLatin1().constData()); // notify of value change QString key(m_StringParam->GetKey()); - emit ParameterChanged(key); + Q_EMIT ParameterChanged(key); } } } diff --git a/Modules/Wrappers/SWIG/src/otbApplication.i b/Modules/Wrappers/SWIG/src/otbApplication.i index 0ef8abf8fe3bcc33064d7cf055d758cd7377d5ac..03ecf560ce300f7a82398986bcb5d4b080523ea0 100644 --- a/Modules/Wrappers/SWIG/src/otbApplication.i +++ b/Modules/Wrappers/SWIG/src/otbApplication.i @@ -161,7 +161,7 @@ public: // TODO : finish wrapping }; -class OTB_GCP +class GCP { public: std::string m_Id; @@ -171,8 +171,7 @@ public: double m_GCPX; double m_GCPY; double m_GCPZ; - OTB_GCP(); - ~OTB_GCP(); + GCP(); void Print(std::ostream& os) const; }; @@ -1023,11 +1022,11 @@ public: otb::Wrapper::MetaDataHelper::SetDouble(* $self,key,val); } - otb::OTB_GCP GetGCP(const std::string &key) + otb::GCP GetGCP(const std::string &key) { return otb::Wrapper::MetaDataHelper::GetGCP(* $self,key); } - void SetGCP(const std::string &key, const otb::OTB_GCP &val) + void SetGCP(const std::string &key, const otb::GCP &val) { otb::Wrapper::MetaDataHelper::SetGCP(* $self,key,val); }