[Cartoweb-users] RE: mapquery issue

zze-SIGALE PORTANERI F ext RD-BIZZ-SOP fportaneri.ext at orange-ftgroup.com
Thu Mar 22 12:43:36 EST 2007


Just to add some new stuff here:

The mapfile layer definition defines :

    METADATA
       "id_attribute_string" "idcapt|string"
    END

The Postgresql table is defined as follow:

	CREATE TABLE capteurs
	(
	  idcapt varchar NOT NULL,
	  geom geometry,
	  "type" varchar,
	  CONSTRAINT capteurs_pkey PRIMARY KEY (idcapt),
	  CONSTRAINT "SRID_GEOM_RULE" CHECK (srid(geom) = -1),
	  CONSTRAINT "TYPE_GEOM_RULE" CHECK (geometrytype(geom) = 'POINT'::text OR geom IS NULL)
	) 
	WITH OIDS;

I notice that for capteurs element where the field "idcapt" is a numeric value ('1', '400'...) , everything is OK
BUT if some alphanumeric apears in that field ('3F', 'F40'..), the mapquery getShapes() query fails as described...

Any reason?

Franck 

> _____________________________________________ 
> De : 	zze-SIGALE PORTANERI F ext RD-BIZZ-SOP  
> Envoyé :	jeudi 22 mars 2007 17:12
> À :	'cartoweb-users at lists.maptools.org'
> Cc :	'Sylvain Pasche'
> Objet :	mapquery issue
> 
> 
> Hi,
> 
> I have a mapquery plugin issue: While doing a queryByBbox() request on a area where one element must be found, the cartoclient display the following error: 
> 
> class CartocommonException { protected $message = 'Error [8, Trying to get property of non-object, /exec/applis/sglpgo/G01R00C02/cartoweb3/coreplugins/query/server/ServerQuery.php, 122] Backtrace: file: 200 - /exec/applis/sglpgo/G01R00C02/cartoweb3/common/Common.php call: Common::cartowebErrorHandler() file: 122 - /exec/applis/sglpgo/G01R00C02/cartoweb3/coreplugins/query/server/ServerQuery.php call: Common::cartowebErrorHandler() file: 122 - /exec/applis/sglpgo/G01R00C02/cartoweb3/coreplugins/query/server/ServerQuery.php call: ServerQuery::resultToTable() file: 227 -
> ...
> 
> Adding traces to the log and trying to analyse it, it looks like the serveurMapquery plugin found one element and the extractResults  $msLayer->getResult($i) return an object as follow:
> 
> Thu Mar 22 16:25:22 2007,703 [30941] DEBUG ServerMapquery - class stdClass {
>   public $shapeindex = 1841530366;
>   public $tileindex = -1;
>   public $classindex = 6;
> }
> 
> Which is return a shape to the ServerQuery plugin as follow:
> 
> Thu Mar 22 16:25:22 2007,704 [30941] DEBUG ServerQuery - resultshape=
> Thu Mar 22 16:25:22 2007,705 [30941] DEBUG ServerQuery - array (
>   0 => false,
> )
> 
> Any clue?
> 
> 
> Thanks in advance,
> Franck
> 
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.maptools.org/pipermail/cartoweb-users/attachments/20070322/0f5802fa/attachment.html


More information about the Cartoweb-users mailing list