Search code examples
pythonpython-2.7linepolygonclip

Clipping Line shapefiles within the extent of Polygon shape


My question is an extension of Vertical lines in a polygon shapefile. Kindly refer to that question first.

What you shall see there is a method of generating vertical lines with respect to the bounding box, at user defined spacing. I understand that OGR, Fiona, Shapely etc. can be used to do the (next step of) clipping, but I am not able to understand their utilization.

How do I read one the line and polygon shapefile? Every application that uses Shapely shows how to generate the LineString, Point or Polygon but never to read and existing shapefile

Kindly assist me with at-least a skeleton structure so I can build on it.


Solution

  • As a continuation to the above mentioned question, the solution of the problem is available at Clipping Line shapefiles within extent of Polygon shape. I think that this set of questions can now be considered answered and closed.

    Thank you all for your assistance.