[Mapserver-users] getShare raises assertion error on PostGIS
Daniel Morissette
morissette@dmsolutions.ca
Tue, 01 Jul 2003 15:49:17 -0400
Nicol Hermann wrote:
>
> thank you for the fix in the CVS version.
> The error message disappears when i use the latest cvs version but i
> still got no data back.The result of the var_dump statement is NULL.
> How do i manage it to get the "real" data back from the postgres
> database.
>
> $shape = $layer->getShape($result->tileindex, $result->shapeindex);
> $value = $shape ->value;
> var_dump ($value);
>
You are trying to access the field values, correct? The PHP MapScript
docs explains how to get to them:
--------8<--------
int numvalues (read-only)
array values (read-only)
The values array is an associative array with the attribute values
for this shape. It is set only on shapes obtained from
layer->getShape().
The key to the values in the array is the attribute name, e.g.
$population = $shape->values["Population"];
-------->8--------
Note that you also have to make sure that you select the columns you're
interested in in your PostGIS select statement. I'm not sure of the
details to do this, someone more experienced with PostGIS might be able
to help.
Daniel
--
------------------------------------------------------------
Daniel Morissette morissette@dmsolutions.ca
DM Solutions Group http://www.dmsolutions.ca/
------------------------------------------------------------
_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users