Commit 2a9d71f9 authored by jay's avatar jay
Browse files

minor bug fixes

parent 89354eb1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -1474,7 +1474,7 @@ WHERE points.active = True AND measures.active=TRUE AND measures.jigreject=FALSE
        """
        df = pd.read_sql(sql, engine)
        df.rename(columns={'imageid':'image_index','id':'point_id', 'pointtype' : 'type',
            'sample':'x', 'line':'y', 'serial': 'serialnumber'}, inplace=True)
            'sample':'x', 'line':'y', 'serial': 'serialnumber', 'measuretype':'measure_type'}, inplace=True)

        #create columns in the dataframe; zeros ensure plio (/protobuf) will
        #ignore unless populated with alternate values
+1 −2
Original line number Diff line number Diff line
@@ -603,8 +603,7 @@ class NetworkNode(Node):
        Get the number of keypoints from the database
        """
        res = self._from_db(Keypoints)
        nkps = res.nkeypoints
        return nkps
        return res.nkeypoints if res is not None else None

    def create_camera(self):
        # Create the camera entry
+2 −2
Original line number Diff line number Diff line
@@ -70,7 +70,7 @@ def cluster_place_points_in_overlaps(size_threshold=0.0007,
                                     walltime='00:10:00',
                                     chunksize=1000,
                                     cam_type="csm",
                                     query_string='SELECT overlay.id FROM overlay LEFT JOIN points ON ST_INTERSECTS(overlay.geom, points.geom) WHERE points.id IS NULL;'):
                                     query_string='SELECT overlay.id FROM overlay LEFT JOIN points ON ST_INTERSECTS(overlay.geom, points.geom) WHERE points.id IS NULL AND ST_AREA(overlay.geom) >= {};'):
    """
    Place points in all of the overlap geometries by back-projecing using
    sensor models. This method uses the cluster to process all of the overlaps
@@ -99,7 +99,7 @@ def cluster_place_points_in_overlaps(size_threshold=0.0007,
    queuename = config['redis']['processing_queue']
    past = 0
    session = Session()
    ids = [i[0] for i in session.execute(query_string)]
    ids = [i[0] for i in session.execute(query_string.format(size_threshold))]
    session.close()
    for i, id in enumerate(ids):
        msg = {'id' : id,