pyosp package
Subpackages
Submodules
pyosp.util module
- pyosp.util.grouped(iterable)
s -> (s0, s1), (s2, s3), (s4, s5), …
- pyosp.util.pairwise(iterable)
s -> (s0,s1), (s1,s2), (s2, s3), …
- pyosp.util.point_coords(shapefile)
Return coordinates from point(s) shapefile
- pyosp.util.progressBar(current, total, width=25)
Progress bar, call inside of iteration.
- Parameters
current (int) – current progress
total (int) – total iterations
width (int, optional) – bar width, defaults to 25
- pyosp.util.read_shape(shapefile)
Return a shapely object.
- pyosp.util.write_polygon(poly, out_file)
Write polygon shapefile to file path.
- Parameters
poly (shapely polygon object) – input polygon
out_file (str) – file path to restore polygon
- pyosp.util.write_polylines(poly, out_file)
Write polyline shapefile to file path.
- Parameters
poly (shapely polyline object) – input polyline
out_file (str) – file path to restore polyline