Ejemplo n.º 1
0
 def get_template_data(self):
     """
     Culls unused items from the SABX 1.0 data.
     """
     SabxProcessor.get_template_data(self)
     self._get_used_item_ids()
     self._cull_unused_items()
Ejemplo n.º 2
0
 def get_template_data(self):
     """
     Renumber all the ids for all the SABX 1.0 data.
     """
     SabxProcessor.get_template_data(self)
     self.id = Id(self.options.start, self.options.unique)
     self._create_translations()
     self._renumber_ids()
Ejemplo n.º 3
0
    def get_template_data(self):
        """
        Add the points to the SABX 1.0 data.
        """
        SabxProcessor.get_template_data(self)

        points = []
        for seg_id in \
                self.template_data['ride_dict'][self.options.ride_index].segs:
            for pt in self.template_data['seg_dict'][seg_id].waypoints:
                points.append( {'index': pt.id, 
                                'lat': pt.lat, 
                                'lon': pt.lon,
                                'ele': pt.ele} )
        self.template_data['points'] = points
Ejemplo n.º 4
0
 def get_template_data(self):
     """
     Update the template data by merging it with the specified CSV data.
     """
     SabxProcessor.get_template_data(self)
     new_sabx = self._parse_csv()
     self.template_data['park_list'], self.template_data['park_dict'] = \
         new_sabx['park_list'], new_sabx['park_dict']
     self.template_data['turn_list'], self.template_data['turn_dict'] = \
         new_sabx['turn_list'], new_sabx['turn_dict']
     self.template_data['seg_list'], self.template_data['seg_dict'] = \
         new_sabx['seg_list'], new_sabx['seg_dict']
     self.template_data['stop_list'], self.template_data['stop_dict'] = \
         new_sabx['stop_list'], new_sabx['stop_dict']
     self.template_data['poi_list'], self.template_data['poi_dict'] = \
         new_sabx['poi_list'], new_sabx['poi_dict']
     self.template_data['ride_list'], self.template_data['ride_dict'] = \
         new_sabx['ride_list'], new_sabx['ride_dict']
Ejemplo n.º 5
0
    def get_template_data(self):
        """
        Add the USGS elevations to the template data.
        """
        SabxProcessor.get_template_data(self)

        count = 0
        for seg in self.template_data['seg_list']:
            for pt in seg.waypoints:
                pt.usgs = get_usgs(pt.lat, pt.lon)

                count += 1
                if count % 100 == 0:
                    sys.stderr.write("%s" % count)
                else:
                    sys.stderr.write(".")
                
        sys.stderr.write("\n")
Ejemplo n.º 6
0
 def get_template_data(self):
     """
     Reverse the waypoints of the designated segment.
     """
     SabxProcessor.get_template_data(self)
     self.template_data['seg_dict'][self.seg].waypoints.reverse()