pyclipper
pyclipper copied to clipboard
Is there a way to read lines from a shapefile?
Is there a way to read lines from a shapefile and use them as the subject?
Hi, pyclipper is only a wrapper for Angus Johnson's implementation of the Vatti's polygon clipping algorithm. How does your data look like? You need to have the points of the polygons available in the form of a python tuple, list or numpy array.
I have a polygon shapefile that represents the boundary of the city.
If you are able to extract the polygons from your file, it works (even with numpy arrays). However, this library does not support reading shapefiles, you will have to do this manually. Please refer to the section how to use, it gives a good idea what this library does: https://github.com/fonttools/pyclipper#how-to-use