Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
maja
maja
Commits
042e4ba7
Commit
042e4ba7
authored
Feb 25, 2021
by
jbrossar
Browse files
[WIP] Corrected bugs
parent
e4d8aac9
Pipeline
#7051
failed with stages
in 30 minutes and 33 seconds
Changes
5
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
SuperBuild/CMake/GDAL.cmake
View file @
042e4ba7
...
...
@@ -123,11 +123,4 @@ ExternalProject_Add(GDAL
)
ExternalProject_Add_Step
(
GDAL update_deprecated_shebang
COMMAND /bin/sh -x
${
CMAKE_SOURCE_DIR
}
/patches/GDAL/update_deprecated_shebang.sh
${
SB_INSTALL_PREFIX
}
/bin
DEPENDEES install
)
SUPERBUILD_PATCH_SOURCE
(
GDAL
)
SuperBuild/patches/GDAL/update_deprecated_shebang.sh
deleted
100644 → 0
View file @
e4d8aac9
#!/bin/sh -x
#
# Copyright (C) 2020 Centre National d'Etudes Spatiales (CNES)
#
# 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.
#
#
SCRIPTS_DIR
=
$1
for
f
in
$SCRIPTS_DIR
/
*
.py
;
do
sed
-i
"s%#
\!
/usr/bin/env python%#
\!
/usr/bin/env python3%"
$f
done
SuperBuild/patches/OTB/otb-Modules_IO_IOGDAL_src_otbGDALImageIO.cxx-all.diff.txt-all.diff
0 → 100644
View file @
042e4ba7
diff -burN OTB-8.0.0-alpha1.orig/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx OTB-8.0.0-alpha1/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx
--- OTB-8.0.0-alpha1.orig/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx 2021-02-23 15:50:31.726374416 +0100
+++ OTB-8.0.0-alpha1/Modules/IO/IOGDAL/src/otbGDALImageIO.cxx 2021-02-25 14:18:43.775614822 +0100
@@ -832,12 +832,15 @@
{
gcpCount = 0; // fix for uninitialized gcpCount in gdal (when
// reading Palsar image)
- }
- std::string key;
+ itk::EncapsulateMetaData<unsigned int>(dict, MetaDataKey::GCPCountKey, 0);
+ }
+ else
+ {
itk::EncapsulateMetaData<unsigned int>(dict, MetaDataKey::GCPCountKey, gcpCount);
+ std::string key;
for (unsigned int cpt = 0; cpt < gcpCount; ++cpt)
{
@@ -863,6 +866,7 @@
}
m_Imd.Add(MDGeom::GCP, gcps);
}
+ }
/* -------------------------------------------------------------------- */
/* Get the six coefficients of affine geoTtransform */
\ No newline at end of file
Testing/TU/Code/Core/Data/IO/vnsGenericRSTransformFromImage.cxx
View file @
042e4ba7
...
...
@@ -104,14 +104,14 @@ int vnsGenericRSTransformFromImage(int itkNotUsed(argc), char* argv[])
TransformType
::
Pointer
wgs2img
=
TransformType
::
New
();
wgs2img
->
SetInputProjectionRef
(
wgsRef
);
wgs2img
->
SetOutputProjectionRef
(
reader
->
GetOutput
()
->
GetProjectionRef
());
wgs2img
->
SetOutput
KeywordList
(
reader
->
GetOutput
()
->
GetImage
Keywordlist
(
));
wgs2img
->
SetOutput
ImageMetadata
(
&
(
reader
->
GetOutput
()
->
GetImage
Metadata
()
));
wgs2img
->
InstantiateTransform
();
// Instanciate Image->WGS transform
TransformType
::
Pointer
img2wgs
=
TransformType
::
New
();
img2wgs
->
SetInputProjectionRef
(
reader
->
GetOutput
()
->
GetProjectionRef
());
img2wgs
->
SetInput
KeywordList
(
reader
->
GetOutput
()
->
GetImage
Keywordlist
(
));
img2wgs
->
SetInput
ImageMetadata
(
&
(
reader
->
GetOutput
()
->
GetImage
Metadata
()
));
img2wgs
->
SetOutputProjectionRef
(
wgsRef
);
img2wgs
->
InstantiateTransform
();
...
...
@@ -157,22 +157,22 @@ int vnsGenericRSTransformImageAndMNTToWGS84ConversionChecking(int itkNotUsed(arg
GeoDistanceType
::
Pointer
geoDistance
=
GeoDistanceType
::
New
();
GeoDistance3DType
::
Pointer
geoDistance3d
=
GeoDistance3DType
::
New
();
otb
::
DEMHandler
::
Pointer
demHandler
=
otb
::
DEMHandler
::
Instance
();
demHandler
->
OpenDEMDirectory
(
argv
[
2
]);
demHandler
->
OpenGeoidFile
(
argv
[
3
]);
double
heightAboveEllipsoid
=
demHandler
->
GetHeightAboveEllipsoid
(
refGeoPt
);
auto
&
demHandler
=
otb
::
DEMHandler
::
Get
Instance
();
demHandler
.
OpenDEMDirectory
(
argv
[
2
]);
demHandler
.
OpenGeoidFile
(
argv
[
3
]);
double
heightAboveEllipsoid
=
demHandler
.
GetHeightAboveEllipsoid
(
refGeoPt
);
// Instanciate WGS->Image transform
TransformType
::
Pointer
wgs2img
=
TransformType
::
New
();
wgs2img
->
SetInputProjectionRef
(
wgsRef
);
wgs2img
->
SetOutputProjectionRef
(
reader
->
GetOutput
()
->
GetProjectionRef
());
wgs2img
->
SetOutput
KeywordList
(
reader
->
GetOutput
()
->
GetImage
Keywordlist
(
));
wgs2img
->
SetOutput
ImageMetadata
(
&
(
reader
->
GetOutput
()
->
GetImage
Metadata
()
));
wgs2img
->
InstantiateTransform
();
// Instanciate Image->WGS transform
TransformType
::
Pointer
img2wgs
=
TransformType
::
New
();
img2wgs
->
SetInputProjectionRef
(
reader
->
GetOutput
()
->
GetProjectionRef
());
img2wgs
->
SetInput
KeywordList
(
reader
->
GetOutput
()
->
GetImage
Keywordlist
(
));
img2wgs
->
SetInput
ImageMetadata
(
&
(
reader
->
GetOutput
()
->
GetImage
Metadata
()
));
img2wgs
->
SetOutputProjectionRef
(
wgsRef
);
img2wgs
->
InstantiateTransform
();
...
...
@@ -181,13 +181,13 @@ int vnsGenericRSTransformImageAndMNTToWGS84ConversionChecking(int itkNotUsed(arg
Transform3DType
::
Pointer
wgs2img3d
=
Transform3DType
::
New
();
wgs2img3d
->
SetInputProjectionRef
(
wgsRef
);
wgs2img3d
->
SetOutputProjectionRef
(
reader
->
GetOutput
()
->
GetProjectionRef
());
wgs2img3d
->
SetOutput
KeywordList
(
reader
->
GetOutput
()
->
GetImage
Keywordlist
(
));
wgs2img3d
->
SetOutput
ImageMetadata
(
&
(
reader
->
GetOutput
()
->
GetImage
Metadata
()
));
wgs2img3d
->
InstantiateTransform
();
// Instanciate Image->WGS transform 3D
Transform3DType
::
Pointer
img2wgs3d
=
Transform3DType
::
New
();
img2wgs3d
->
SetInputProjectionRef
(
reader
->
GetOutput
()
->
GetProjectionRef
());
img2wgs3d
->
SetInput
KeywordList
(
reader
->
GetOutput
()
->
GetImage
Keywordlist
(
));
img2wgs3d
->
SetInput
ImageMetadata
(
&
(
reader
->
GetOutput
()
->
GetImage
Metadata
()
));
img2wgs3d
->
SetOutputProjectionRef
(
wgsRef
);
img2wgs3d
->
InstantiateTransform
();
...
...
Testing/TU/Code/Core/Data/IO/vnsGenericRSTransformGenericTest.cxx
View file @
042e4ba7
...
...
@@ -110,7 +110,7 @@ int vnsGenericRSTransformGenericTest(int argc, char * argv[])
reader
->
UpdateOutputInformation
();
transform
->
SetInputProjectionRef
(
reader
->
GetOutput
()
->
GetProjectionRef
());
transform
->
SetInput
KeywordList
(
reader
->
GetOutput
()
->
GetImage
Keywordlist
(
));
transform
->
SetInput
ImageMetadata
(
&
(
reader
->
GetOutput
()
->
GetImage
Metadata
()
));
std
::
cout
<<
"Input projection read from image: "
<<
argv
[
6
]
<<
std
::
endl
;
}
...
...
@@ -147,7 +147,7 @@ int vnsGenericRSTransformGenericTest(int argc, char * argv[])
reader
->
UpdateOutputInformation
();
transform
->
SetOutputProjectionRef
(
reader
->
GetOutput
()
->
GetProjectionRef
());
transform
->
SetOutput
KeywordList
(
reader
->
GetOutput
()
->
GetImage
Keywordlist
(
));
transform
->
SetOutput
ImageMetadata
(
&
(
reader
->
GetOutput
()
->
GetImage
Metadata
()
));
std
::
cout
<<
"Output projection read from image: "
<<
argv
[
8
]
<<
std
::
endl
;
}
...
...
@@ -187,7 +187,7 @@ int vnsGenericRSTransformGenericTest(int argc, char * argv[])
}
double
averageElevation
=
atof
(
argv
[
14
]);
otb
::
DEMHandler
::
Instance
()
->
SetDefaultHeightAboveEllipsoid
(
averageElevation
);
otb
::
DEMHandler
::
Get
Instance
()
.
SetDefaultHeightAboveEllipsoid
(
averageElevation
);
std
::
cout
<<
"Average elevation "
<<
averageElevation
<<
" used."
<<
std
::
endl
;
}
...
...
@@ -199,7 +199,7 @@ int vnsGenericRSTransformGenericTest(int argc, char * argv[])
return
EXIT_FAILURE
;
}
otb
::
DEMHandler
::
Instance
()
->
OpenDEMDirectory
(
argv
[
14
]);
otb
::
DEMHandler
::
Get
Instance
()
.
OpenDEMDirectory
(
argv
[
14
]);
std
::
cout
<<
"Elevation from DEM "
<<
argv
[
14
]
<<
" used."
<<
std
::
endl
;
}
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment