Skip to content

Commit

Permalink
GCP aligned to ODM
Browse files Browse the repository at this point in the history
Update gcp.py
  • Loading branch information
kikislater authored Sep 15, 2024
2 parents 777f1be + 4cfe291 commit abcf941
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions dm/opendm/gcp.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ def read(self):
self.raw_srs = lines[0] # SRS
self.srs = location.parse_srs_header(self.raw_srs)

for line in contents[1:]:
for line in lines[1:]:
if line != "" and line[0] != "#":
parts = line.strip().split()
parts = line.split()
if len(parts) >= 6:
self.entries.append(line)
else:
Expand Down Expand Up @@ -155,7 +155,7 @@ def make_filtered_copy(self, gcp_file_output, images_dir, min_images=3):
if os.path.exists(gcp_file_output):
os.remove(gcp_file_output)

files = map(os.path.basename, glob.glob(os.path.join(images_dir, "*")))
files = list(map(os.path.basename, glob.glob(os.path.join(images_dir, "*"))))

output = [self.raw_srs]
files_found = 0
Expand Down Expand Up @@ -234,6 +234,9 @@ def __init__(self, x, y, z, px, py, filename, extras=""):
self.filename = filename
self.extras = extras

def coords_key(self):
return "{} {} {}".format(self.x, self.y, self.z)

def __str__(self):
return "{} {} {} {} {} {} {}".format(self.x, self.y, self.z,
self.px, self.py,
Expand Down

0 comments on commit abcf941

Please sign in to comment.