[postgis-tickets] r14718 - Redo ST_ClusterKMeans parcel table with only 7 parcels (12 seems to kill our image renderer so only paints 80% of the picture)

Regina Obe lr at pcorp.us
Sat Feb 27 22:39:02 PST 2016


Author: robe
Date: 2016-02-27 22:39:01 -0800 (Sat, 27 Feb 2016)
New Revision: 14718

Modified:
   trunk/doc/html/image_src/st_clusterkmeans01.wkt
   trunk/doc/html/image_src/st_clusterkmeans02.wkt
   trunk/doc/reference_measure.xml
Log:
Redo ST_ClusterKMeans parcel table with only 7 parcels (12 seems to kill our image renderer so only paints 80% of the picture)

Modified: trunk/doc/html/image_src/st_clusterkmeans01.wkt
===================================================================
--- trunk/doc/html/image_src/st_clusterkmeans01.wkt	2016-02-28 02:55:36 UTC (rev 14717)
+++ trunk/doc/html/image_src/st_clusterkmeans01.wkt	2016-02-28 06:39:01 UTC (rev 14718)
@@ -1,13 +1,8 @@
-Style2-thinline;POLYGON((10 60,10 125.783386230469,75.7833862304688 125.783386230469,75.7833862304688 60,50 60,10 60))
-Style2-thinline;POLYGON((75.7833862304688 60,75.7833862304688 92.8916931152344,108.675079345703 92.8916931152344,108.675079345703 61.6355782426027,105.60746371632 60.7300815406388,98 60,75.7833862304688 60))
-Style2-thinline;POLYGON((108.675079345703 61.6355782426027,108.675079345703 76.4458465576172,130.257366799736 76.4458465576172,125.713274243959 71.1560330280473,119.721714690708 66.4118010173891,112.937223991122 62.8936752097563,108.675079345703 61.6355782426027))
-Style2-thinline;POLYGON((108.675079345703 76.4458465576172,108.675079345703 92.8916931152344,125.12092590332 92.8916931152344,125.12092590332 76.4458465576172,108.675079345703 76.4458465576172))
-Style2-thinline;POLYGON((125.12092590332 76.4458465576172,125.12092590332 84.6687698364258,134.845007596642 84.6687698364258,134.479663763751 83.5916444552268,130.693186299402 76.9531874309565,130.257366799736 76.4458465576172,125.12092590332 76.4458465576172))
-Style2-thinline;POLYGON((125.12092590332 84.6687698364258,125.12092590332 92.8916931152344,137.216018090238 92.8916931152344,136.934484771969 90.829073354271,134.845007596642 84.6687698364258,125.12092590332 84.6687698364258))
-Style2-thinline;POLYGON((75.7833862304688 92.8916931152344,75.7833862304688 125.783386230469,139.063322659449 125.783386230469,137.968038348872 98.4012784660451,137.216018090238 92.8916931152344,75.7833862304688 92.8916931152344))
-Style2-thinline;POLYGON((10 125.783386230469,10 140,42.8916931152344 140,42.8916931152344 125.783386230469,10 125.783386230469))
-Style2-thinline;POLYGON((42.8916931152344 125.783386230469,42.8916931152344 140,59.5680127897702 140,59.6571821012937 142.229232788086,75.7833862304688 142.229232788086,75.7833862304688 125.783386230469,42.8916931152344 125.783386230469))
-Style2-thinline;POLYGON((59.6571821012937 142.229232788086,60.0319616511284 151.598721533955,60.3150159635984 158.675079345703,75.7833862304688 158.675079345703,75.7833862304688 142.229232788086,59.6571821012937 142.229232788086))
-Style2-thinline;POLYGON((60.3150159635984 158.675079345703,61.6306831850833 191.566759882826,75.7833862304688 191.000651761011,75.7833862304688 158.675079345703,60.3150159635984 158.675079345703))
-Style2-thinline;POLYGON((75.7833862304688 125.783386230469,75.7833862304688 191.000651761011,141.566759882826 188.369316814917,139.063322659449 125.783386230469,75.7833862304688 125.783386230469))
+Style2-thinline;POLYGON((0 60,0 112.262823104858,69.9840240478516 112.262823104858,69.9840240478516 35.2699669619124,32.8889744907202 60,0 60))
+Style2-thinline;POLYGON((69.9840240478516 35.2699669619124,69.9840240478516 73.3964014053345,127.637811131417 73.3964014053345,125.713274243959 71.1560330280473,119.721714690708 66.4118010173891,112.937223991122 62.8936752097563,105.60746371632 60.7300815406388,98 60,88.0740170061865 60,71.0940039245046 34.5299803774771,69.9840240478516 35.2699669619124))
+Style2-thinline;POLYGON((69.9840240478516 73.3964014053345,69.9840240478516 112.262823104858,138.522500134424 112.262823104858,137.968038348872 98.4012784660451,136.934484771969 90.829073354271,134.479663763751 83.5916444552268,130.693186299402 76.9531874309565,127.637811131417 73.3964014053345,69.9840240478516 73.3964014053345))
+Style2-thinline;POLYGON((0 112.262823104858,0 140,45.2593163271468 140,66.7179882264863 172.188007849009,69.9840240478516 176.163370657516,69.9840240478516 112.262823104858,0 112.262823104858))
+Style2-thinline;POLYGON((69.9840240478516 112.262823104858,69.9840240478516 151.129244804382,139.80478252734 151.129244804382,139.968038348872 148.401278466045,138.522500134424 112.262823104858,69.9840240478516 112.262823104858))
+Style2-thinline;POLYGON((69.9840240478516 151.129244804382,69.9840240478516 176.163370657516,71.7754637625827 178.343880365658,77.9526212087179 183.375336529146,85.0044095429824 187.08277587837,92.6510806850222 189.319122382143,100.589287246674 189.99565902121,104.976036071777 189.491234771783,104.976036071777 151.129244804382,69.9840240478516 151.129244804382))
+Style2-thinline;POLYGON((104.976036071777 151.129244804382,104.976036071777 189.491234771783,108.50411647931 189.085547238159,116.081583025004 186.624891636835,123.021084877624 182.711307694087,129.047328419456 177.500049303452,133.921249461013 171.19784977312,137.44949704073 164.054720608975,139.492103757341 156.354033429203,139.80478252734 151.129244804382,104.976036071777 151.129244804382))
 

Modified: trunk/doc/html/image_src/st_clusterkmeans02.wkt
===================================================================
--- trunk/doc/html/image_src/st_clusterkmeans02.wkt	2016-02-28 02:55:36 UTC (rev 14717)
+++ trunk/doc/html/image_src/st_clusterkmeans02.wkt	2016-02-28 06:39:01 UTC (rev 14718)
@@ -1,12 +1,7 @@
-Style1;POLYGON((10 60,10 125.783386230469,75.7833862304688 125.783386230469,75.7833862304688 60,50 60,10 60))
-Style2;POLYGON((75.7833862304688 60,75.7833862304688 92.8916931152344,108.675079345703 92.8916931152344,108.675079345703 61.6355782426027,105.60746371632 60.7300815406388,98 60,75.7833862304688 60))
-Style2;POLYGON((108.675079345703 61.6355782426027,108.675079345703 76.4458465576172,130.257366799736 76.4458465576172,125.713274243959 71.1560330280473,119.721714690708 66.4118010173891,112.937223991122 62.8936752097563,108.675079345703 61.6355782426027))
-Style2;POLYGON((108.675079345703 76.4458465576172,108.675079345703 92.8916931152344,125.12092590332 92.8916931152344,125.12092590332 76.4458465576172,108.675079345703 76.4458465576172))
-Style2;POLYGON((125.12092590332 76.4458465576172,125.12092590332 84.6687698364258,134.845007596642 84.6687698364258,134.479663763751 83.5916444552268,130.693186299402 76.9531874309565,130.257366799736 76.4458465576172,125.12092590332 76.4458465576172))
-Style2;POLYGON((125.12092590332 84.6687698364258,125.12092590332 92.8916931152344,137.216018090238 92.8916931152344,136.934484771969 90.829073354271,134.845007596642 84.6687698364258,125.12092590332 84.6687698364258))
-Style2;POLYGON((75.7833862304688 92.8916931152344,75.7833862304688 125.783386230469,139.063322659449 125.783386230469,137.968038348872 98.4012784660451,137.216018090238 92.8916931152344,75.7833862304688 92.8916931152344))
-Style3;POLYGON((10 125.783386230469,10 140,42.8916931152344 140,42.8916931152344 125.783386230469,10 125.783386230469))
-Style3;POLYGON((42.8916931152344 125.783386230469,42.8916931152344 140,59.5680127897702 140,59.6571821012937 142.229232788086,75.7833862304688 142.229232788086,75.7833862304688 125.783386230469,42.8916931152344 125.783386230469))
-Style3;POLYGON((59.6571821012937 142.229232788086,60.0319616511284 151.598721533955,60.3150159635984 158.675079345703,75.7833862304688 158.675079345703,75.7833862304688 142.229232788086,59.6571821012937 142.229232788086))
-Style3;POLYGON((60.3150159635984 158.675079345703,61.6306831850833 191.566759882826,75.7833862304688 191.000651761011,75.7833862304688 158.675079345703,60.3150159635984 158.675079345703))
-Style4;POLYGON((75.7833862304688 125.783386230469,75.7833862304688 191.000651761011,141.566759882826 188.369316814917,139.063322659449 125.783386230469,75.7833862304688 125.783386230469))
+Style1;POLYGON((0 60,0 112.262823104858,69.9840240478516 112.262823104858,69.9840240478516 35.2699669619124,32.8889744907202 60,0 60))
+Style1;POLYGON((69.9840240478516 35.2699669619124,69.9840240478516 73.3964014053345,127.637811131417 73.3964014053345,125.713274243959 71.1560330280473,119.721714690708 66.4118010173891,112.937223991122 62.8936752097563,105.60746371632 60.7300815406388,98 60,88.0740170061865 60,71.0940039245046 34.5299803774771,69.9840240478516 35.2699669619124))
+Style2;POLYGON((69.9840240478516 73.3964014053345,69.9840240478516 112.262823104858,138.522500134424 112.262823104858,137.968038348872 98.4012784660451,136.934484771969 90.829073354271,134.479663763751 83.5916444552268,130.693186299402 76.9531874309565,127.637811131417 73.3964014053345,69.9840240478516 73.3964014053345))
+Style1;POLYGON((0 112.262823104858,0 140,45.2593163271468 140,66.7179882264863 172.188007849009,69.9840240478516 176.163370657516,69.9840240478516 112.262823104858,0 112.262823104858))
+Style2;POLYGON((69.9840240478516 112.262823104858,69.9840240478516 151.129244804382,139.80478252734 151.129244804382,139.968038348872 148.401278466045,138.522500134424 112.262823104858,69.9840240478516 112.262823104858))
+Style3;POLYGON((69.9840240478516 151.129244804382,69.9840240478516 176.163370657516,71.7754637625827 178.343880365658,77.9526212087179 183.375336529146,85.0044095429824 187.08277587837,92.6510806850222 189.319122382143,100.589287246674 189.99565902121,104.976036071777 189.491234771783,104.976036071777 151.129244804382,69.9840240478516 151.129244804382))
+Style3;POLYGON((104.976036071777 151.129244804382,104.976036071777 189.491234771783,108.50411647931 189.085547238159,116.081583025004 186.624891636835,123.021084877624 182.711307694087,129.047328419456 177.500049303452,133.921249461013 171.19784977312,137.44949704073 164.054720608975,139.492103757341 156.354033429203,139.80478252734 151.129244804382,104.976036071777 151.129244804382))

Modified: trunk/doc/reference_measure.xml
===================================================================
--- trunk/doc/reference_measure.xml	2016-02-28 02:55:36 UTC (rev 14717)
+++ trunk/doc/reference_measure.xml	2016-02-28 06:39:01 UTC (rev 14718)
@@ -1214,10 +1214,10 @@
       		<para>Generate dummy set of parcels for examples</para>
       		<programlisting>CREATE TABLE parcels AS 
 SELECT lpad((row_number() over())::text,3,'0') As parcel_id, geom, 
-	('{residential, commercial}'::text[])[1 + mod(row_number()OVER(),2)] As type
+('{residential, commercial}'::text[])[1 + mod(row_number()OVER(),2)] As type
 FROM 
-    ST_Subdivide(ST_Buffer('LINESTRING(50 100, 98 100, 100 150)'::geometry,
-    40, 'endcap=square'),8) As geom;
+    ST_Subdivide(ST_Buffer('LINESTRING(40 100, 98 100, 100 150, 60 90)'::geometry,
+    40, 'endcap=square'),12) As geom;
 </programlisting>
     
     	<informaltable>
@@ -1246,21 +1246,16 @@
 						<programlisting>SELECT ST_ClusterKMeans(geom, 5) OVER() AS cid, parcel_id, geom 
 FROM parcels;
 -- result
- cid | parcel_id |        geom
------+-----------+------------------------
-   0 | 001       | 01030000000100000006..
-   1 | 002       | 01030000000100000007..
-   1 | 003       | 01030000000100000007..
-   1 | 004       | 01030000000100000005..
-   1 | 005       | 01030000000100000007..
-   1 | 006       | 01030000000100000006..
-   1 | 007       | 01030000000100000006..
-   2 | 008       | 01030000000100000005..
-   2 | 009       | 01030000000100000007..
-   2 | 010       | 01030000000100000006..
-   2 | 011       | 01030000000100000005..
-   3 | 012       | 01030000000100000005..
-(12 rows)</programlisting>
+ cid | parcel_id |   geom
+-----+-----------+---------------
+   0 | 001       | 0103000000...
+   0 | 002       | 0103000000...
+   1 | 003       | 0103000000...
+   0 | 004       | 0103000000...
+   1 | 005       | 0103000000...
+   2 | 006       | 0103000000...
+   2 | 007       | 0103000000...
+(7 rows)</programlisting>
 					</para></entry>
 				  </row>
 			</tbody>
@@ -1273,20 +1268,14 @@
 -- result
  cid | parcel_id |    type
 -----+-----------+-------------
-   0 | 001       | commercial
-   1 | 003       | commercial
    1 | 005       | commercial
-   1 | 007       | commercial
-   2 | 009       | commercial
-   2 | 011       | commercial
-   1 | 010       | residential
-   1 | 002       | residential
-   0 | 008       | residential
-   2 | 004       | residential
-   2 | 012       | residential
+   1 | 003       | commercial
+   2 | 007       | commercial
+   0 | 001       | commercial
+   1 | 004       | residential
+   0 | 002       | residential
    2 | 006       | residential
-(12 rows)
-</programlisting>
+(7 rows)</programlisting>
 
     </refsection>
 



More information about the postgis-tickets mailing list