Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
10
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
Main Repositories
otb
Commits
fcca4d70
Commit
fcca4d70
authored
Nov 02, 2020
by
Julien Osman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ENH: Don't write RPC twice in image file
parent
4875efa9
Pipeline
#6070
passed with stages
in 128 minutes and 50 seconds
Changes
1
Pipelines
2
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
12 additions
and
21 deletions
+12
-21
Modules/IO/IOGDAL/src/otbGDALImageIO.cxx
Modules/IO/IOGDAL/src/otbGDALImageIO.cxx
+12
-21
No files found.
Modules/IO/IOGDAL/src/otbGDALImageIO.cxx
View file @
fcca4d70
...
...
@@ -1940,27 +1940,18 @@ void GDALImageIO::KeywordlistToMetadata(ImageMetadataBase::Keywordlist kwl, int
}
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
);
// RPC Models have already been exported (see InternalWriteImageInformation)
}
else
if
(
kv
.
first
==
MetaData
::
MDGeomNames
.
left
.
at
(
MDGeom
::
GCP
))
{
// GCPs have already been exported (see InternalWriteImageInformation)
}
else
if
(
kv
.
first
==
MetaData
::
MDGeomNames
.
left
.
at
(
MDGeom
::
ProjectionWKT
))
{
// WKT projection have already been exported (see InternalWriteImageInformation)
}
else
SetMetadataValue
(
kv
.
first
.
c_str
(),
kv
.
second
.
c_str
(),
band
);
}
}
...
...
Write
Preview
Markdown
is supported
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