<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
  <head>
    <meta content="text/html; charset=ISO-8859-1"
      http-equiv="Content-Type">
  </head>
  <body bgcolor="#ffffff" text="#000000">
    Steve,<br>
    <br>
    i have removed open and close clauses. After that, the drawquery
    draw the map correctly!!!!!!<br>
    Thanks a lot<br>
    <br>
    Oscar<br>
    <br>
    El 05/04/11 17:33, Lime, Steve D (DNR) escribi&oacute;:
    <blockquote
cite="mid:A7F7B3043D3BF0438F1206BAA3C9933C0831494FA0@MNMAIL05.ead.state.mn.us"
      type="cite">
      <meta http-equiv="Content-Type" content="text/html;
        charset=ISO-8859-1">
      <meta name="Generator" content="Microsoft Word 12 (filtered
        medium)">
      <style><!--
/* Font Definitions */
@font-face
        {font-family:Wingdings;
        panose-1:5 0 0 0 0 0 0 0 0 0;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@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","serif";
        color:black;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
p.MsoListParagraph, li.MsoListParagraph, div.MsoListParagraph
        {mso-style-priority:34;
        margin-top:0in;
        margin-right:0in;
        margin-bottom:0in;
        margin-left:.5in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";
        color:black;}
span.EmailStyle17
        {mso-style-type:personal;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
span.EmailStyle18
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-size:10.0pt;}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
/* List Definitions */
@list l0
        {mso-list-id:51926056;
        mso-list-type:hybrid;
        mso-list-template-ids:774831910 78663684 67698691 67698693 67698689 67698691 67698693 67698689 67698691 67698693;}
@list l0:level1
        {mso-level-number-format:bullet;
        mso-level-text:-;
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;
        font-family:"Calibri","sans-serif";
        mso-fareast-font-family:Calibri;}
@list l1
        {mso-list-id:1867910259;
        mso-list-type:hybrid;
        mso-list-template-ids:-1380834216 67698705 67698713 67698715 67698703 67698713 67698715 67698703 67698713 67698715;}
@list l1:level1
        {mso-level-text:"%1\)";
        mso-level-tab-stop:none;
        mso-level-number-position:left;
        text-indent:-.25in;}
ol
        {margin-bottom:0in;}
ul
        {margin-bottom:0in;}
--></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]-->
      <div class="WordSection1">
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31,
            73, 125);">Looks like you&#8217;re running against 5.6.6.&nbsp; You
            don&#8217;t need to open/close layers after doing a query. The
            underlying code leaves the layer open and preserves the
            result set on the database server. It may be that by calling
            close() especially you&#8217;re losing the result set in PostGIS.
            You don&#8217;t need to open/close layers anyway just to use
            getResult().<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31,
            73, 125);"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31,
            73, 125);">Try:<o:p></o:p></span></p>
        <p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span
            style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31,
            73, 125);"><span style="">-<span style="font: 7pt
                &quot;Times New Roman&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]--><span
            style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31,
            73, 125);">Calling drawQuery before your post query
            processing. If it works that tells you the problem is in
            your post-processing code.<o:p></o:p></span></p>
        <p class="MsoListParagraph" style="text-indent: -0.25in;"><!--[if !supportLists]--><span
            style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31,
            73, 125);"><span style="">-<span style="font: 7pt
                &quot;Times New Roman&quot;;">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; </span></span></span><!--[endif]--><span
            style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31,
            73, 125);">Removing the layer open/close calls from your
            post query processing.<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31,
            73, 125);"><o:p>&nbsp;</o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31,
            73, 125);">Steve<o:p></o:p></span></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;; color: rgb(31,
            73, 125);"><o:p>&nbsp;</o:p></span></p>
        <div>
          <div style="border-right: medium none; border-width: 1pt
            medium medium; border-style: solid none none; border-color:
            rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color;
            padding: 3pt 0in 0in;">
            <p class="MsoNormal"><b><span style="font-size: 10pt;
                  font-family:
                  &quot;Tahoma&quot;,&quot;sans-serif&quot;; color:
                  windowtext;">From:</span></b><span style="font-size:
                10pt; font-family:
                &quot;Tahoma&quot;,&quot;sans-serif&quot;; color:
                windowtext;"> Oscar Testa [<a class="moz-txt-link-freetext" href="mailto:otesta@gmail.com">mailto:otesta@gmail.com</a>] <br>
                <b>Sent:</b> Tuesday, April 05, 2011 2:24 PM<br>
                <b>To:</b> Lime, Steve D (DNR)<br>
                <b>Subject:</b> Re: [mapserver-users] DrawQuery problem<o:p></o:p></span></p>
          </div>
        </div>
        <p class="MsoNormal"><o:p>&nbsp;</o:p></p>
        <p class="MsoNormal">Steve,<br>
          <br>
          i send you this mail because the list reject the message, i
          don't know the reason.....<br>
          <br>
          the query returns rows, here the code:<br>
          <br>
          &nbsp; if ($x0 == $x1 || $y0 == $y1){<br>
          &nbsp;&nbsp;&nbsp;&nbsp; $my_point = ms_newPointObj();<br>
          &nbsp;&nbsp;&nbsp;&nbsp; $my_point-&gt;SetXY($x0,$y0);<br>
          &nbsp;&nbsp;&nbsp;&nbsp; $bQquery =
          @$map-&gt;queryByPoint($my_point,MS_MULTIPLE,0);<br>
          &nbsp; }<br>
          &nbsp; else{<br>
          &nbsp;&nbsp;&nbsp;&nbsp; $my_rect = ms_newRectObj();<br>
          &nbsp;&nbsp;&nbsp;&nbsp; $my_rect-&gt;setextent($x0,$y0,$x1,$y1);<br>
          &nbsp;&nbsp;&nbsp;&nbsp; $bQuery = @$map-&gt;queryByRect($my_rect);<br>
          &nbsp; }<br>
          <br>
          &nbsp; if ($bQuery == MS_SUCCESS){<br>
          &nbsp;&nbsp;&nbsp; $sQueryLayers = "layers=";<br>
          &nbsp;&nbsp;&nbsp; $sQueryId = "id=";<br>
          &nbsp;&nbsp;&nbsp; for ($i=0;$i&lt;sizeof($iLayers);$i++){<br>
          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $oLayer = $map-&gt;getLayer($iLayers[$i]);<br>
          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; if ($oLayer-&gt;status == MS_ON)<br>
          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; if ($oLayer-&gt;getNumResults() &gt; 0){<br>
          &nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $oLayer-&gt;open();<br>
          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; $bResults = true;<br>
          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; for ($j=0;$j&lt;$oLayer-&gt;getNumResults();$j++){<br>
          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $oResult = $oLayer-&gt;getResult($j);<br>
          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $sQueryId = $sQueryId .
          $oResult-&gt;shapeindex . ";";<br>
          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; }<br>
          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $oLayer-&gt;close();<br>
          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; $sQueryLayers = $sQueryLayers . $oLayer-&gt;name
          . "|"; <br>
          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; $sQueryId = substr($sQueryId,0,strlen($sQueryId) -
          1) . "|";<br>
          &nbsp;&nbsp;&nbsp; &nbsp;&nbsp;&nbsp; &nbsp; }<br>
          &nbsp;&nbsp;&nbsp;&nbsp; }<br>
          &nbsp;&nbsp;&nbsp; $sQueryLayers =
          substr($sQueryLayers,0,strlen($sQueryLayers) - 1);<br>
          &nbsp;&nbsp;&nbsp; $sQueryId = substr($sQueryId,0,strlen($sQueryId) - 1);<br>
          <br>
          The results is viewed in $sQueryId, a string with codes
          inside, printed via echo.<br>
          <br>
          When the draw method is called, or when drawQuery method is
          called without a query, the results is a valid map with no
          error messages in the debug file. When a query is performed,
          the debug file contents the next:<br>
          <br>
          [[Fri Apr&nbsp; 1 15:41:24 2011].623504 getSymbol(): Symbol
          definition error. Parsing error near (I):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].623825 getSymbol(): Symbol
          definition error. Parsing error near (II):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].624023 getSymbol(): Symbol
          definition error. Parsing error near (III):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].624231 getSymbol(): Symbol
          definition error. Parsing error near (IV):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].624407 getSymbol(): Symbol
          definition error. Parsing error near (V):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].624593 getSymbol(): Symbol
          definition error. Parsing error near (VI):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].624753 getSymbol(): Symbol
          definition error. Parsing error near (VII):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].625063 getSymbol(): Symbol
          definition error. Parsing error near (I):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].625235 getSymbol(): Symbol
          definition error. Parsing error near (II):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].625398 getSymbol(): Symbol
          definition error. Parsing error near (III):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].625559 getSymbol(): Symbol
          definition error. Parsing error near (IV):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].625755 getSymbol(): Symbol
          definition error. Parsing error near (V):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].625916 getSymbol(): Symbol
          definition error. Parsing error near (VI):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].626109 getSymbol(): Symbol
          definition error. Parsing error near (VII):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].626523 msPostGISLayerOpen called:
          the_geom from (select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo using SRID=4326 using
          UNIQUE oid<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].626554 msPostGISLayerOpen: No
          connection in pool, creating a fresh one.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].644796
          msConnPoolRegister(UNIVERSIDADES,user=postgres
          dbname=cpres_normalizada_ona password=postgres host=localhost
          port=5433,0x7f0dd44ec890)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].644912 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].644928 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].644938 msPostGISLayerGetItems
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].644948 msPostGISParseData called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].645035 msPostGISParseData:
          unique_column=oid, srid=4326, geom_column_name=the_geom,
          table_name=(select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].645054 msPostGISLayerGetItems
          executing SQL: select * from (select distinct ua.oid as oid,
          ua.the_geom as the_geom, ua.id_region from unidades_academicas
          as ua, instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo where false limit 0<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].695722 msPostGISLayerInitItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].695894 msPostGISLayerInitItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].695982 msPostGISLayerWhichShapes
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].696012 msPostGISParseData called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].696131 msPostGISParseData:
          unique_column=oid, srid=4326, geom_column_name=the_geom,
          table_name=(select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].696164 msPostGISBuildSQL called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].696190 msPostGISBuildSQLItems
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].696337 msPostGISBuildSQLFrom
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].696400 msPostGISBuildSQLWhere
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].696430 msPostGISBuildSQLSRID
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].696458 msPostGISBuildSQLBox called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].696661 msPostGISLayerWhichShapes
          query: select
          "oid","id_region",encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex')
          as geom,"oid" from (select distinct ua.oid as oid, ua.the_geom
          as the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo where the_geom &amp;&amp;
          GeomFromText('POLYGON((-65.3706547152291
          -31.5276277454608,-65.3706547152291
          -29.281802102631,-61.3038893619969
          -29.281802102631,-61.3038893619969
          -31.5276277454608,-65.3706547152291 -31.5276277454608))',4326)<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].741205 msPostGISLayerWhichShapes
          got 65 records in result.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744577 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744584 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744594 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744602 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744611 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2[Fri Apr&nbsp; 1 15:41:32 2011].665529
          getSymbol(): Symbol definition error. Parsing error near
          (I):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].665865 getSymbol(): Symbol
          definition error. Parsing error near (II):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].666045 getSymbol(): Symbol
          definition error. Parsing error near (III):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].666246 getSymbol(): Symbol
          definition error. Parsing error near (IV):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].666419 getSymbol(): Symbol
          definition error. Parsing error near (V):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].666618 getSymbol(): Symbol
          definition error. Parsing error near (VI):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].666817 getSymbol(): Symbol
          definition error. Parsing error near (VII):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].667102 getSymbol(): Symbol
          definition error. Parsing error near (I):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].667313 getSymbol(): Symbol
          definition error. Parsing error near (II):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].667479 getSymbol(): Symbol
          definition error. Parsing error near (III):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].667677 getSymbol(): Symbol
          definition error. Parsing error near (IV):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].667875 getSymbol(): Symbol
          definition error. Parsing error near (V):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].668041 getSymbol(): Symbol
          definition error. Parsing error near (VI):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].668206 getSymbol(): Symbol
          definition error. Parsing error near (VII):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].668659 msPostGISLayerOpen called:
          the_geom from (select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo using SRID=4326 using
          UNIQUE oid<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].668689 msPostGISLayerOpen: No
          connection in pool, creating a fresh one.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].685553
          msConnPoolRegister(UNIVERSIDADES,user=postgres
          dbname=cpres_normalizada_ona password=postgres host=localhost
          port=5433,0x7f0dd47a6390)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].685668 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].685685 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].685695 msPostGISLayerGetItems
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].685705 msPostGISParseData called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].685804 msPostGISParseData:
          unique_column=oid, srid=4326, geom_column_name=the_geom,
          table_name=(select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].685826 msPostGISLayerGetItems
          executing SQL: select * from (select distinct ua.oid as oid,
          ua.the_geom as the_geom, ua.id_region from unidades_academicas
          as ua, instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo where false limit 0<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].695216 msPostGISLayerInitItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].695313 msPostGISLayerInitItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].695328 msPostGISLayerWhichShapes
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].695336 msPostGISParseData called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].695362 msPostGISParseData:
          unique_column=oid, srid=4326, geom_column_name=the_geom,
          table_name=(select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].695371 msPostGISBuildSQL called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].695379 msPostGISBuildSQLItems
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].695463 msPostGISBuildSQLFrom
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].695481 msPostGISBuildSQLWhere
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].695489 msPostGISBuildSQLSRID
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].695497 msPostGISBuildSQLBox called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].695582 msPostGISLayerWhichShapes
          query: select
          "oid","id_region",encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex')
          as geom,"oid" from (select distinct ua.oid as oid, ua.the_geom
          as the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo where the_geom &amp;&amp;
          GeomFromText('POLYGON((-65.3706547152291
          -31.5276277454608,-65.3706547152291
          -29.281802102631,-61.3038893619969
          -29.281802102631,-61.3038893619969
          -31.5276277454608,-65.3706547152291 -31.5276277454608))',4326)<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].700647 msPostGISLayerWhichShapes
          got 65 records in result.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].700738 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].700749 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].700814 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].701966 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].701973 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].702003 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].702013 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].702024 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].702031 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].702041 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].702048 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].702057 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].702065 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].702075 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].710518 msPostGISLayerOpen called:
          the_geom from (select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo using SRID=4326 using
          UNIQUE oid<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].710602 msPostGISLayerOpen: Layer is
          already open!<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].710611 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].710622 msPostGISLayerGetItems
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].710631 msPostGISParseData called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].710655 msPostGISParseData:
          unique_column=oid, srid=4326, geom_column_name=the_geom,
          table_name=(select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].710667 msPostGISLayerGetItems
          executing SQL: select * from (select distinct ua.oid as oid,
          ua.the_geom as the_geom, ua.id_region from unidades_academicas
          as ua, instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo where false limit 0<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].711450 msPostGISLayerInitItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].711999 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].712015 msPostGISLayerClose called:
          the_geom from (select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo using SRID=4326 using
          UNIQUE oid<br>
          [Fri Apr&nbsp; 1 15:41:32 2011].712029
          msConnPoolRelease(UNIVERSIDADES,user=postgres
          dbname=cpres_normalizada_ona password=postgres host=localhost
          port=5433,0x7f0dd47a6390)<br>
          011].744618 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744649 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744659 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744668 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744676 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744686 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744693 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744703 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744710 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].744720 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].753407 msPostGISLayerOpen called:
          the_geom from (select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo using SRID=4326 using
          UNIQUE oid<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].753491 msPostGISLayerOpen: Layer is
          already open!<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].753501 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].753510 msPostGISLayerGetItems
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].753519 msPostGISParseData called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].753543 msPostGISParseData:
          unique_column=oid, srid=4326, geom_column_name=the_geom,
          table_name=(select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].753554 msPostGISLayerGetItems
          executing SQL: select * from (select distinct ua.oid as oid,
          ua.the_geom as the_geom, ua.id_region from unidades_academicas
          as ua, instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo where false limit 0<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].754514 msPostGISLayerInitItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].754973 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].754989 msPostGISLayerClose called:
          the_geom from (select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo using SRID=4326 using
          UNIQUE oid<br>
          [Fri Apr&nbsp; 1 15:41:24 2011].754999
          msConnPoolRelease(UNIVERSIDADES,user=postgres
          dbname=cpres_normalizada_ona password=postgres host=localhost
          port=5433,0x7f0dd44ec890)<br>
          [Fri Apr&nbsp; 1 15:41:27 2011].533502 msPostGISLayerClose called:
          the_geom from (select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo using SRID=4326 using
          UNIQUE oid<br>
          [Fri Apr&nbsp; 1 15:41:27 2011].533651 msPostGISLayerIsOpen called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].705419 getSymbol(): Symbol
          definition error. Parsing error near (I):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].705625 getSymbol(): Symbol
          definition error. Parsing error near (II):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].705784 getSymbol(): Symbol
          definition error. Parsing error near (III):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].705945 getSymbol(): Symbol
          definition error. Parsing error near (IV):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].706143 getSymbol(): Symbol
          definition error. Parsing error near (V):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].706335 getSymbol(): Symbol
          definition error. Parsing error near (VI):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].706496 getSymbol(): Symbol
          definition error. Parsing error near (VII):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].706793 getSymbol(): Symbol
          definition error. Parsing error near (I):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].706998 getSymbol(): Symbol
          definition error. Parsing error near (II):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].707195 getSymbol(): Symbol
          definition error. Parsing error near (III):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].707390 getSymbol(): Symbol
          definition error. Parsing error near (IV):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].707588 getSymbol(): Symbol
          definition error. Parsing error near (V):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].707786 getSymbol(): Symbol
          definition error. Parsing error near (VI):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].708079 getSymbol(): Symbol
          definition error. Parsing error near (VII):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].708383 msPostGISLayerOpen called:
          the_geom from (select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo using SRID=4326 using
          UNIQUE oid<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].708405
          msConnPoolRequest(UNIVERSIDADES,user=postgres
          dbname=cpres_normalizada_ona password=postgres host=localhost
          port=5433) -&gt; got 0x7f0dd44ec890<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].708416 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].708428 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].708437 msPostGISLayerGetItems
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].708445 msPostGISParseData called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].708470 msPostGISParseData:
          unique_column=oid, srid=4326, geom_column_name=the_geom,
          table_name=(select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].708480 msPostGISLayerGetItems
          executing SQL: select * from (select distinct ua.oid as oid,
          ua.the_geom as the_geom, ua.id_region from unidades_academicas
          as ua, instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo where false limit 0<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].709704 msPostGISLayerInitItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].709800 msPostGISLayerInitItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].709810 msPostGISLayerWhichShapes
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].709818 msPostGISParseData called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].709841 msPostGISParseData:
          unique_column=oid, srid=4326, geom_column_name=the_geom,
          table_name=(select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].709850 msPostGISBuildSQL called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].709857 msPostGISBuildSQLItems
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].709869 msPostGISBuildSQLFrom
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].709877 msPostGISBuildSQLWhere
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].709885 msPostGISBuildSQLSRID
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].709893 msPostGISBuildSQLBox called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].709930 msPostGISLayerWhichShapes
          query: select
          "oid","id_region",encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex')
          as geom,"oid" from (select distinct ua.oid as oid, ua.the_geom
          as the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo where the_geom &amp;&amp;
          GeomFromText('POLYGON((-65.3706547152291
          -31.5276277454608,-65.3706547152291
          -29.281802102631,-61.3038893619969
          -29.281802102631,-61.3038893619969
          -31.5276277454608,-65.3706547152291 -31.5276277454608))',4326)<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].713230 msPostGISLayerWhichShapes
          got 65 records in result.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].713309 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].713318 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].713347 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].713355 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].714555 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].714563 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].714572 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].714579 msPostGISReadShape called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].714589 msPostGISLayerNextShape
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].722279 msPostGISLayerOpen called:
          the_geom from (select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo using SRID=4326 using
          UNIQUE oid<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].722329 msPostGISLayerOpen: Layer is
          already open!<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].722337 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].722687 msPostGISLayerGetItems
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].722695 msPostGISParseData called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].722720 msPostGISParseData:
          unique_column=oid, srid=4326, geom_column_name=the_geom,
          table_name=(select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].722872 msPostGISLayerGetItems
          executing SQL: select * from (select distinct ua.oid as oid,
          ua.the_geom as the_geom, ua.id_region from unidades_academicas
          as ua, instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo where false limit 0<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].723841 msPostGISLayerInitItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].724345 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].724362 msPostGISLayerClose called:
          the_geom from (select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo using SRID=4326 using
          UNIQUE oid<br>
          [Fri Apr&nbsp; 1 15:41:35 2011].724373
          msConnPoolRelease(UNIVERSIDADES,user=postgres
          dbname=cpres_normalizada_ona password=postgres host=localhost
          port=5433,0x7f0dd44ec890)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].807683 getSymbol(): Symbol
          definition error. Parsing error near (I):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].808046 getSymbol(): Symbol
          definition error. Parsing error near (II):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].808257 getSymbol(): Symbol
          definition error. Parsing error near (III):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].808455 getSymbol(): Symbol
          definition error. Parsing error near (IV):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].808660 getSymbol(): Symbol
          definition error. Parsing error near (V):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].808825 getSymbol(): Symbol
          definition error. Parsing error near (VI):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].809022 getSymbol(): Symbol
          definition error. Parsing error near (VII):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].809341 getSymbol(): Symbol
          definition error. Parsing error near (I):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].809556 getSymbol(): Symbol
          definition error. Parsing error near (II):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].809722 getSymbol(): Symbol
          definition error. Parsing error near (III):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].809885 getSymbol(): Symbol
          definition error. Parsing error near (IV):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].810060 getSymbol(): Symbol
          definition error. Parsing error near (V):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].810225 getSymbol(): Symbol
          definition error. Parsing error near (VI):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].810387 getSymbol(): Symbol
          definition error. Parsing error near (VII):(line 181)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].810839 msPostGISLayerOpen called:
          the_geom from (select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo using SRID=4326 using
          UNIQUE oid<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].810873 msPostGISLayerOpen: No
          connection in pool, creating a fresh one.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].827248
          msConnPoolRegister(UNIVERSIDADES,user=postgres
          dbname=cpres_normalizada_ona password=postgres host=localhost
          port=5433,0x7f0dd47a64d0)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].827359 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].827374 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].827384 msPostGISLayerGetItems
          called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].827395 msPostGISParseData called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].827482 msPostGISParseData:
          unique_column=oid, srid=4326, geom_column_name=the_geom,
          table_name=(select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].827501 msPostGISLayerGetItems
          executing SQL: select * from (select distinct ua.oid as oid,
          ua.the_geom as the_geom, ua.id_region from unidades_academicas
          as ua, instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo where false limit 0<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].836692 msPostGISLayerInitItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].836786 msPostGISLayerInitItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].836801 msPostGISLayerWhichShapes
          called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].836809 msPostGISParseData called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].836834 msPostGISParseData:
          unique_column=oid, srid=4326, geom_column_name=the_geom,
          table_name=(select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].836843 msPostGISBuildSQL called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].836851 msPostGISBuildSQLItems
          called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].836936 msPostGISBuildSQLFrom
          called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].836954 msPostGISBuildSQLWhere
          called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].836962 msPostGISBuildSQLSRID
          called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].836971 msPostGISBuildSQLBox called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].837057 msPostGISLayerWhichShapes
          query: select
          "oid","id_region",encode(AsBinary(force_collection(force_2d("the_geom")),'NDR'),'hex')
          as geom,"oid" from (select distinct ua.oid as oid, ua.the_geom
          as the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo where the_geom &amp;&amp;
          GeomFromText('POLYGON((-65.3706547152291
          -31.5276277454608,-65.3706547152291
          -29.281802102631,-61.3038893619969
          -29.281802102631,-61.3038893619969
          -31.5276277454608,-65.3706547152291 -31.5276277454608))',4326)<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].841359 msPostGISLayerWhichShapes
          got 65 records in result.<br>
          <b>[Fri Apr&nbsp; 1 15:41:38 2011].841412 msPostGISLayerNextShape
            called.<br>
            [Fri Apr&nbsp; 1 15:41:38 2011].842723 msPostGISLayerNextShape
            called.<br>
          </b>[Fri Apr&nbsp; 1 15:41:38 2011].851353 msPostGISLayerOpen
          called: the_geom from (select distinct ua.oid as oid,
          ua.the_geom as the_geom, ua.id_region from unidades_academicas
          as ua, instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo using SRID=4326 using
          UNIQUE oid<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].851438 msPostGISLayerOpen: Layer is
          already open!<br>
          <b>[Fri Apr&nbsp; 1 15:41:38 2011].851447
            msPostGISLayerFreeItemInfo called.<br>
            [Fri Apr&nbsp; 1 15:41:38 2011].851456 msPostGISLayerGetItems
            called.<br>
          </b>[Fri Apr&nbsp; 1 15:41:38 2011].851464 msPostGISParseData
          called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].851487 msPostGISParseData:
          unique_column=oid, srid=4326, geom_column_name=the_geom,
          table_name=(select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].851498 msPostGISLayerGetItems
          executing SQL: select * from (select distinct ua.oid as oid,
          ua.the_geom as the_geom, ua.id_region from unidades_academicas
          as ua, instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo where false limit 0<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].852399 msPostGISLayerInitItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].852967 msPostGISLayerFreeItemInfo
          called.<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].852983 msPostGISLayerClose called:
          the_geom from (select distinct ua.oid as oid, ua.the_geom as
          the_geom, ua.id_region from unidades_academicas as ua,
          instituciones as i&nbsp; WHERE i.univ_id = ua.univ_id AND
          i.id_tipo_institucion = 1 ) AS foo using SRID=4326 using
          UNIQUE oid<br>
          [Fri Apr&nbsp; 1 15:41:38 2011].852996
          msConnPoolRelease(UNIVERSIDADES,user=postgres
          dbname=cpres_normalizada_ona password=postgres host=localhost
          port=5433,0x7f0dd47a64d0)<br>
          <br>
          The lines in bold repets 65 times, i cut them because of the
          restrict about mail-list characters.<br>
          Any idea?<br>
          <br>
          Regards<br>
          Oscar<br>
          <br>
          El 31/03/11 19:44, Lime, Steve D (DNR) escribi&oacute;: <o:p></o:p></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;;">I guess we need
            more information. A script snippet, confirmation the query
            is returning results, error messages, etc&#8230;</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;;">&nbsp;</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;;">Steve</span><o:p></o:p></p>
        <p class="MsoNormal"><span style="font-size: 11pt; font-family:
            &quot;Calibri&quot;,&quot;sans-serif&quot;;">&nbsp;</span><o:p></o:p></p>
        <div>
          <div style="border-right: medium none; border-width: 1pt
            medium medium; border-style: solid none none; padding: 3pt
            0in 0in; border-color: -moz-use-text-color;">
            <p class="MsoNormal"><b><span style="font-size: 10pt;
                  font-family:
                  &quot;Tahoma&quot;,&quot;sans-serif&quot;; color:
                  windowtext;">From:</span></b><span style="font-size:
                10pt; font-family:
                &quot;Tahoma&quot;,&quot;sans-serif&quot;; color:
                windowtext;"> <a moz-do-not-send="true"
                  href="mailto:mapserver-users-bounces@lists.osgeo.org">mapserver-users-bounces@lists.osgeo.org</a>
                [<a moz-do-not-send="true"
                  href="mailto:mapserver-users-bounces@lists.osgeo.org">mailto:mapserver-users-bounces@lists.osgeo.org</a>]
                <b>On Behalf Of </b>Oscar Testa<br>
                <b>Sent:</b> Thursday, March 31, 2011 12:34 PM<br>
                <b>To:</b> <a moz-do-not-send="true"
                  href="mailto:mapserver-users@lists.osgeo.org">mapserver-users@lists.osgeo.org</a><br>
                <b>Subject:</b> [mapserver-users] DrawQuery problem</span><o:p></o:p></p>
          </div>
        </div>
        <p class="MsoNormal">&nbsp;<o:p></o:p></p>
        <p class="MsoNormal" style="margin-bottom: 12pt;"><br>
          Hello,<br>
          <br>
          i'am using mapserver in ubuntu Maverick (10.10). Php version
          is 5-3-3-1 ubuntu 9.3. <br>
          Mapscript description:<o:p></o:p></p>
        <table class="MsoNormalTable" style="width: 6.25in;" border="0"
          cellpadding="0" width="600">
          <tbody>
            <tr>
              <td style="padding: 2.25pt;">
                <p class="MsoNormal">MapServer Version <o:p></o:p></p>
              </td>
              <td style="padding: 2.25pt;">
                <p class="MsoNormal">MapServer version 5.6.6 OUTPUT=GIF
                  OUTPUT=PNG OUTPUT=JPEG OUTPUT=WBMP OUTPUT=SWF
                  OUTPUT=SVG SUPPORTS=PROJ SUPPORTS=AGG
                  SUPPORTS=FREETYPE SUPPORTS=ICONV SUPPORTS=FRIBIDI
                  SUPPORTS=WMS_SERVER SUPPORTS=WMS_CLIENT
                  SUPPORTS=WFS_SERVER SUPPORTS=WFS_CLIENT
                  SUPPORTS=WCS_SERVER SUPPORTS=SOS_SERVER
                  SUPPORTS=FASTCGI SUPPORTS=THREADS SUPPORTS=GEOS
                  SUPPORTS=RGBA_PNG INPUT=EPPL7 INPUT=POSTGIS INPUT=OGR
                  INPUT=GDAL INPUT=SHAPEFILE <o:p></o:p></p>
              </td>
            </tr>
            <tr>
              <td style="padding: 2.25pt;">
                <p class="MsoNormal">PHP MapScript Version <o:p></o:p></p>
              </td>
              <td style="padding: 2.25pt;">
                <p class="MsoNormal">($Revision: 10204 $ $Date:
                  2010-06-02 06:57:48 -0700 (Wed, 02 Jun 2010) $) <o:p></o:p></p>
              </td>
            </tr>
          </tbody>
        </table>
        <p class="MsoNormal" style="margin-bottom: 12pt;"><br>
          I have a project in php, with connection to postgis. When
          map-&gt;draw is called the image is generated correctly.<br>
          When i do a querybyrect query to the map, the drawquery
          doesn't draw the image. <br>
          If necesary i have debug information, and error log.<br>
          <br>
          Please help, i can't find the problem!!!!!<br>
          <br>
          Regards<br>
          Oscar<o:p></o:p></p>
      </div>
    </blockquote>
  </body>
</html>