From: Regina Obe Date: Tue, 12 May 2015 21:07:32 +0000 (+0000) Subject: Figures for new ST_Subdivide function X-Git-Tag: 2.2.0rc1~516 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e93e539df94119c07fcf6d56f6dc2160e6bac841;p=postgis Figures for new ST_Subdivide function git-svn-id: http://svn.osgeo.org/postgis/trunk@13491 b70326c6-7e19-0410-871a-916f4a2858ee --- diff --git a/doc/html/image_src/Makefile.in b/doc/html/image_src/Makefile.in index 60b998376..27002c8c4 100644 --- a/doc/html/image_src/Makefile.in +++ b/doc/html/image_src/Makefile.in @@ -113,6 +113,8 @@ IMAGES= \ ../images/st_split03.png \ ../images/st_split04.png \ ../images/st_straightskeleton01.png \ + ../images/st_subdivide01.png \ + ../images/st_subdivide02.png \ ../images/st_symdifference01.png \ ../images/st_symdifference02.png \ ../images/st_tesselate03.png \ diff --git a/doc/html/image_src/st_subdivide01.wkt b/doc/html/image_src/st_subdivide01.wkt new file mode 100644 index 000000000..6b23d5693 --- /dev/null +++ b/doc/html/image_src/st_subdivide01.wkt @@ -0,0 +1,4 @@ +Style1;POLYGON((22 64,29.3913043478263 98.000000000001,106.000000000001 98.000000000001,106.000000000001 27.5882352941173,85 35,68 29,66 28,49 42,32 56,22 64)) +Style2;POLYGON((29.3913043478263 98.000000000001,32 110,40 119,36 150,57 158,75 171,92 182,106.000000000001 183.272727272727,106.000000000001 98.000000000001,29.3913043478263 98.000000000001)) +Style3;POLYGON((106.000000000001 27.5882352941173,106.000000000001 98.000000000001,189.52380952381 98.000000000001,185 79,186 56,186 52,178 34,168 18,147 13,132 10,119 23,106.000000000001 27.5882352941173)) +Style4;POLYGON((106.000000000001 98.000000000001,106.000000000001 183.272727272727,114 184,132 186,146 178,176 184,179 162,184 141,190 122,190 100,189.52380952381 98.000000000001,106.000000000001 98.000000000001)) diff --git a/doc/html/image_src/st_subdivide02.wkt b/doc/html/image_src/st_subdivide02.wkt new file mode 100644 index 000000000..d8649d864 --- /dev/null +++ b/doc/html/image_src/st_subdivide02.wkt @@ -0,0 +1,3 @@ +Style1;LINESTRING(0 0,35.3553390593274 35.3553390593274,70.7106781186547 70.7106781186547,75.000000000001 75.000000000001) +Style2;LINESTRING(75.000000000001 75.000000000001,100 100,135.355339059327 135.355339059327,150 150) + diff --git a/doc/reference_processing.xml b/doc/reference_processing.xml index c1a545ee9..412eeda48 100644 --- a/doc/reference_processing.xml +++ b/doc/reference_processing.xml @@ -3146,20 +3146,65 @@ maximum vertex count. Examples - --- Subdivide a geometry until it all parts have < 50 vertices -SELECT ST_AsText(ST_SubDivide(ST_Segmentize('LINESTRING(0 0, 100 100)'::geometry, 1),50)); - --- Create a new subdivided table suitable for joining to the original + -- Create a new subdivided table suitable for joining to the original CREATE TABLE subdivided_geoms AS SELECT pkey, ST_Subdivide(geom) AS geom FROM original_geoms; + + + + + + + + + + + Subdivide max 10 vertices + + + SELECT row_number() OVER() As rn, ST_AsText(geom) As wkt +FROM ( SELECT ST_SubDivide('POLYGON((132 10,119 23,85 35,68 29,66 28,49 42,32 56,22 64,32 110,40 119,36 150, +57 158,75 171,92 182,114 184,132 186,146 178,176 184,179 162,184 141,190 122, +190 100,185 79,186 56,186 52,178 34,168 18,147 13,132 10))'::geometry,10)) As f(geom); +rn | wkt +---+--------------------------------------------------------------------------- + 1 | POLYGON((22 64,29.3913043478263 98.000000000001,106.000000000001 98.00000000001, + 106.000000000001 27.5882352941173,85 35,68 29,66 28,49 42,32 56,22 64)) + 2 | POLYGON((29.3913043478263 98.000000000001,32 110,40 119,36 150,57 158, + 75 11,92 182,106.000000000001 183.272727272727,106.000000000001 98.000000000001, + 29.913043478263 98.000000000001)) + 3 | POLYGON((106.000000000001 27.5882352941173,106.000000000001 98.00000000000, + 189.52380952381 98.000000000001,185 79,186 56,186 52,178 34,168 18,147 13, + 132 0,119 23,106.000000000001 27.5882352941173)) + 4 | POLYGON((106.000000000001 98.000000000001,106.000000000001 183.27272727272, + 114 184,132 186,146 178,176 184,179 162,184 141,190 122,190 100,189.5238095238 + 98.000000000001,106.000000000001 98.000000000001)) + + + + + + + + + + Useful in conjunction with ST_Segmentize to create additional vertices that can then be used for splitting + + + SELECT ST_AsText(ST_SubDivide(ST_Segmentize('LINESTRING(0 0, 100 100, 150 150)'::geometry,50),4)); +LINESTRING(0 0,35.3553390593274 35.3553390593274,70.7106781186547 70.7106781186547,75.000000000001 75.000000000001) +LINESTRING(75.000000000001 75.000000000001,100 100,135.355339059327 135.355339059327,150 150) + + + + See Also -, +, ,