Arrgh - tripped up by a simple typo. Thanks for pointing it out Mike. --john
On Oct 1, 2013, at 4:02 PM, Mike Toews <[email protected]> wrote: > On 2 October 2013 10:43, John Cartwright <[email protected]> > wrote: >> select name, ST_AsText(a.geom) as geom from cities a where a.geom && >> ST_GeomFromText('POLYGON((-107 39, -102 39, -102 42, -17 42, -107 39))', >> 4326); > > This geometry is not the geometry that you think it is... > > postgis=# SELECT v.valid, v.reason, ST_AsText(v.location) > postgis-# FROM ST_IsValidDetail( > postgis(# ST_GeomFromText('POLYGON((-107 39, -102 39, -102 42, -17 > 42, -107 39))', 4326)) AS v; > valid | reason | st_astext > -------+-------------------+------------------------------ > f | Self-intersection | POINT(-102 39.1666666666667) > (1 row) > > > Try 'POLYGON((-107 39,-107 42,-102 42,-102 39,-107 39))' instead. > > -Mike > _______________________________________________ > postgis-users mailing list > [email protected] > http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list [email protected] http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users
