[postgis-users] building a polygon with variables
Mike Toews
mwtoews at gmail.com
Tue May 8 15:15:33 PDT 2012
On 9 May 2012 02:26, Gold, Jack L (US SSA) <jack.gold at baesystems.com> wrote:
> I want to be able to replace l, b, r, and t with variable values in a
> plpgsql function like so:
It looks like you want to make a polygon from 'left', 'bottom',
'right' and 'top'. Rather than formatting WKT, you could use a
geometry constructor function:
SELECT ST_MakeEnvelope(l, b, r, t, 4326);
http://postgis.refractions.net/docs/ST_MakeEnvelope.html
-Mike
More information about the postgis-users
mailing list