Ejemplo n.º 1
0
def main():
    streets_out = "./streets.expanded.txt"
    csv_out = "./streets.types.csv"
    # compatibility_out = "./city.street.txt"

    parser = OptionParser()
    parser.add_option("--streets",
                      metavar="STREET_FILE",
                      help="read input streets from STREET_FILE")
    parser.add_option("--append-streets",
                      metavar="STREET_EXPANSIONS",
                      help="appends expansions to current expansions")
    parser.add_option("-c",
                      "--no-cache",
                      action="store_true",
                      help="Do not append existing expansions",
                      default=False)

    (options, args) = parser.parse_args()

    if not options.append_streets and not options.streets:
        sys.exit(parser.print_help())

    streets_append = options.append_streets
    process_places(options.streets,
                   streets_out,
                   streets_append,
                   no_cache=options.no_cache)
    handle_csv(options.streets, csv_out, no_cache=options.no_cache)
Ejemplo n.º 2
0
def main():
    city_out = "./cities.expanded.txt"
    geo_out = "./cities.locations.csv"
    # compatibility_out = "./state.city.txt"

    parser = OptionParser()
    parser.add_option("--cities",
                      metavar="CITY_FILE",
                      help="read input cities from CITY_FILE")
    parser.add_option("--append-cities",
                      metavar="CITY_EXPANSIONS",
                      help="appends expansions to current expansions")
    parser.add_option("-c",
                      "--no-cache",
                      action="store_true",
                      help="Do not append existing expansions",
                      default=False)

    (options, args) = parser.parse_args()

    if not options.cities and not options.append_cities:
        sys.exit(parser.print_help())

    city_append = options.append_cities
    handle_cities(options.cities,
                  city_out,
                  city_append,
                  no_cache=options.no_cache)
    handle_csv(options.cities, geo_out, no_cache=options.no_cache)
Ejemplo n.º 3
0
def main():
    streets_out = "./streets.expanded.txt"
    csv_out = "./streets.types.csv"
    # compatibility_out = "./city.street.txt"
    
    parser = OptionParser()
    parser.add_option("--streets", metavar="STREET_FILE", help="read input streets from STREET_FILE")
    parser.add_option("--append-streets", metavar="STREET_EXPANSIONS", help="appends expansions to current expansions")
    parser.add_option("-c", "--no-cache", action="store_true", help="Do not append existing expansions", default=False)

    (options, args) = parser.parse_args()

    if not options.append_streets and not options.streets:
        sys.exit(parser.print_help())

    streets_append = options.append_streets
    process_places(options.streets, streets_out, streets_append, no_cache=options.no_cache)
    handle_csv(options.streets, csv_out, no_cache=options.no_cache)
Ejemplo n.º 4
0
def main():
    city_out = "./cities.expanded.txt"
    geo_out = "./cities.locations.csv"
    # compatibility_out = "./state.city.txt"
    
    parser = OptionParser()
    parser.add_option("--cities", metavar="CITY_FILE", help="read input cities from CITY_FILE")
    parser.add_option("--append-cities", metavar="CITY_EXPANSIONS", help="appends expansions to current expansions")
    parser.add_option("-c", "--no-cache", action="store_true", help="Do not append existing expansions", default=False)

    (options, args) = parser.parse_args()

    if not options.cities and not options.append_cities:
        sys.exit(parser.print_help())


    city_append = options.append_cities
    handle_cities(options.cities, city_out, city_append, no_cache=options.no_cache)
    handle_csv(options.cities, geo_out, no_cache=options.no_cache)