[Qgis-developer] Cutting lines with a polygon boundary
Zoltan Szecsei
zoltans at geograph.co.za
Sun Jan 25 21:56:45 PST 2015
Hi Dev,
I put the request for help out on qgis-user and to my surprise, no one
came up with direct solution.
This suggests that a "crop" feature is missing, so maybe it could be put
in as a low priority feature request?
The thread is still active, so you can see the replies from Andre Joost
and Randal Hale there.
Thanks & regards,
Zoltan.
*qgis-user thread started 25th Jan at 14h51 (GMT+2):*
Hi,
I'm battling finding an easy way to cut some lines with a polygon
boundary, and then deleting the line portions that are OUTSIDE the
polygon.
Scenario:
4 separate SHAPE files with lines in them
1 shapefile with one polygon in it.
I need to cut the lines in all 4 shapefiles at the point that their
lines intersect the polygon boundary. Thereafter I want to delete
the line portions that are outside of this polygon boundary. In
other words, to be able to crop multiple layers according to some
polygon boundary.
I would have thought this to be a trivial issue, but I have tried:
* Vector Geometry Processing Clip, but it wants to extract the
data inside the polygon and create a new file with the
extracted data. (To be expected)
* Plugin 'Clipper': I select my lonely polygon, and then
activate one of the line layers (which is also in edit mode).
The plugin seems to do nothing when I choose 'intersection'
or 'clipping' preview, and when I choose 'clip' it tells me
to select at least one feature (but my polygon is still
selected.) The home-page link comes up as '404 not found'
* Didn't notice anything in the Advanced Digitizing plugin.
* CadTools and CadDigitize - no relevant facility found, but
really nice 'Help' doc - thanks guys!
* Feature 'Cut with Polygon from another Layer' deletes the
pieces I want to keep.
* Feature: 'Split selected features with line from another
layer' is to some extent what I want, but I want '... with
polygon from another layer'
So, I eventually gave up and converted my polygon into a line layer,
and used 'Split selected features with line from another layer', but
this is incredibly tedious because:
* It only does one layer at a time
* I then have to select the line segments that I want to delete.
So, does anyone know of a way to efficiently cut features in
multiple layers using a polygon, and then to be able to select the
pieces (multiple layers) that are either inside or outside the
polygon, and then delete them?
Regards & thanks in advance,
Zoltan
--
===========================================
Zoltan Szecsei PrGISc [PGP0031]
Geograph (Pty) Ltd.
GIS and Photogrammetric Services
P.O. Box 7, Muizenberg 7950, South Africa.
Mobile: +27-83-6004028
Fax: +27-86-6115323 www.geograph.co.za
===========================================
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20150126/bd54a476/attachment.html>
More information about the Qgis-developer
mailing list