Opened 9 years ago

Closed 9 years ago

#3491 closed defect (fixed)

ST_GeneratePoints regress needs an order by

Reported by: robe Owned by: pramsey
Priority: medium Milestone: PostGIS 2.3.0
Component: postgis Version: master
Keywords: Cc:

Description

I think the ST_GeneratePoints needs an ORDER BY clause to ensure order consistency across all platforms.

Just ran and got this:

             tickets .. failed (diff expected obtained: /projects/postgis/tmp/2.3_pg9.5w64/test_87_diff)

--- tickets_expected	2016-02-26 18:57:58 -0500
+++ /projects/postgis/tmp/2.3_pg9.5w64/test_87_out	2016-03-04 22:05:24 -0500
@@ -278,9 +278,9 @@
 #3367|POLYGON EMPTY
 #3368|\x660001011fb98788d35ed6fbcdc831c580012b959f01469d8d0e9305ff8618ed08b1b607e302a614fe70bc4682b303b4379ab503a228eeb603e2138eb802900cc0b802ba04dab802b801a8840cb0229cca06f401c216f403a016ea05d0c301a8b301cc189226ac15ee27f811a029b40eac2ae00a902b8407c82b9e03d0e305801dfad3239504ce7e8d01e2f701f6019b04d1e2279bf901ff01
 #3375|GEOMETRYCOLLECTION(POINT(0 -7))
+#3399|1000|1000
 #3399|1|1
 #3399|10|10
-#3399|1000|1000
 #3399|100|100
 ERROR:  invalid KML representation
 #3437a|5

It's quite possible I'm seeing this because I was testing my search path patch. Anyrate looking at the test, it's not deterministic.

-- #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;

Change History (1)

comment:1 by robe, 9 years ago

Resolution: fixed
Status: newclosed

I think I fixed this already when it tripped up 9.6

Note: See TracTickets for help on using tickets.