EOX GitLab Instance
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
V
VS
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Container Registry
Model registry
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ESA
PRISM
VS
Commits
bee8a70d
Commit
bee8a70d
authored
4 years ago
by
Lubomir Dolezal
Browse files
Options
Downloads
Patches
Plain Diff
when no rpc found to rename, do not fail (dimap is enough)
parent
83109a3f
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
preprocessor/preprocessor/steps/georeference.py
+5
-4
5 additions, 4 deletions
preprocessor/preprocessor/steps/georeference.py
with
5 additions
and
4 deletions
preprocessor/preprocessor/steps/georeference.py
+
5
−
4
View file @
bee8a70d
...
...
@@ -5,7 +5,7 @@ from glob import glob
import
shutil
from
typing
import
List
,
Tuple
from
..util
import
gdal
,
osr
from
..util
import
gdal
,
osr
,
replace_ext
logger
=
logging
.
getLogger
(
__name__
)
...
...
@@ -73,13 +73,14 @@ def rpc_georef(input_filename: os.PathLike, target_filename: os.PathLike, rpc_fi
filename
=
input_filename
,
fileroot
=
fileroot
,
extension
=
extension
,
)
rpc_filename
=
None
try
:
rpc_filename
=
glob
(
rpc_file_glob
)[
0
]
rpc_filename
=
glob
(
rpc_file_glob
,
recursive
=
True
)[
0
]
except
IndexError
:
logger
.
warn
(
'
No RPC filename found with glob %s
'
%
rpc_file_glob
)
# rename RPC filename to be compatible with GDAL
shutil
.
move
(
rpc_filename
,
'
%s.rpc
'
%
input_filename
)
if
rpc_filename
:
shutil
.
move
(
rpc_filename
,
replace_ext
(
input_filename
,
'
.rpc
'
))
gdal
.
Warp
(
target_filename
,
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment