[Qgis-developer] Create Multiple Polygons from Polygon and Polylines

Luiz Motta motta.luiz at gmail.com
Mon Sep 14 18:38:06 EDT 2009


Matt,

I see your picture and my idea are same operations:

1) Split:
Create polygons from layer polygon(source) with polylines(cut).
Polygon data -> Boundary Shapefile
Cut data  -> Polylines segment (only two segments in picture showed) * 
these lines cross or touch line boundary of polygon
Result -> three Polygons

2) Make polygon from polyline closed:
Polyline -> Polylines segment (only closed)
Result -> Polygon

3) Union:
Polygon -> polygon from result first item
Polygon -> polygon from result second  item
Result -> All polygon

Strategy:
1) Separate type polylines: Closed (A) and not Closed(B)
2) Make polygon from A
3) Split polygon(big polygon) with B
4) Union result item 2 with result item 3.



Matthew Denno escreveu:
> Hi All,
>
> I am trying to programmaticly create a polygon shapefile from two 
> separate input shapefiles.  The first is a boundary polygon shapefile 
> and the second is a a polyline shapefile that contains a number of 
> segments (could many) that are spatially contained in the boundary 
> polygon.  The polyline segments either form closed areas or when 
> connected end-to-end extend accross the polygon. I want to use the 
> polylines to essentially cut the polygon into smaller polygons.  Does 
> anyone have any suggestions where to start with this problem.  My 
> question may not be completely clear so I have uploaded an example 
> picture: http://www.flickr.com/photos/42311742@N02/3904105994/
>
> Thanks,
>
> Matt
> ------------------------------------------------------------------------
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>   



More information about the Qgis-developer mailing list