[postgis-devel] regress_ogc failures

Michael Fuhr mike at fuhr.org
Wed Jul 4 11:42:56 PDT 2007


On Mon, Jul 02, 2007 at 05:02:13PM -0600, Michael Fuhr wrote:
> I'm getting failures on all the systems I've tried so far: FreeBSD
> x86 32-bit, Linux x86 64-bit, and Solaris sparc 32-bit.  All of my
> systems are using GEOS 3.0.0rc4 but I haven't updated that recently.

Here are some test cases; the only differences between the queries
are the Y-arguments to st_translate.  Case 3 returns false when it
should return true.  GEOS doesn't appear to be the culprit: all
queries return true on a system with the same version of GEOS
(3.0.0rc4 SVN revision 1996) that hasn't had PostGIS updated for a
few weeks.

Wasn't the point-in-polygon code changed again recently?

/* Case 1 */
select within(st_translate(st_geomfromtext('POINT(0 0)'), 0, 16383.9999),
              st_translate(st_geomfromtext('POLYGON((-1 0,0 1,1 0,0 -1,-1 0))'), 0, 16383.9999));
 within 
--------
 t
(1 row)

/* Case 2 */
select within(st_translate(st_geomfromtext('POINT(0 0)'), 0, 16384),
              st_translate(st_geomfromtext('POLYGON((-1 0,0 1,1 0,0 -1,-1 0))'), 0, 16384));
 within 
--------
 t
(1 row)

/* Case 3 */
select within(st_translate(st_geomfromtext('POINT(0 0)'), 0, 16384.0001),
              st_translate(st_geomfromtext('POLYGON((-1 0,0 1,1 0,0 -1,-1 0))'), 0, 16384.0001));
 within 
--------
 f
(1 row)

/* Case 4 */
select within(st_translate(st_geomfromtext('POINT(0 0)'), 0, 16384.0001),
              st_translate(st_geomfromtext('POLYGON((-1 0,0 1,1 0,0 -1,-1 0))'), 0, 16384));
 within 
--------
 t
(1 row)

/* Case 5 */
select within(st_translate(st_geomfromtext('POINT(0 0)'), 0, 16384),
              st_translate(st_geomfromtext('POLYGON((-1 0,0 1,1 0,0 -1,-1 0))'), 0, 16384.0001));
 within 
--------
 t
(1 row)

-- 
Michael Fuhr



More information about the postgis-devel mailing list