On 10/03/19 15:39, Shane Carey wrote:
Hi,

I've been looking for ways of grass gis splitting a polygon into multiplepolygons with a line shapefile and wondering are there tools in Grass to do this!!

Does the following correspond to what you are looking for ?

test = polygons
test2 = lines

# patch lines and polygons together
v.patch test,test2 out=test_patched

# transform lines to boundaries
v.type test_patched out=test_patched_bound

# break boundaries at intersections
v.clean test_patched_bound tool=break out=test_patched_bound_clean

# add centroids to new areas
v.centroids test_patched_bound_clean out=final

This can be easily scripted into a small addon module.

Moritz



_______________________________________________
grass-user mailing list
[email protected]
https://lists.osgeo.org/mailman/listinfo/grass-user

Reply via email to