[Cartoweb-users] Geostat to SQL: Trying to get property
ofnon-object ERROR
Albert Casanovas
casanovas at k2sistemas.com.br
Thu Jun 12 14:57:42 EDT 2008
Hi,
I got it working, just reinstalled the application and added the parameters obtained from the select to the DATA like this:
DATA 'valor, the_geom from (SELECT 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'
Now I have another question, I can´t see why but when the cloropeths are painted, it allways uses the id of the shape as the value to use in the Distribution, although in the configuration file, the parameter:
geostat.2.choropleth_attribs
Is configured to use another column of the table.
Any idea why is this happening?
Regards,
Albert
----- Original Message -----
From: Albert Casanovas
To: cartoweb-users at lists.maptools.org
Sent: Thursday, June 12, 2008 2:15 PM
Subject: [Cartoweb-users] Geostat to SQL: Trying to get property ofnon-object ERROR
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
------------------------------------------------------------------------------
_______________________________________________
Cartoweb-users mailing list
Cartoweb-users at lists.maptools.org
http://lists.maptools.org/mailman/listinfo/cartoweb-users
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20080612/1c0418bd/attachment.html
More information about the Cartoweb-users
mailing list