Commit 94e57f20 authored by Kelvinrr's avatar Kelvinrr
Browse files

added warning and filter for empty lines

parent a80c4259
Loading
Loading
Loading
Loading
+3 −2
Original line number Diff line number Diff line
@@ -103,6 +103,7 @@ class CandidateGraph(nx.Graph):
            with open(filelist, 'r') as f:
                filelist = f.readlines()
                filelist = map(str.rstrip, filelist)
                filelist = filter(None, filelist)

        # TODO: Reject unsupported file formats + work with more file formats
        if basepath:
@@ -126,8 +127,8 @@ class CandidateGraph(nx.Graph):
                if i_fp.Intersects(j_fp):
                    adjacency_dict[i.file_name].append(j.file_name)
                    adjacency_dict[j.file_name].append(i.file_name)
            except: # no geospatial information embedded in the images
                pass
            except:
                warnings.warn('No or incorrect geospatial information for {} and/or {}'.format(i, j))
        return cls(adjacency_dict)