<!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.6000.16674" name=GENERATOR></HEAD>
<BODY text=#000000 bgColor=#ffffff>
<DIV><FONT size=2>Hi</FONT></DIV>
<DIV><FONT size=2>postgis report "check your .map file" so I would say something 
is wrong somehow with the inner query, probably linked to bad/wrong parameters 
in the layer connection DATA string.</FONT></DIV>
<DIV><FONT size=2>if you do select the_geom, oid, id, talhao, surf from 
edit_poly directly into postgres, what do you get ?</FONT></DIV>
<DIV><FONT size=2></FONT>&nbsp;</DIV>
<DIV><FONT size=2>regards</FONT></DIV>
<DIV><FONT size=2>Oliver</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=casanovas@K2SISTEMAS.COM.BR 
  href="mailto:casanovas@K2SISTEMAS.COM.BR">Albert Casanovas</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>To:</B> <A 
  title=damien.corpataux@camptocamp.com 
  href="mailto:damien.corpataux@camptocamp.com">Damien Corpataux</A> ; <A 
  title=cartoweb-users@lists.maptools.org 
  href="mailto:cartoweb-users@lists.maptools.org">carto web</A> </DIV>
  <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, July 31, 2008 7:07 
  PM</DIV>
  <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Cartoweb-users] Geostat 
  error going from close zoom to FullExtent</DIV>
  <DIV><BR></DIV>
  <DIV><FONT face=Arial size=2>Hi Damien,</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Thanks to you. I have done the update. In this 
  project I also do have a layer for edition of Polygons from the example of 
  demoEdit and after doing your modification I got a conflict with this layer, 
  this is the message:</FONT></DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Failure&nbsp; <BR>Class : SoapFaultWrapperMessage 
  : MapServer error: Error in msDrawMap(): Failed to draw layer named 
  'EDITPOLY'.<BR>Error in prepare_database(): Error executing POSTGIS DECLARE 
  (the actual query) statement: 'DECLARE mycursor BINARY CURSOR FOR SELECT 
  asbinary(force_collection(force_2d(the_geom)),'NDR'),oid::text from (select 
  the_geom, oid, id, talhao, surf from edit_poly) as foo WHERE the_geom 
  &amp;&amp; setSRID('BOX3D(931968.170091 -2617023.93743308,1351878.170091 
  -2343764.69412691)'::BOX3D, -1 )' </FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Postgresql reports the error as 'ERROR:&nbsp; 
  cursor "mycursor" already exists<BR>'</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>More Help:</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Error with POSTGIS data variable. You specified 
  'check your .map file'.<BR>Standard ways of specifiying are : <BR>(1) 
  'geometry_column from geometry_table' <BR>(2) 'geometry_column from (sub 
  query) as foo using unique column name using SRID=srid#' </FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Make sure you put in the 'using unique&nbsp; 
  column name' and 'using SRID=#' clauses in.</FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>For more help, please see <A 
  href="http://postgis.refractions.net/documentation/">http://postgis.refractions.net/documentation/</A> 
  </FONT></DIV>
  <DIV>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2>Mappostgis.c - version of Jan 
  23/2004.</FONT></DIV>
  <DIV>&nbsp;</DIV><FONT face=Arial size=2>
  <DIV><BR>Backtrace:</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>file: 226 - 
  C:\ms4w\apps\cartoweb3\coreplugins\images\server\ServerImages.php<BR>call: 
  ServerContext-&gt;checkMsErrors()</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>file: 311 - C:\ms4w\apps\cartoweb3\server\Cartoserver.php<BR>call: 
  ServerImages-&gt;drawMainmap(Object(Images))</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>file: 349 - C:\ms4w\apps\cartoweb3\server\Cartoserver.php<BR>call: 
  Cartoserver-&gt;doGetMap(Object(MapRequest))</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>file: 370 - C:\ms4w\apps\cartoweb3\server\Cartoserver.php<BR>call: 
  Cartoserver-&gt;callWithExceptionCheck("doGetMap", Object(MapRequest))</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>file: 76 - C:\ms4w\apps\cartoweb3\server\MapResultCache.php<BR>call: 
  Cartoserver-&gt;cacheGetMap(Object(MapRequest))</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>file: 178 - C:\ms4w\apps\cartoweb3 </DIV>
  <DIV>&nbsp;</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Do you have any idea of what can be happening??</DIV>
  <DIV>&nbsp;</DIV>
  <DIV>Best Regards,</DIV>
  <DIV>Albert</DIV>
  <DIV></FONT>&nbsp;</DIV>
  <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
  <BLOCKQUOTE dir=ltr 
  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=damien.corpataux@camptocamp.com 
    href="mailto:damien.corpataux@camptocamp.com">Damien Corpataux</A> </DIV>
    <DIV style="FONT: 10pt arial"><B>To:</B> <A 
    title=casanovas@k2sistemas.com.br 
    href="mailto:casanovas@k2sistemas.com.br">Albert Casanovas</A> ; <A 
    title=cartoweb-users@lists.maptools.org 
    href="mailto:cartoweb-users@lists.maptools.org">carto web</A> </DIV>
    <DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, July 31, 2008 6:33 
    AM</DIV>
    <DIV style="FONT: 10pt arial"><B>Subject:</B> Re: [Cartoweb-users] Geostat 
    error going from close zoom to Full Extent</DIV>
    <DIV><BR></DIV>Hello,<BR><BR>Thanks for finding out these issues.<BR><BR>I 
    just fixed the choroplethDataFromCurrentBoundingBox = true issue in CVS. If 
    you're using it, you can either update your CW3 or remove line 271 in 
    ClientGeostat.php<BR><BR>The following patch fixes the "blank shapes" issue. 
    It will be committed by the end of the 
    day.<BR><BR>Regards,<BR>Damien<BR><BR><BR><TT>### Eclipse Workspace Patch 
    1.0<BR>#P cartoweb3_HEAD<BR>Index: 
    plugins/geostat/client/ClientGeostat.php<BR>===================================================================<BR>RCS 
    file: 
    /var/lib/cvs/projects/cw3/cartoweb3/plugins/geostat/client/ClientGeostat.php,v<BR>retrieving 
    revision 1.12<BR>diff -u -r1.12 ClientGeostat.php<BR>--- 
    plugins/geostat/client/ClientGeostat.php&nbsp;&nbsp;&nbsp; 31 Jul 2008 
    09:12:28 -0000&nbsp;&nbsp;&nbsp; 1.12<BR>+++ 
    plugins/geostat/client/ClientGeostat.php&nbsp;&nbsp;&nbsp; 31 Jul 2008 
    09:29:58 -0000<BR>@@ -110,11 +110,13 @@<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    */<BR>&nbsp;&nbsp;&nbsp;&nbsp; public function createSession(MapInfo 
    $mapInfo,<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    InitialMapState $initialMapState) 
    {<BR>+<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    $this-&gt;geostatClientState = new 
    GeostatClientState();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    $this-&gt;geostatClientState-&gt;choroplethParams = 
    <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    new 
    GeostatChoropleth();<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    <BR>-&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    $this-&gt;geostatClientState-&gt;choroplethParams-&gt;bbox = new 
    Bbox();<BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    $this-&gt;geostatClientState-&gt;choroplethParams-&gt;bbox = 
    <BR>+&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    $initialMapState-&gt;location-&gt;bbox;<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    <BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    $this-&gt;geostatClientState-&gt;choroplethParams-&gt;classificationMethod 
    =<BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
    $this-&gt;getConfig()-&gt;choroplethClassifMethodDefault;<BR></TT><BR><BR><BR><BR>Albert 
    Casanovas wrote: 
    <BLOCKQUOTE cite=mid:001a01c8f289$d805cfc0$2704000a@k2sistemas.com.br 
    type="cite">
      <META content="MSHTML 6.00.6000.16674" name=GENERATOR>
      <STYLE></STYLE>

      <DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
      <DIV>&nbsp;</DIV>
      <DIV><FONT face=Arial size=2>In the demoGeostat.php, seems to lack some 
      parts of the image without painting when doing a Full Extent, we have 
      tested it on the one in the web site&nbsp;(<A 
      href="http://www.cartoweb.org/demos/demoGeostat.php" 
      moz-do-not-send="true">http://www.cartoweb.org/demos/demoGeostat.php</A>) 
      and the problem is the same, you have to follow the following 
      sequence:</FONT></DIV>
      <DIV>&nbsp;</DIV>
      <DIV><FONT face=Arial size=2>1. Do a close zoom and from there apply a 
      Choropleth.</FONT></DIV>
      <DIV><FONT face=Arial size=2>2. Do zoom out or Full extent and some of the 
      regions will appear white.</FONT></DIV>
      <DIV>&nbsp;</DIV>
      <DIV><FONT face=Arial size=2>We checked the parameter&nbsp;<I><FONT 
      face=Courier size=2>choroplethDataFromCurrentBoundingBox </FONT></I>which 
      is set to false, so apparently is correct. </FONT></DIV>
      <DIV><FONT face=Arial size=2>Another problem was when we change this 
      parameter to true, produces an error:</FONT></DIV>
      <DIV>&nbsp;</DIV>
      <DIV>1<BR><STRONG>Fatal error</STRONG>: Uncaught exception 
      'CartocommonException' with message 'Error [2, Cannot modify header 
      information - headers already sent by (output started at 
      C:\ms4w\apps\cartoweb3\projects\agroGeo\plugins\geostat\client\ClientGeostat.php:295), 
      C:\ms4w\apps\cartoweb3\client\FormRenderer.php, 460] Backtrace: file: 
      UNKNOWN - UNKNOWN call: Common::cartowebErrorHandler(2, "Cannot modify 
      header information - headers already sent by (outp...", 
      "C:\ms4w\apps\cartoweb3\client\FormRenderer.php", 460, Array(1)) file: 460 
      - C:\ms4w\apps\cartoweb3\client\FormRenderer.php call: header("HTTP/1.1 
      500 Internal Server Error") file: 1267 - 
      C:\ms4w\apps\cartoweb3\client\Cartoclient.php call: 
      FormRenderer-&gt;showFailure(Object(CartocommonException)) file: 33 - 
      C:\ms4w\apps\cartoweb3\htdocs\client.php call: Cartoclient-&gt;main() 
      file: 3 - C:\ms4w\apps\cartoweb3\htdocs\agroGeo.php call: 
      require_once("C:\ms4w\apps\cartoweb3\htdocs\client.php") ' in 
      C:\ms4w\apps\cartoweb3\common\Common.php:301 Stack trace: #0 [internal 
      function]: Common::cartow in 
      <STRONG>C:\ms4w\apps\cartoweb3\common\Common.php</STRONG> on line 
      <STRONG>301</STRONG></DIV>
      <DIV><STRONG></STRONG>&nbsp;</DIV>
      <DIV><STRONG></STRONG>&nbsp;</DIV>
      <DIV><STRONG>Regards,</STRONG></DIV>
      <DIV><STRONG>Albert</STRONG></DIV>
      <DIV><STRONG></STRONG>&nbsp;</DIV>
      <DIV>&nbsp;</DIV><PRE wrap=""><HR width="90%" SIZE=4>
_______________________________________________
Cartoweb-users mailing list
<A class=moz-txt-link-abbreviated href="mailto:Cartoweb-users@lists.maptools.org">Cartoweb-users@lists.maptools.org</A>
<A class=moz-txt-link-freetext href="http://lists.maptools.org/mailman/listinfo/cartoweb-users">http://lists.maptools.org/mailman/listinfo/cartoweb-users</A>
  </PRE></BLOCKQUOTE><BR><BR>
    <DIV class=moz-signature>-- <BR>
    <STYLE>
<!--
.signature {
  font-family:verdana,helvetica,sans-serif;
  font-size:0.8em;
  line-height: 1.25em;
  color: #9999BB;
  width: 27em;
}

.signature div {
  padding: 0.22em;
  margin-bottom: 0.5em;
  margin-top: 0.5em;
  border-bottom: 1px dotted lightgray;
  background-color: #FCFCFF;
}

.signature .attention {
  background-color: #FFFAFA;
  color: #FFBBBB;
  font-size: 0.8em;
  font-weight: bold;
}

.header {
}
-->
</STYLE>

    <DIV class=signature>
    <DIV><SPAN style="FONT-WEIGHT: bold">Camptocamp SA</SPAN><BR>Damien 
    Corpataux<BR>PSE A<BR>CH-1015 Lausanne<BR></DIV>
    <DIV>+41 21 619 10 22 <SPAN class=header>(Direct)</SPAN><BR>+41 21 619 10 10 
    <SPAN class=header>(Centrale)</SPAN><BR>+41 21 619 10 00 <SPAN 
    class=header>(Fax)</SPAN><BR></DIV>
    <DIV style="COLOR: rgb(102,204,102)"><SPAN 
    style="FONT-SIZE: 24pt; FONT-FAMILY: Webdings; POSITION: relative; TOP: -3px">P</SPAN> 
    <SPAN>Please consider the environment <BR>Do you really need to print this 
    email?</SPAN> </DIV></DIV></DIV></BLOCKQUOTE>
  <P>
  <HR>

  <P></P>_______________________________________________<BR>Cartoweb-users 
  mailing 
  list<BR>Cartoweb-users@lists.maptools.org<BR>http://lists.maptools.org/mailman/listinfo/cartoweb-users<BR></BLOCKQUOTE></BODY></HTML>