EOX GitLab Instance

Skip to content
Snippets Groups Projects
Commit 87c36ca5 authored by Lubomir Dolezal's avatar Lubomir Dolezal
Browse files

[georeference] do not fail on folder having extra files (rpc, dimap)

parent bee8a70d
No related branches found
No related tags found
No related merge requests found
...@@ -33,7 +33,11 @@ def gcp_georef(input_filename: os.PathLike, target_filename: os.PathLike, order: ...@@ -33,7 +33,11 @@ def gcp_georef(input_filename: os.PathLike, target_filename: os.PathLike, order:
succeded = False succeded = False
# simple case: get the geotransform from some GCPs # simple case: get the geotransform from some GCPs
ds = gdal.Open(input_filename, gdal.GA_Update) try:
ds = gdal.Open(input_filename, gdal.GA_Update)
except RuntimeError:
logger.warn('Can not open file by GDAL %s' % (input_filename))
return
if ds.GetGCPCount() <= 4: if ds.GetGCPCount() <= 4:
try: try:
gcps = ds.GetGCPs() gcps = ds.GetGCPs()
......
import os import os
from os.path import join, basename from os.path import join, basename
from uuid import uuid4 from uuid import uuid4
from glob import glob
from ..util import replace_ext, gdal from ..util import replace_ext, gdal
import logging import logging
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment