[postgis-tickets] r14502 - #3399, tests for ST_GeneratePoints

Paul Ramsey pramsey at cleverelephant.ca
Fri Dec 18 05:28:20 PST 2015


Author: pramsey
Date: 2015-12-18 05:28:20 -0800 (Fri, 18 Dec 2015)
New Revision: 14502

Modified:
   trunk/regress/tickets.sql
   trunk/regress/tickets_expected
Log:
#3399, tests for ST_GeneratePoints


Modified: trunk/regress/tickets.sql
===================================================================
--- trunk/regress/tickets.sql	2015-12-18 12:06:42 UTC (rev 14501)
+++ trunk/regress/tickets.sql	2015-12-18 13:28:20 UTC (rev 14502)
@@ -911,6 +911,21 @@
 
 SELECT '#3375', ST_AsText(ST_RemoveRepeatedPoints('GEOMETRYCOLLECTION(POINT(0 -7))'::geometry, 1000));
 
+-- #3399
+WITH g as (
+select 'POLYGON((1 0, 0 1, 1 2, 2 1, 1 0))'::geometry as geom
+),
+n as (
+select n from unnest(ARRAY[-1,0,1,10,100,1000]) n
+),
+pts as (
+  select n,(st_dump(st_generatepoints(geom, n))).geom from g,n 
+)
+select '#3399' as t, n, count(*) from
+g, pts
+where st_contains(g.geom, pts.geom)
+group by n;
 
+
 -- Clean up
 DELETE FROM spatial_ref_sys;

Modified: trunk/regress/tickets_expected
===================================================================
--- trunk/regress/tickets_expected	2015-12-18 12:06:42 UTC (rev 14501)
+++ trunk/regress/tickets_expected	2015-12-18 13:28:20 UTC (rev 14502)
@@ -278,3 +278,7 @@
 #3367|POLYGON EMPTY
 #3368|\x660001011fb98788d35ed6fbcdc831c580012b959f01469d8d0e9305ff8618ed08b1b607e302a614fe70bc4682b303b4379ab503a228eeb603e2138eb802900cc0b802ba04dab802b801a8840cb0229cca06f401c216f403a016ea05d0c301a8b301cc189226ac15ee27f811a029b40eac2ae00a902b8407c82b9e03d0e305801dfad3239504ce7e8d01e2f701f6019b04d1e2279bf901ff01
 #3375|GEOMETRYCOLLECTION(POINT(0 -7))
+#3399|1|1
+#3399|10|10
+#3399|1000|1000
+#3399|100|100



More information about the postgis-tickets mailing list