nclt2ros/visualizer/gt.py
def save_kml_line(self):
        """visualize the ground truth as a kml file
        """

        gt_x = self.gt[:, 1]
        gt_y = self.gt[:, 2]
        gt_list = list()

        if len(gt_x) > 600000:
            divider = 35
        elif len(gt_x) > 200000:
            divider = 15
        else:
            divider = 5

        for row, (x_i, y_j) in enumerate(zip(gt_x, gt_y)):

            if not math.isnan(x_i) and not math.isnan(y_j):
                lat = self.gt_converter.get_lat(x=x_i)
                lng = self.gt_converter.get_lon(y=y_j)

                tup = (lng, lat)

                # minimize the elements in the kml output file
                if (row % divider) == 0:
                    gt_list.append(tup)

        # create line string
        ls = self.kml.newlinestring(name="ground truth", coords=gt_list, description="latitude and longitude from ground truth",)
        ls.style.linestyle.width = 1
        ls.style.linestyle.color = self.green

        # save kml file in visualization directory
        self.kml.save(self.visualization_kml_dir + self.output_file + '.kml')
visualize the ground truth as a kml file
        
visualize the ground truth as a kml file
visualize the ground truth as a kml file
def save_kml_line(self):
        gt_x = self.gt[:, 1]
        gt_y = self.gt[:, 2]
        gt_list = list()
        if len(gt_x) > 600000:
            divider = 35
        elif len(gt_x) > 200000:
            divider = 15
        else:
            divider = 5
        for row, (x_i, y_j) in enumerate(zip(gt_x, gt_y)):
            if not math.isnan(x_i) and not math.isnan(y_j):
                lat = self.gt_converter.get_lat(x=x_i)
                lng = self.gt_converter.get_lon(y=y_j)
                tup = (lng, lat)
                if (row % divider) == 0:
                    gt_list.append(tup)
        ls = self.kml.newlinestring(name="ground truth", coords=gt_list, description="latitude and longitude from ground truth",)
        ls.style.linestyle.width = 1
        ls.style.linestyle.color = self.green
        self.kml.save(self.visualization_kml_dir + self.output_file + '.kml')
def save_kml_line ( self ) : gt_x = self . gt [ : , 1 ] gt_y = self . gt [ : , 2 ] gt_list = list ( ) if len ( gt_x ) > 600000 : divider = 35 elif len ( gt_x ) > 200000 : divider = 15 else : divider = 5 for row , ( x_i , y_j ) in enumerate ( zip ( gt_x , gt_y ) ) : if not math . isnan ( x_i ) and not math . isnan ( y_j ) : lat = self . gt_converter . get_lat ( x = x_i ) lng = self . gt_converter . get_lon ( y = y_j ) tup = ( lng , lat ) if ( row % divider ) == 0 : gt_list . append ( tup ) ls = self . kml . newlinestring ( name = "ground truth" , coords = gt_list , description = "latitude and longitude from ground truth" , ) ls . style . linestyle . width = 1 ls . style . linestyle . color = self . green self . kml . save ( self . visualization_kml_dir + self . output_file + '.kml' )
visualize the ground truth as a kml file
visualize the ground truth as a kml file
"""visualize the ground truth as a kml file
        """ # minimize the elements in the kml output file
 # create line string
 # save kml file in visualization directory

self