<!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.16608" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I got it working, just reinstalled the application
and added the parameters obtained from the select to the DATA like
this:</FONT></DIV>
<DIV><FONT size=2></FONT> </DIV>
<DIV><FONT size=2>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'</DIV>
<P><FONT face=Arial>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:</FONT></P>
<P><FONT face=Arial>geostat.2.choropleth_attribs</FONT></P>
<P><FONT face=Arial>Is configured to use another column of the table.</FONT></P>
<P><FONT face=Arial>Any idea why is this happening?</FONT></P>
<P><FONT face=Arial>Regards,</FONT></P>
<P><FONT face=Arial>Albert</FONT></P>
<P><FONT face=Arial></FONT> </P></FONT>
<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=cartoweb-users@lists.maptools.org
href="mailto:cartoweb-users@lists.maptools.org">cartoweb-users@lists.maptools.org</A>
</DIV>
<DIV style="FONT: 10pt arial"><B>Sent:</B> Thursday, June 12, 2008 2:15
PM</DIV>
<DIV style="FONT: 10pt arial"><B>Subject:</B> [Cartoweb-users] Geostat to SQL:
Trying to get property ofnon-object ERROR</DIV>
<DIV><BR></DIV>
<DIV><FONT face=Arial size=2>Hi,</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>I am working in the adaptation of the
Geostat pluguin for PostGIS data.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>Now I modified the DATA line in the LAYER and I
am getting the error: </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV><FONT face=Arial size=2>Class
: SoapFaultWrapper<BR>Message : Cannot draw choropleth<BR>Error [8, Trying to
get property of non-object,
C:\ms4w\apps\cartoweb3\projects\agroGeo\plugins\geostat\server\ServerGeostat.php,
158]<BR>Backtrace:<BR><BR>file: 158 -
C:\ms4w\apps\cartoweb3\projects\agroGeo\plugins\geostat\server\ServerGeostat.php<BR>call:
Common::cartowebErrorHandler(8, "Trying to get property of non-object",
"C:\ms4w\apps\cartoweb3\projects\agroGeo\plugins\geostat\server\S...", 158,
Array(5))<BR><BR>file: 105 -
C:\ms4w\apps\cartoweb3\projects\agroGeo\plugins\geostat\server\ServerGeostat.php<BR>call:
ServerGeostat->drawChoropleth(Object(GeostatChoropleth))</FONT>
<DIV> </DIV>
<DIV><FONT face=Arial size=2></FONT> </DIV>
<DIV><FONT face=Arial size=2>This is the Layer:</FONT></DIV>
<DIV>
<P><FONT face=Arial size=2>LAYER</FONT></P>
<P><FONT face=Arial size=2> NAME "talhao"</FONT></P>
<P><FONT face=Arial size=2> TYPE POLYGON</FONT></P>
<P><FONT face=Arial size=2> CONNECTIONTYPE
POSTGIS</FONT></P>
<P><FONT face=Arial size=2> CONNECTION 'dbname=emater_rio
user=postgres password=k2123 host=localhost'</FONT></P>
<P><STRONG><FONT face=Arial> 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'</FONT></STRONG></P>
<P><FONT face=Arial size=2> TEMPLATE 'ttt'</FONT></P>
<P><FONT face=Arial size=2> CLASS</FONT></P>
<P><FONT face=Arial size=2>
STYLE</FONT></P>
<P><FONT face=Arial size=2>
COLOR 255 255 255</FONT></P>
<P><FONT face=Arial size=2>
OUTLINECOLOR 50 50 50</FONT></P>
<P><FONT face=Arial
size=2> END</FONT></P>
<P><FONT face=Arial size=2> END</FONT></P>
<P><FONT face=Arial size=2>END</FONT></P>
<P><FONT face=Arial size=2></FONT> </P>
<P><FONT face=Arial size=2>It works fine with:</FONT></P>
<P><FONT size=2><FONT face=Arial size=3><STRONG>DATA 'the_geom from (select
the_geom, oid, id, talhao, surf from edit_poly) as
foo'</STRONG></FONT></P></FONT>
<P><FONT face=Arial size=2></FONT> </P>
<P><FONT face=Arial size=2>Any help would be appreciated.</FONT></P>
<P><FONT face=Arial size=2>Thanks a lot,</FONT></P>
<P><FONT face=Arial size=2>Albert Casanovas<BR>Project Manager<BR>K2
Sistemas<BR>Rio de Janeiro</FONT></P>
<P><FONT face=Arial size=2></FONT> </P></DIV>
<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>