[Cartoweb-users] Geostat error going from close zoom to FullExtent

Oliver Christen oliver.christen at camptocamp.com
Mon Aug 4 02:37:08 EDT 2008

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.
if you do select the_geom, oid, id, talhao, surf from edit_poly directly into postgres, what do you get ?

  ----- Original Message ----- 
  From: Albert Casanovas 
  To: Damien Corpataux ; carto web 
  Sent: Thursday, July 31, 2008 7:07 PM
  Subject: Re: [Cartoweb-users] Geostat error going from close zoom to FullExtent

  Hi Damien,

  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:

  Class : SoapFaultWrapperMessage : MapServer error: Error in msDrawMap(): Failed to draw layer named 'EDITPOLY'.
  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 && setSRID('BOX3D(931968.170091 -2617023.93743308,1351878.170091 -2343764.69412691)'::BOX3D, -1 )' 

  Postgresql reports the error as 'ERROR:  cursor "mycursor" already exists

  More Help:

  Error with POSTGIS data variable. You specified 'check your .map file'.
  Standard ways of specifiying are : 
  (1) 'geometry_column from geometry_table' 
  (2) 'geometry_column from (sub query) as foo using unique column name using SRID=srid#' 

  Make sure you put in the 'using unique  column name' and 'using SRID=#' clauses in.

  For more help, please see http://postgis.refractions.net/documentation/ 

  Mappostgis.c - version of Jan 23/2004.


  file: 226 - C:\ms4w\apps\cartoweb3\coreplugins\images\server\ServerImages.php
  call: ServerContext->checkMsErrors()

  file: 311 - C:\ms4w\apps\cartoweb3\server\Cartoserver.php
  call: ServerImages->drawMainmap(Object(Images))

  file: 349 - C:\ms4w\apps\cartoweb3\server\Cartoserver.php
  call: Cartoserver->doGetMap(Object(MapRequest))

  file: 370 - C:\ms4w\apps\cartoweb3\server\Cartoserver.php
  call: Cartoserver->callWithExceptionCheck("doGetMap", Object(MapRequest))

  file: 76 - C:\ms4w\apps\cartoweb3\server\MapResultCache.php
  call: Cartoserver->cacheGetMap(Object(MapRequest))

  file: 178 - C:\ms4w\apps\cartoweb3 

  Do you have any idea of what can be happening??

  Best Regards,

    ----- Original Message ----- 
    From: Damien Corpataux 
    To: Albert Casanovas ; carto web 
    Sent: Thursday, July 31, 2008 6:33 AM
    Subject: Re: [Cartoweb-users] Geostat error going from close zoom to Full Extent


    Thanks for finding out these issues.

    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

    The following patch fixes the "blank shapes" issue. It will be committed by the end of the day.


    ### Eclipse Workspace Patch 1.0
    #P cartoweb3_HEAD
    Index: plugins/geostat/client/ClientGeostat.php
    RCS file: /var/lib/cvs/projects/cw3/cartoweb3/plugins/geostat/client/ClientGeostat.php,v
    retrieving revision 1.12
    diff -u -r1.12 ClientGeostat.php
    --- plugins/geostat/client/ClientGeostat.php    31 Jul 2008 09:12:28 -0000    1.12
    +++ plugins/geostat/client/ClientGeostat.php    31 Jul 2008 09:29:58 -0000
    @@ -110,11 +110,13 @@
         public function createSession(MapInfo $mapInfo,
                                       InitialMapState $initialMapState) {
             $this->geostatClientState = new GeostatClientState();
             $this->geostatClientState->choroplethParams = 
                 new GeostatChoropleth();
    -        $this->geostatClientState->choroplethParams->bbox = new Bbox();
    +        $this->geostatClientState->choroplethParams->bbox = 
    +            $initialMapState->location->bbox;
             $this->geostatClientState->choroplethParams->classificationMethod =

    Albert Casanovas wrote: 

      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 (http://www.cartoweb.org/demos/demoGeostat.php) and the problem is the same, you have to follow the following sequence:

      1. Do a close zoom and from there apply a Choropleth.
      2. Do zoom out or Full extent and some of the regions will appear white.

      We checked the parameter choroplethDataFromCurrentBoundingBox which is set to false, so apparently is correct. 
      Another problem was when we change this parameter to true, produces an error:

      Fatal error: 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->showFailure(Object(CartocommonException)) file: 33 - C:\ms4w\apps\cartoweb3\htdocs\client.php call: Cartoclient->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 C:\ms4w\apps\cartoweb3\common\Common.php on line 301


Cartoweb-users mailing list
Cartoweb-users at lists.maptools.org

    Camptocamp SA
    Damien Corpataux
    PSE A
    CH-1015 Lausanne

    +41 21 619 10 22 (Direct)
    +41 21 619 10 10 (Centrale)
    +41 21 619 10 00 (Fax)

    P Please consider the environment 
    Do you really need to print this email? 


  Cartoweb-users mailing list
  Cartoweb-users at lists.maptools.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080804/84dc4499/attachment.html

More information about the Cartoweb-users mailing list