- if mtfcc == "L4010": #Pipeline
- tags["man_made"] = "pipeline"
- if mtfcc == "L4020": #Powerline
- tags["power"] = "line"
- if mtfcc == "L4031": #Aerial Tramway/Ski Lift
- tags["aerialway"] = "cable_car"
- if mtfcc == "L4110": #Fence Line
- tags["barrier"] = "fence"
- if mtfcc == "L4125": #Cliff/Escarpment
- tags["natural"] = "cliff"
- if mtfcc == "L4165": #Ferry Crossing
- tags["route"] = "ferry"
- if mtfcc == "R1011": #Railroad Feature (Main, Spur, or Yard)
- tags["railway"] = "rail"
- ttyp = poFeature.GetField("TTYP")
- if ttyp != None:
- if ttyp == "S":
- tags["service"] = "spur"
- if ttyp == "Y":
- tags["service"] = "yard"
- tags["tiger:ttyp"] = ttyp
- if mtfcc == "R1051": #Carline, Streetcar Track, Monorail, Other Mass Transit Rail)
- tags["railway"] = "light_rail"
- if mtfcc == "R1052": #Cog Rail Line, Incline Rail Line, Tram
- tags["railway"] = "incline"
- if mtfcc == "S1100":
- tags["highway"] = "primary"
- if mtfcc == "S1200":
- tags["highway"] = "secondary"
- if mtfcc == "S1400":
- tags["highway"] = "residential"
- if mtfcc == "S1500":
- tags["highway"] = "track"
- if mtfcc == "S1630": #Ramp
- tags["highway"] = "motorway_link"
- if mtfcc == "S1640": #Service Drive usually along a limited access highway
- tags["highway"] = "service"
- if mtfcc == "S1710": #Walkway/Pedestrian Trail
- tags["highway"] = "path"
- if mtfcc == "S1720":
- tags["highway"] = "steps"
- if mtfcc == "S1730": #Alley
- tags["highway"] = "service"
- tags["service"] = "alley"
- if mtfcc == "S1740": #Private Road for service vehicles (logging, oil, fields, ranches, etc.)
- tags["highway"] = "service"
- tags["access"] = "private"
- if mtfcc == "S1750": #Private Driveway
- tags["highway"] = "service"
- tags["access"] = "private"
- tags["service"] = "driveway"
- if mtfcc == "S1780": #Parking Lot Road
- tags["highway"] = "service"
- tags["service"] = "parking_aisle"
- if mtfcc == "S1820": #Bike Path or Trail
- tags["highway"] = "cycleway"
- if mtfcc == "S1830": #Bridle Path
- tags["highway"] = "bridleway"
- tags["tiger:mtfcc"] = mtfcc
+ if mtfcc == "L4010": #Pipeline
+ tags["man_made"] = "pipeline"
+ if mtfcc == "L4020": #Powerline
+ tags["power"] = "line"
+ if mtfcc == "L4031": #Aerial Tramway/Ski Lift
+ tags["aerialway"] = "cable_car"
+ if mtfcc == "L4110": #Fence Line
+ tags["barrier"] = "fence"
+ if mtfcc == "L4125": #Cliff/Escarpment
+ tags["natural"] = "cliff"
+ if mtfcc == "L4165": #Ferry Crossing
+ tags["route"] = "ferry"
+ if mtfcc == "R1011": #Railroad Feature (Main, Spur, or Yard)
+ tags["railway"] = "rail"
+ ttyp = poFeature.GetField("TTYP")
+ if ttyp != None:
+ if ttyp == "S":
+ tags["service"] = "spur"
+ if ttyp == "Y":
+ tags["service"] = "yard"
+ tags["tiger:ttyp"] = ttyp
+ if mtfcc == "R1051": #Carline, Streetcar Track, Monorail, Other Mass Transit Rail)
+ tags["railway"] = "light_rail"
+ if mtfcc == "R1052": #Cog Rail Line, Incline Rail Line, Tram
+ tags["railway"] = "incline"
+ if mtfcc == "S1100":
+ tags["highway"] = "primary"
+ if mtfcc == "S1200":
+ tags["highway"] = "secondary"
+ if mtfcc == "S1400":
+ tags["highway"] = "residential"
+ if mtfcc == "S1500":
+ tags["highway"] = "track"
+ if mtfcc == "S1630": #Ramp
+ tags["highway"] = "motorway_link"
+ if mtfcc == "S1640": #Service Drive usually along a limited access highway
+ tags["highway"] = "service"
+ if mtfcc == "S1710": #Walkway/Pedestrian Trail
+ tags["highway"] = "path"
+ if mtfcc == "S1720":
+ tags["highway"] = "steps"
+ if mtfcc == "S1730": #Alley
+ tags["highway"] = "service"
+ tags["service"] = "alley"
+ if mtfcc == "S1740": #Private Road for service vehicles (logging, oil, fields, ranches, etc.)
+ tags["highway"] = "service"
+ tags["access"] = "private"
+ if mtfcc == "S1750": #Private Driveway
+ tags["highway"] = "service"
+ tags["access"] = "private"
+ tags["service"] = "driveway"
+ if mtfcc == "S1780": #Parking Lot Road
+ tags["highway"] = "service"
+ tags["service"] = "parking_aisle"
+ if mtfcc == "S1820": #Bike Path or Trail
+ tags["highway"] = "cycleway"
+ if mtfcc == "S1830": #Bridle Path
+ tags["highway"] = "bridleway"
+ tags["tiger:mtfcc"] = mtfcc
- rtofromint = right #Do the addresses convert to integers?
- ltofromint = left #Do the addresses convert to integers?
- if right:
- try: rfromint = int(rfromadd)
- except:
- print("Non integer address: %s" % rfromadd)
- rtofromint = False
- try: rtoint = int(rtoadd)
- except:
- print("Non integer address: %s" % rtoadd)
- rtofromint = False
- if left:
- try: lfromint = int(lfromadd)
- except:
- print("Non integer address: %s" % lfromadd)
- ltofromint = False
- try: ltoint = int(ltoadd)
- except:
- print("Non integer address: %s" % ltoadd)
- ltofromint = False
- import_guid = time.strftime( '%Y%m%d%H%M%S' )
- if right:
- id += 1
+ rtofromint = right #Do the addresses convert to integers?
+ ltofromint = left #Do the addresses convert to integers?
+ if right:
+ try: rfromint = int(rfromadd)
+ except:
+ print("Non integer address: %s" % rfromadd)
+ rtofromint = False
+ try: rtoint = int(rtoadd)
+ except:
+ print("Non integer address: %s" % rtoadd)
+ rtofromint = False
+ if left:
+ try: lfromint = int(lfromadd)
+ except:
+ print("Non integer address: %s" % lfromadd)
+ ltofromint = False
+ try: ltoint = int(ltoadd)
+ except:
+ print("Non integer address: %s" % ltoadd)
+ ltofromint = False
+ import_guid = time.strftime( '%Y%m%d%H%M%S' )
+ if right:
+ id += 1
ret.append( "select tigger_create_interpolation(ST_GeomFromText('LINESTRING(%s)',4326), '%s', '%s', '%s', '%s', '%s', '%s');" %
( ",".join(rlinestring), rfromadd.replace("'", "''"), rtoadd.replace("'", "''"), interpolationtype.replace("'", "''"), name.replace("'", "''"), county.replace("'", "''"), zipr.replace("'", "''") ) )
ret.append( "select tigger_create_interpolation(ST_GeomFromText('LINESTRING(%s)',4326), '%s', '%s', '%s', '%s', '%s', '%s');" %
( ",".join(rlinestring), rfromadd.replace("'", "''"), rtoadd.replace("'", "''"), interpolationtype.replace("'", "''"), name.replace("'", "''"), county.replace("'", "''"), zipr.replace("'", "''") ) )
interpolationtype = "all";
ret.append( "select tigger_create_interpolation(ST_GeomFromText('LINESTRING(%s)',4326), '%s', '%s', '%s', '%s', '%s', '%s');" %
( ",".join(llinestring), lfromadd.replace("'", "''"), ltoadd.replace("'", "''"), interpolationtype.replace("'", "''"), name.replace("'", "''"), county.replace("'", "''"), zipl.replace("'", "''") ) )
interpolationtype = "all";
ret.append( "select tigger_create_interpolation(ST_GeomFromText('LINESTRING(%s)',4326), '%s', '%s', '%s', '%s', '%s', '%s');" %
( ",".join(llinestring), lfromadd.replace("'", "''"), ltoadd.replace("'", "''"), interpolationtype.replace("'", "''"), name.replace("'", "''"), county.replace("'", "''"), zipl.replace("'", "''") ) )