[Cartoweb-users] Geostat to SQL: Trying to get property of non-object ERROR

Albert Casanovas casanovas at k2sistemas.com.br
Thu Jun 12 13:15:07 EDT 2008


Hi,

I am working in the adaptation of the Geostat pluguin for PostGIS data.

Now I modified the DATA line in the LAYER and I am getting the error: 

Class : SoapFaultWrapper
Message : Cannot draw choropleth
Error [8, Trying to get property of non-object, C:\ms4w\apps\cartoweb3\projects\agroGeo\plugins\geostat\server\ServerGeostat.php, 158]
Backtrace:

file: 158 - C:\ms4w\apps\cartoweb3\projects\agroGeo\plugins\geostat\server\ServerGeostat.php
call: Common::cartowebErrorHandler(8, "Trying to get property of non-object", "C:\ms4w\apps\cartoweb3\projects\agroGeo\plugins\geostat\server\S...", 158, Array(5))

file: 105 - C:\ms4w\apps\cartoweb3\projects\agroGeo\plugins\geostat\server\ServerGeostat.php
call: ServerGeostat->drawChoropleth(Object(GeostatChoropleth))


This is the Layer:
LAYER

    NAME "talhao"

    TYPE POLYGON

    CONNECTIONTYPE POSTGIS

    CONNECTION 'dbname=emater_rio user=postgres password=k2123 host=localhost'

    DATA 'the_geom from (SELECT ase.parc_id, SUM(ase.valor) AS VALOR, ep.the_geom AS the_geom FROM area_serie ase,     edit_poly ep WHERE EXTRACT(YEAR FROM ase.date)=2008 AND ase.cod_serie=1 AND ase.cod_produto=1 AND ase.parc_id=ep.id GROUP BY ase.parc_id, ep.the_geom ORDER BY ase.parc_id) as foo'

    TEMPLATE 'ttt'

    CLASS

        STYLE

            COLOR 255 255 255

            OUTLINECOLOR 50 50 50

        END

    END

END



It works fine with:

DATA 'the_geom from (select the_geom, oid, id, talhao, surf from edit_poly) as foo'



Any help would be appreciated.

Thanks a lot,

Albert Casanovas
Project Manager
K2 Sistemas
Rio de Janeiro


-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080612/c85cf8d4/attachment.html


More information about the Cartoweb-users mailing list