Poorly worded error message: only calls of the form st_covers(polygon, point) are supported. st_covers(poly, poly) is not
P. On Tue, Jul 24, 2012 at 11:53 AM, DrYSG <ygutfre...@draper.com> wrote: > I am getting this error: > *"geography_covers: only POLYGON and POINT types are currently supported"* > But I can't see what is wrong. Especially, since I have an ST_Intersects > that matches this request, but does not return the error. As far as I can > tell, I am passing in Polygons (cat.gpoly) is a geography polygon. > > ST_Covers version: > > *SELECT > cat.idx,cat.size_bytes,cat.date,cat.type,cat.elevation,cat.source,cat.egpl_date,cat.classification,cat.classification_int,cat.handling,cat.originator,cat.datum,cat.product,cat.description,cat.bbox,cat.path,cat.year > FROM portal.catalog AS cat > WHERE ST_Covers(st_geogfromtext('SRID=4326;POLYGON((-70.88758389282220 > 42.50890460863670,-71.24841610717770 42.50890460863670,-71.24841610717770 > 42.22276957602410,-70.88758389282220 42.22276957602410,-70.88758389282220 > 42.50890460863670))'), cat.gpoly) AND (cat.date >= '1/1/1900 5:00:00 AM' AND > cat.date <= '7/24/2012 2:45:06 PM') LIMIT 5000;* > > ST_Intersects version: (which works fine) and has the same values: > > *SELECT > cat.idx,cat.size_bytes,cat.date,cat.type,cat.elevation,cat.source,cat.egpl_date,cat.classification,cat.classification_int,cat.handling,cat.originator,cat.datum,cat.product,cat.description,cat.bbox,cat.path,cat.year > FROM portal.catalog AS cat > WHERE ST_Intersects(st_geogfromtext('SRID=4326;POLYGON((-70.88758389282220 > 42.50890460863670,-71.24841610717770 42.50890460863670,-71.24841610717770 > 42.22276957602410,-70.88758389282220 42.22276957602410,-70.88758389282220 > 42.50890460863670))'), cat.gpoly) AND (cat.date >= '1/1/1900 5:00:00 AM' AND > cat.date <= '7/24/2012 2:45:03 PM') LIMIT 5000;* > > -- -1 row(s) affected. > > > > -- > View this message in context: > http://postgis.17.n6.nabble.com/ST-Covers-for-Geography-tp4999120.html > Sent from the PostGIS - User mailing list archive at Nabble.com. > _______________________________________________ > postgis-users mailing list > postgis-users@postgis.refractions.net > http://postgis.refractions.net/mailman/listinfo/postgis-users _______________________________________________ postgis-users mailing list postgis-users@postgis.refractions.net http://postgis.refractions.net/mailman/listinfo/postgis-users