<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:st1="urn:schemas-microsoft-com:office:smarttags" xmlns="http://www.w3.org/TR/REC-html40">

<head>
<meta http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<meta name=Generator content="Microsoft Word 11 (filtered medium)">
<!--[if !mso]>
<style>
v\:* {behavior:url(#default#VML);}
o\:* {behavior:url(#default#VML);}
w\:* {behavior:url(#default#VML);}
.shape {behavior:url(#default#VML);}
</style>
<![endif]--><o:SmartTagType
 namespaceuri="urn:schemas-microsoft-com:office:smarttags" name="PersonName"/>
<!--[if !mso]>
<style>
st1\:*{behavior:url(#default#ieooui) }
</style>
<![endif]-->
<style>
<!--
 /* Font Definitions */
 @font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
 /* Style Definitions */
 p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman";}
a:link, span.MsoHyperlink
        {color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {color:blue;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:Arial;
        color:navy;}
@page Section1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.Section1
        {page:Section1;}
-->
</style>
<!--[if gte mso 9]><xml>
 <o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
 <o:shapelayout v:ext="edit">
  <o:idmap v:ext="edit" data="1" />
 </o:shapelayout></xml><![endif]-->
</head>

<body lang=EN-US link=blue vlink=blue>

<div class=Section1>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>This is what I have come up with.  It
seems to work.  I am trying to get the extent of the selected geometries.  Not
each individual extent.  Below is what best achieved it.  Thanks for the input,
it got me working in the right direction.<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>SELECT AsText(box2d(GeomUnion(the_geom)))<o:p></o:p></span></font></p>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>From trails_02a<o:p></o:p></span></font></p>

<div>

<p class=MsoNormal><font size=2 color=navy face=Arial><span style='font-size:
10.0pt;font-family:Arial;color:navy'>WHERE objectid = 1 OR objectid = 2 OR
objectid = 3;</span></font><o:p></o:p></p>

<div class=MsoNormal align=center style='text-align:center'><font size=3
face="Times New Roman"><span style='font-size:12.0pt'>

<hr size=2 width="100%" align=center tabindex=-1>

</span></font></div>

<p class=MsoNormal><b><font size=2 face=Tahoma><span style='font-size:10.0pt;
font-family:Tahoma;font-weight:bold'>From:</span></font></b><font size=2
face=Tahoma><span style='font-size:10.0pt;font-family:Tahoma'> postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <b><span
style='font-weight:bold'>On Behalf Of </span></b>René F. Viancos S.<br>
<b><span style='font-weight:bold'>Sent:</span></b> Saturday, October 15, 2005
7:46 AM<br>
<b><span style='font-weight:bold'>To:</span></b> <st1:PersonName w:st="on">PostGIS
 Users Discussion</st1:PersonName><br>
<b><span style='font-weight:bold'>Subject:</span></b> Re: [postgis-users]
Extents</span></font><o:p></o:p></p>

</div>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'><o:p> </o:p></span></font></p>

<p class=MsoNormal><font size=3 face="Times New Roman"><span style='font-size:
12.0pt'>Try SELECT BOUNDARY(the_geom) From trails_02a WHERE objectid = 1 OR
objectid = 2 OR objectid = 3;<br>
<br>
Then AND condition makes always false the Query and never returns any
recordset. Does not exists an element that has tree objectid in the same time.
Think the AND operator like Intersection of elements and OR operator like the
union of elements. Sorry, i dont see this before.<br>
<br>
Regards<br>
<br>
<br>
-- <br>
René F. Viáncos S.<br>
Director de Geomática y TIC<br>
Vicerrectoría de Investigación y Desarrollo<br>
Universidad de Chile<br>
Tel (56-2) 632 51 15<br>
Cel (56 9) 933 72 66<br>
<a href="mailto:rviancos@uchile.cl">rviancos@uchile.cl</a><br>
<a href="mailto:rviancos@gmail.com">rviancos@gmail.com</a><br>
<a href="http://www.investigacion.uchile.cl">www.investigacion.uchile.cl</a> <o:p></o:p></span></font></p>

</div>

</body>

</html>