Skip to content
Browse files

dg_mosaic: Add incorrect image placement check

See if we are trying to insert more than one image to a line location.
  • Loading branch information...
1 parent 9be4e41 commit 5a71bc17ad6a9ed725a398c6dd19f18c1254dfdc Zack Moratto committed Feb 24, 2013
Showing with 10 additions and 0 deletions.
  1. +10 −0 src/asp/Tools/dg_mosaic.py.in
View
10 src/asp/Tools/dg_mosaic.py.in
@@ -150,6 +150,16 @@ def main():
print " Placing %s" % args[i]
print " Size %ix%i at line %i" % (placements[i][1],placements[i][2],placements[i][0])
+ # Dummy Check! Look for duplicate files that will insert at
+ # same location. Files that do this would be the R?C1 variants
+ # that have the same XML file due to download errors or
+ # simplying mixing of R?C1 and the other format.
+ seen = set()
+ for i in range(len(args)):
+ if placements[i][0] in seen:
+ raise Exception('InputError', 'Input images have same input location which could be caused by repeated XML file or invalid TLC information')
+ seen.add(placements[i][0])
+
# We do a 2 pass with VRT wrapping because the following
# operations are performed in this order:
#

0 comments on commit 5a71bc1

Please sign in to comment.
Something went wrong with that request. Please try again.