[postgis-users] ST_Covers for Geography

2012-07-24 Thread DrYSG
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


Re: [postgis-users] ST_Covers for Geography

2012-07-24 Thread Paul Ramsey
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


Re: [postgis-users] ST_Covers for Geography

2012-07-24 Thread DrYSG
Is there anything that does a st_x(geog,geog) [Both simple rectangle
polygons] that is similar to a st_covers, or st_within?





--
View this message in context: 
http://postgis.17.n6.nabble.com/ST-Covers-for-Geography-tp4999120p4999122.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


Re: [postgis-users] ST_Covers for Geography

2012-07-24 Thread GregoryKramdia
Try out ST_CoveredBy, I think that's what you're looking for.



--
View this message in context: 
http://postgis.17.n6.nabble.com/ST-Covers-for-Geography-tp4999120p4999123.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


Re: [postgis-users] ST_Covers for Geography

2012-07-24 Thread DrYSG
I was getting the same error with ST_CoveredBy. Is that expected?

Is this something expected?

I saw some chatter in the dev logs that this might be added in version 2.1,
is there a chance for that?

Here is what I see in the trunk:

-- Only implemented for polygon-over-point
668 -- Availability: 1.5.0
669 CREATE OR REPLACE FUNCTION ST_CoveredBy(geography, geography)
670 RETURNS boolean
671 AS 'SELECT $1  $2 AND _ST_Covers($2, $1)'
672 LANGUAGE 'sql' IMMUTABLE ;



--
View this message in context: 
http://postgis.17.n6.nabble.com/ST-Covers-for-Geography-tp4999120p4999124.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


Re: [postgis-users] ST_Covers for Geography

2012-07-24 Thread DrYSG
I think this is my answer to ST_Covers and ST_CoveredBy:

http://trac.osgeo.org/postgis/ticket/524





--
View this message in context: 
http://postgis.17.n6.nabble.com/ST-Covers-for-Geography-tp4999120p4999125.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