Ejemplo n.º 1
0
def runShp():
    descr = "Smoothing GIS features with B-Splines. Input format: ESRI Shapefile. Builded on top of Numpy, Scipy, Shapely and Fiona."
    arg_parser = argparse.ArgumentParser(description=descr)

    arg_parser.add_argument('src_file', type=str, help='source shapefile path')
    arg_parser.add_argument('dst_file', type=str, help='destiny shapefile path')

    args = arg_parser.parse_args()

    src_file = args.src_file
    dst_file = args.dst_file

    gsm = GeoSmoothing()
    res_wkt = gsm.smoothShp(src_file, dst_file)
Ejemplo n.º 2
0
def runWkt():
    descr = "Smoothing GIS features with B-Splines. Input format: Well Known Text. Builded on top of Numpy, Scipy, Shapely and Fiona."
    arg_parser = argparse.ArgumentParser(description=descr)

    arg_parser.add_argument('wkt_string', type=str, help='Input WKT string to smooth')

    args = arg_parser.parse_args()

    wkt_string = args.wkt_string

    gsm = GeoSmoothing()
    res_wkt = gsm.smoothWkt(wkt_string)

    print(res_wkt)