Markus Schaber's plpgsql procedure of 'Cutting a Polygon into Pieces with maximum Vertex number' worked fine even for extremely complex polygons.I experimented with complex polygon with over 800 vertices and could cut into pieces with no more than 50 vertices each.
Steps:-
------
1)Compile the PL/pgsql procedure of Markus Schaber. in the PostGres.
2)If successful,you would find _splitpolymaxvertex(geometry, integer) function in the functions list of your PostGIS database.
3)Use the following command to Split a Polygon into pieces based on suitable vertex count .
CREATE TABLE PolygonsAfterSplit WITH(OIDS=TRUE) AS ( SELECT splitpolymaxvertex(the_geom,50) FROM PolygonsBeforeSplit);
(Use Tables appropriate table names.)
4)Use QuantumGIS or JUMP to render the polygons.Thesetools have the ability to connect to PostGIS .
Sample Output:-
Polygon Before Splitting

Polygon After Splitting
No comments:
Post a Comment