<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2900.2180" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Thanks for answering :)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> Yes, it works well ( option
without st_functions). But now i´ve got another question. I can make St_buffers
but not St_xmin... Is it posible? And another one, thought is a typical
question, how can i upgrade to St_functions ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Gus</FONT></DIV>
<BLOCKQUOTE
style="PADDING-RIGHT: 0px; PADDING-LEFT: 5px; MARGIN-LEFT: 5px; BORDER-LEFT: #000000 2px solid; MARGIN-RIGHT: 0px">
<DIV style="FONT: 10pt arial">----- Original Message ----- </DIV>
<DIV
style="BACKGROUND: #e4e4e4; FONT: 10pt arial; font-color: black"><B>From:</B>
<A title=robe.dnd@cityofboston.gov
href="mailto:robe.dnd@cityofboston.gov">Obe, Regina</A> </DIV>
<DIV style="FONT: 10pt arial"><B>To:</B> <A
title=postgis-users@postgis.refractions.net
href="mailto:postgis-users@postgis.refractions.net">PostGIS Users
Discussion</A> </DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Tuesday, October 02, 2007 4:21
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> RE: [postgis-users] Re: From
box2d to bbox</DIV>
<DIV><BR></DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
color=#0000ff size=2>It applies to box2d as well as all postgis geometries
because the postgis geometries have auto casters that will cast them to bbox
when using bbox functions. So you actually don't even need to get
the bbox to use those functions.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
color=#0000ff size=2>Simply doing this should work</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
color=#0000ff size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2>UPDATE Mytable SET gbbox = st_xmin(the_geom) || ',' ||
st_ymin(the_geom) || ',' || st_xmax(the_geom) || ',' ||
st_ymax(the_geom)</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2>--------------------------------------------------------------------------------------------------------------------</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2>Now it just occurred to me that if you don't have the st_ versions of
these functions, then you do need the BBOX. So you would need to
do</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2>UPDATE Mytable SET gbbox = xmin(BOX2D(the_geom)) || ',' ||
ymin(BOX2D(the_geom)) || ',' || xmax(BOX2D(the_geom)) || ',' ||
ymax(BOX2D(the_geom))</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2>The reason for that is that for some reason there is an xmax for box2d
and one for box3d so what happens is that when applied to a geometry there is
abiguity as to what the geometry should be cast to because the geom can
be cast to the box2d or box3d so can use either function.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2>Hope that helps,</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2>Regina</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=524300714-02102007><FONT face=Arial
size=2></FONT></SPAN> </DIV>
<DIV class=OutlookMessageHeader lang=en-us dir=ltr align=left>
<HR tabIndex=-1>
<FONT face=Tahoma size=2><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of
</B>Gustavo Ces<BR><B>Sent:</B> Tuesday, October 02, 2007 9:56
AM<BR><B>To:</B> PostGIS Users Discussion<BR><B>Subject:</B> Re:
[postgis-users] Re: From box2d to bbox<BR></FONT><BR></DIV>
<DIV></DIV>
<DIV><FONT face=Arial size=2>Hi Regina,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2> What i was tried
is</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>update Mytable set
caja1=boundary(setsrid(box2d(the_geom),23029))<BR>update Mytable set
gbbox=x(pointN(caja1,1))||','||y(pointN(caja1,1))||','||x(pointN(caja1,3))||','||y(pointN(caja1,3))</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Geoserver needs a parameter:
bbox=xmin,ymin,xmax,ymax </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I don´t find the xmax function applied to a box2d
( only to box3d) and , is it.... i´ve just have read your last message!
:)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Gus</FONT></DIV>
<DIV><FONT face=Arial size=2> </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<P>
<HR SIZE=1>
<P></P>
<P><STRONG>The substance of this message, including any attachments, may be
confidential, legally privileged and/or exempt from disclosure pursuant to
Massachusetts law. It is intended solely for the addressee. If you received
this in error, please contact the sender and delete the material from any
computer. </STRONG></P>
<P>
<HR>
<P></P>_______________________________________________<BR>postgis-users
mailing
list<BR>postgis-users@postgis.refractions.net<BR>http://postgis.refractions.net/mailman/listinfo/postgis-users<BR></BLOCKQUOTE></BODY></HTML>