Hi Mike, Look at "case" in your SQL, might meet your needs & if the ST_contains()/ST_covers() function reuslt is cached in a select statement, which I think it is now, will be reasonably effective.
http://www.postgresql.org/docs/9.0/interactive/plpgsql-control-structures.html select case when ST_contains(poly, point) then point_name else 'sorry, nothing matches' end as my_name, case when ST_contains(poly, point) then point_desc else 'there is no description' end as my_desc, ... HTH, Brent Wood --- On Fri, 5/27/11, Michael Welter <m...@introspect.com> wrote: From: Michael Welter <m...@introspect.com> Subject: Re: [postgis-users] polygon of sphere To: "PostGIS Users Discussion" <postgis-users@postgis.refractions.net> Date: Friday, May 27, 2011, 7:16 AM Thanks, Paul, I have a database of country borders. If the point lies within a particular border then the query will return country-specific information. If the point doesn't lie within a border then I would like to return some default information. Mike On May 26, 2011, at 12:42 PM, Paul Ramsey wrote: > Nope, there isn't. In fact, such a thing will give us the shakes as > our code for determining in/out status of an object depends on first > being able to generate one point that is definitively outside the > containing area. Maybe there is some other way to skin your cat, what > is the higher level problem you are trying to solve? > > P. > > On Thu, May 26, 2011 at 11:05 AM, Michael Welter <m...@introspect.com> wrote: >> Hello, >> >> Using type GEOGRAPHY, is there a polygon such that ST_COVERS(Polygon,Point) >> returns true for every point? Something like -180˚ to +180˚ longitude and >> -90˚ to +90˚ latitude? >> >> Thanks, >> >> _______________________________________________ >> 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 > _______________________________________________ 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