Commit 353cd88e authored by acpaquette's avatar acpaquette Committed by jlaura
Browse files

All the, Small things (#322)

* Minor edge and overlaps submit script fixes

* Update to NetworkNode footprint to use the dem in a config
parent eb3e37f0
Loading
Loading
Loading
Loading
+2 −2
Original line number Diff line number Diff line
@@ -280,8 +280,8 @@ class Edge(dict, MutableMapping):
                 (self.matches["destination_idx"].isin(d_idx))] = True
        self.masks['overlap'] = mask

    def symmetry_check(self):
        self.masks['symmetry'] = od.mirroring_test(self.matches)
    def symmetry_check(self, clean_keys=[], maskname='symmetry', **kwargs):
        self.masks[maskname] = od.mirroring_test(self.matches)

    def ratio_check(self, clean_keys=[], maskname='ratio', **kwargs):
        matches, mask = self.clean(clean_keys)
+7 −1
Original line number Diff line number Diff line
@@ -650,7 +650,13 @@ class NetworkNode(Node):
        res = Session().query(Images).filter(Images.id == self['node_id']).first()
        if res is None:
            boundary = generate_boundary(self.geodata.raster_size[::-1])  # yx to xy
            footprint_latlon = generate_latlon_footprint(self.camera, boundary)
            spatial = config.get('spatial')
            try:
                geodata = GeoDataset(spatial.get('dem'))
            except Exception as e:
                warnings.warn('Unable to get the Geodata from dem.\n{}'.format(e))
                geodata = 0.0
            footprint_latlon = generate_latlon_footprint(self.camera, boundary, dem=geodata)
            footprint_latlon.FlattenTo2D()
        else:
            footprint_latlon = res.footprint_latlon
+2 −0
Original line number Diff line number Diff line
@@ -14,6 +14,8 @@ from autocnet.spatial.overlap import place_points_in_overlap
from autocnet.graph.node import NetworkNode
from autocnet import Session

from plio.io.io_gdal import GeoDataset

#Load the config file
try:
    with open(os.environ['autocnet_config'], 'r') as f: