parameters: (self)
docstring: Returns a tuple with attribute dictionaries for bikeways 
              on left and right side of the road.  
                  Dictionary with the following keys: 
                  widths:  is a tuple with sidewalk widths of left and right sidewalk.
                  if values are less than 0 means no sidewalk.
docstring_summary: Returns a tuple with attribute dictionaries for bikeways 
              on left and right side of the road.  
                  Dictionary with the following keys: 
                  widths:  is a tuple with sidewalk widths of left and right sidewalk.
                  if values are less than 0 means no sidewalk.
docstring_tokens: Returns a tuple with attribute dictionaries for bikeways on left and right side of the road . Dictionary with the following keys : widths : is a tuple with sidewalk widths of left and right sidewalk . if values are less than 0 means no sidewalk .
function: def make_bikewayattrs(self):
          """ Returns a tuple with attribute dictionaries for bikeways 
              on left and right side of the road.  
                  Dictionary with the following keys: 
                  widths:  is a tuple with sidewalk widths of left and right sidewalk.
                  if values are less than 0 means no sidewalk.
          """
          print 'make_bikewayattrs'
          self._bikewayattrs = (deepcopy(LANEATTRS_DEFAULT),
                                deepcopy(LANEATTRS_DEFAULT))
  
          osmattrs = self._osmattrs
          cycleway = osmattrs.get('cycleway', '')
          cycleway_left = osmattrs.get('cycleway:left', '')
          cycleway_right = osmattrs.get('cycleway:right', '')
  
          if osmattrs.has_key('cycleway:width'):
              width_left = float(osmattrs['cycleway:width'])
              width_right = width_left
  
          elif osmattrs.has_key('cycleway:both:width'):
              width_left = float(osmattrs['cycleway:both:width'])
              width_right = width_left
  
          else:
              width_left = float(osmattrs.get('cycleway:left:width', self.lanewidth_bike))
              width_right = float(osmattrs.get('cycleway:right:width', self.lanewidth_bike))
  
          if osmattrs.get('oneway', 'no') == 'no':
              # cycle lanes on bidir road
  
              if cycleway in LANEATTRS:
                  self.make_bikelane(is_opp=False, width=width_right)
                  self.make_bikelane(is_opp=True, width=width_left)
                  return
  
              elif cycleway in OSMKEYS_SHARED:
                  self.make_bikelane(is_opp=False, ids_modes_allow=self.ids_modes_pt_shared, width=width_right)
                  self.make_bikelane(is_opp=True, ids_modes_allow=self.ids_modes_pt_shared, width=width_left)
                  return
  
              elif cycleway in OSMKEYS_SHARED_OPP:
                  self.make_bikelane(is_opp=False, width=width_right)
                  self.make_bikelane(is_opp=True, ids_modes_allow=self.ids_modes_pt_shared, width=width_left)
                  return
  
              cycleway = osmattrs.get('cycleway:both', '')
              if cycleway in LANEATTRS:
                  self.make_bikelane(is_opp=False, width=width_right)
                  self.make_bikelane(is_opp=True, width=width_left)
                  return
  
              elif cycleway in OSMKEYS_SHARED:
                  self.make_bikelane(is_opp=False, ids_modes_allow=self.ids_modes_pt_shared, width=width_right)
                  self.make_bikelane(is_opp=True, ids_modes_allow=self.ids_modes_pt_shared, width=width_right)
                  return
  
              #cycleway = osmattrs.get('cycleway:left','')
              if (cycleway_left != '') & (cycleway_right != ''):
                  # also both sides
                  if cycleway_left in LANEATTRS:
                      self.make_bikelane(is_opp=True, is_rightside=False, width=width_left)
                  elif cycleway_left in OSMKEYS_SHARED:
                      self.make_bikelane(is_opp=True, ids_modes_allow=self.ids_modes_pt_shared)
  
                  if cycleway_right in LANEATTRS:
                      self.make_bikelane(is_opp=False, is_rightside=False, width=width_left)
                  elif cycleway_right in OSMKEYS_SHARED:
                      self.make_bikelane(is_opp=False, ids_modes_allow=self.ids_modes_pt_shared)
  
              # check left only
              elif cycleway_left in LANEATTRS:
                  self.make_bikelane(is_opp=True, is_rightside=False, width=width_left)
                  return
  
              elif cycleway_left in OSMKEYS_SHARED:
                  self.make_bikelane(is_opp=True, ids_modes_allow=self.ids_modes_pt_shared)
                  # if osmattrs.get('bicycle','no') == 'yes':
                  #    self.make_bikelane(is_opp = False, is_rightside = True,width = width_right)
  
              # check right only
              elif cycleway_right in LANEATTRS:
                  self.make_bikelane(is_opp=False, is_rightside=True)
  
              elif cycleway_right == 'opposite_share_busway':
                  self.make_bikelane(is_opp=True, ids_modes_allow=self.ids_modes_pt_shared, width=width_left)
                  # if osmattrs.get('bicycle','no') == 'yes':
                  #    self.make_bikelane(is_opp = False, is_rightside = True,width = width_right)
  
              # general bicycle tag if all from abive fails but share with pedestrians
              # Moved to main lane attr except if segragated
              elif (osmattrs.get('bicycle', 'no') in YES_OR_DESIGNATED) & (osmattrs.get('segregated', '') == 'yes'):
                  print '  check if there are cycle lanes already', self._bikewayattrs[0]['n_lane'] == 0, self._bikewayattrs[1]['n_lane'] == 0
  
                  if (self._bikewayattrs[0]['n_lane'] == 0) & (self._bikewayattrs[1]['n_lane'] == 0):
                      # no bikelanes in both dir
                      self.make_bikelane(is_opp=False, is_rightside=True, width=width_right)
                      self.make_bikelane(is_opp=True, is_rightside=True, width=width_left)
  
          else:
              # cycle lanes on oneway road
  
              if cycleway in LANEATTRS:
  
                  self.make_bikelane(is_opp=False)
  
                  if osmattrs.get('oneway:bicycle', 'yes') in YES_OR_DESIGNATED:
                      self.make_bikelane(is_opp=True, width=width_left)
                  # else:
                  #    self.make_bikelane(is_opp = False, width = width_right)
                  return
  
              elif cycleway == 'opposite':
                  self.make_bikelane(is_opp=True, is_rightside=True, width=width_left)
                  # if osmattrs.get('bicycle','no') == 'yes':
                  #    self.make_bikelane(is_opp = False, is_rightside = True, width = width_right)
                  return
  
              elif cycleway == 'opposite_share_busway':
                  self.make_bikelane(is_opp=True, is_rightside=True,
                                     ids_modes_allow=self.ids_modes_pt_shared, width=width_right)
                  # if osmattrs.get('bicycle','no') == 'yes':
                  #    self.make_bikelane(is_opp = False, is_rightside = True,width = width_right)
                  return
  
              if cycleway == 'both':
                  # attention with  this key a cycle lane in the opposite direction
                  # will be created as it makes no sense to have bikelanes
                  # in the smae direction on both sides
                  self.make_bikelane(is_opp=False, is_rightside=True, width=width_right)
                  self.make_bikelane(is_opp=True, is_rightside=True, width=width_left)
  
              elif cycleway_right in LANEATTRS:
                  self.make_bikelane(is_opp=False, width=width_right)
  
              elif cycleway_left in LANEATTRS:
                  self.make_bikelane(is_opp=False, is_rightside=False, width=width_right)
  
              elif cycleway_left == 'opposite_lane':
                  self.make_bikelane(is_opp=True, is_rightside=True, width=width_left)
                  # if osmattrs.get('bicycle','no') == 'yes':
                  #    self.make_bikelane(is_opp = False, is_rightside = True,width = width_right)
  
              elif osmattrs.get('oneway:bicycle', '') == 'no':
                  self.make_bikelane(is_opp=True, is_rightside=False, width=width_right)
                  # if (osmattrs.get('bicycle','no') == 'yes'):
                  #    # check if there are cycle lanes already
                  #    if (self._bikewayattrs[1]['n_lane'] == 0):
                  #        self.make_bikelane(is_opp = False, is_rightside = True, width = width_right)
  
              # Moved to main lane attr except segregated
              elif (osmattrs.get('bicycle', 'no') in YES_OR_DESIGNATED) & (osmattrs.get('segregated', '') == 'yes'):
  
                  print '  check if there are cycle lanes already', self._bikewayattrs[1]['n_lane'] == 0
                  if (self._bikewayattrs[1]['n_lane'] == 0):
                      self.make_bikelane(is_opp=False, is_rightside=True, width=width_left)
function_tokens: def make_bikewayattrs ( self ) : print 'make_bikewayattrs' self . _bikewayattrs = ( deepcopy ( LANEATTRS_DEFAULT ) , deepcopy ( LANEATTRS_DEFAULT ) ) osmattrs = self . _osmattrs cycleway = osmattrs . get ( 'cycleway' , '' ) cycleway_left = osmattrs . get ( 'cycleway:left' , '' ) cycleway_right = osmattrs . get ( 'cycleway:right' , '' ) if osmattrs . has_key ( 'cycleway:width' ) : width_left = float ( osmattrs [ 'cycleway:width' ] ) width_right = width_left elif osmattrs . has_key ( 'cycleway:both:width' ) : width_left = float ( osmattrs [ 'cycleway:both:width' ] ) width_right = width_left else : width_left = float ( osmattrs . get ( 'cycleway:left:width' , self . lanewidth_bike ) ) width_right = float ( osmattrs . get ( 'cycleway:right:width' , self . lanewidth_bike ) ) if osmattrs . get ( 'oneway' , 'no' ) == 'no' : # cycle lanes on bidir road if cycleway in LANEATTRS : self . make_bikelane ( is_opp = False , width = width_right ) self . make_bikelane ( is_opp = True , width = width_left ) return elif cycleway in OSMKEYS_SHARED : self . make_bikelane ( is_opp = False , ids_modes_allow = self . ids_modes_pt_shared , width = width_right ) self . make_bikelane ( is_opp = True , ids_modes_allow = self . ids_modes_pt_shared , width = width_left ) return elif cycleway in OSMKEYS_SHARED_OPP : self . make_bikelane ( is_opp = False , width = width_right ) self . make_bikelane ( is_opp = True , ids_modes_allow = self . ids_modes_pt_shared , width = width_left ) return cycleway = osmattrs . get ( 'cycleway:both' , '' ) if cycleway in LANEATTRS : self . make_bikelane ( is_opp = False , width = width_right ) self . make_bikelane ( is_opp = True , width = width_left ) return elif cycleway in OSMKEYS_SHARED : self . make_bikelane ( is_opp = False , ids_modes_allow = self . ids_modes_pt_shared , width = width_right ) self . make_bikelane ( is_opp = True , ids_modes_allow = self . ids_modes_pt_shared , width = width_right ) return #cycleway = osmattrs.get('cycleway:left','') if ( cycleway_left != '' ) & ( cycleway_right != '' ) : # also both sides if cycleway_left in LANEATTRS : self . make_bikelane ( is_opp = True , is_rightside = False , width = width_left ) elif cycleway_left in OSMKEYS_SHARED : self . make_bikelane ( is_opp = True , ids_modes_allow = self . ids_modes_pt_shared ) if cycleway_right in LANEATTRS : self . make_bikelane ( is_opp = False , is_rightside = False , width = width_left ) elif cycleway_right in OSMKEYS_SHARED : self . make_bikelane ( is_opp = False , ids_modes_allow = self . ids_modes_pt_shared ) # check left only elif cycleway_left in LANEATTRS : self . make_bikelane ( is_opp = True , is_rightside = False , width = width_left ) return elif cycleway_left in OSMKEYS_SHARED : self . make_bikelane ( is_opp = True , ids_modes_allow = self . ids_modes_pt_shared ) # if osmattrs.get('bicycle','no') == 'yes': #    self.make_bikelane(is_opp = False, is_rightside = True,width = width_right) # check right only elif cycleway_right in LANEATTRS : self . make_bikelane ( is_opp = False , is_rightside = True ) elif cycleway_right == 'opposite_share_busway' : self . make_bikelane ( is_opp = True , ids_modes_allow = self . ids_modes_pt_shared , width = width_left ) # if osmattrs.get('bicycle','no') == 'yes': #    self.make_bikelane(is_opp = False, is_rightside = True,width = width_right) # general bicycle tag if all from abive fails but share with pedestrians # Moved to main lane attr except if segragated elif ( osmattrs . get ( 'bicycle' , 'no' ) in YES_OR_DESIGNATED ) & ( osmattrs . get ( 'segregated' , '' ) == 'yes' ) : print '  check if there are cycle lanes already' , self . _bikewayattrs [ 0 ] [ 'n_lane' ] == 0 , self . _bikewayattrs [ 1 ] [ 'n_lane' ] == 0 if ( self . _bikewayattrs [ 0 ] [ 'n_lane' ] == 0 ) & ( self . _bikewayattrs [ 1 ] [ 'n_lane' ] == 0 ) : # no bikelanes in both dir self . make_bikelane ( is_opp = False , is_rightside = True , width = width_right ) self . make_bikelane ( is_opp = True , is_rightside = True , width = width_left ) else : # cycle lanes on oneway road if cycleway in LANEATTRS : self . make_bikelane ( is_opp = False ) if osmattrs . get ( 'oneway:bicycle' , 'yes' ) in YES_OR_DESIGNATED : self . make_bikelane ( is_opp = True , width = width_left ) # else: #    self.make_bikelane(is_opp = False, width = width_right) return elif cycleway == 'opposite' : self . make_bikelane ( is_opp = True , is_rightside = True , width = width_left ) # if osmattrs.get('bicycle','no') == 'yes': #    self.make_bikelane(is_opp = False, is_rightside = True, width = width_right) return elif cycleway == 'opposite_share_busway' : self . make_bikelane ( is_opp = True , is_rightside = True , ids_modes_allow = self . ids_modes_pt_shared , width = width_right ) # if osmattrs.get('bicycle','no') == 'yes': #    self.make_bikelane(is_opp = False, is_rightside = True,width = width_right) return if cycleway == 'both' : # attention with  this key a cycle lane in the opposite direction # will be created as it makes no sense to have bikelanes # in the smae direction on both sides self . make_bikelane ( is_opp = False , is_rightside = True , width = width_right ) self . make_bikelane ( is_opp = True , is_rightside = True , width = width_left ) elif cycleway_right in LANEATTRS : self . make_bikelane ( is_opp = False , width = width_right ) elif cycleway_left in LANEATTRS : self . make_bikelane ( is_opp = False , is_rightside = False , width = width_right ) elif cycleway_left == 'opposite_lane' : self . make_bikelane ( is_opp = True , is_rightside = True , width = width_left ) # if osmattrs.get('bicycle','no') == 'yes': #    self.make_bikelane(is_opp = False, is_rightside = True,width = width_right) elif osmattrs . get ( 'oneway:bicycle' , '' ) == 'no' : self . make_bikelane ( is_opp = True , is_rightside = False , width = width_right ) # if (osmattrs.get('bicycle','no') == 'yes'): #    # check if there are cycle lanes already #    if (self._bikewayattrs[1]['n_lane'] == 0): #        self.make_bikelane(is_opp = False, is_rightside = True, width = width_right) # Moved to main lane attr except segregated elif ( osmattrs . get ( 'bicycle' , 'no' ) in YES_OR_DESIGNATED ) & ( osmattrs . get ( 'segregated' , '' ) == 'yes' ) : print '  check if there are cycle lanes already' , self . _bikewayattrs [ 1 ] [ 'n_lane' ] == 0 if ( self . _bikewayattrs [ 1 ] [ 'n_lane' ] == 0 ) : self . make_bikelane ( is_opp = False , is_rightside = True , width = width_left )