Exemple #1
0
parser.add_argument(
    '--simplify', default=0, help='simplify tolerance in degrees, default: 0',
    type=float
)

parser.add_argument(
    '--output_dir', default='poly', help='output directory, default: poly'
)

parser.add_argument(
    '--geojson', action='store_true', default=False,
    help='create GEOJson files of poly geometry'
)

if __name__ == '__main__':
    # parse the args, and call default function
    args = parser.parse_args()
    proj_settings = POSMSettings(args.settings)

    settings = proj_settings.get_settings()
    admin_levels = proj_settings.get_admin_levels()

    logging.config.dictConfig(settings.get('logging'))

    main(
        settings=settings, directory=args.output_dir,
        bufferDistance=args.buffer, simplifyDistance=args.simplify,
        geojson=args.geojson
    )