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

Matthew Denno mgdenno at gmail.com
Mon Sep 14 21:22:45 EDT 2009


Luiz,

Thanks for your thoughts.  I agree with your approach for the most part.  I
think that the difficulty for me will be with the implementation and
achieving it programmaticlly.

I should have been more specific about the picture that I shared.  When I
say segment I am referring to each individual single straight section (i.e.
two points) so each of the polylines that you are referring to is actually
many individual segments.  That doesn't really change the approach but adds
an extra step.  Basically the polylines need to be "dissolved" first.  Is
there an existing function to acheive this?  Also, is there an enexisting
function to union polygons programaticlly?

Matt



On Mon, Sep 14, 2009 at 6:38 PM, Luiz Motta <motta.luiz at gmail.com> wrote:

> 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
>>
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/qgis-developer/attachments/20090914/6da81dc9/attachment.html


More information about the Qgis-developer mailing list