[Mapserver-users] #features for layer in php/mapscript?
Daniel Morissette
morissette@dmsolutions.ca
Mon, 28 Apr 2003 23:14:45 -0400
woodbri@swoodbridge.com wrote:
>
> Vincent,
>
> $oShp = $layer->getshape()
> $num = $oShp->numshapes;
> $shptype = $oShp->type;
> etc
>
> See the shapeObj in the php/mapscript doc.
>
(Humm... there is no numshapes member on shapeObj, but there is one in
the shapeFileObj which is what Vincent should look at using.)
To answer the initial question, no there is no way to get a numshapes
using the $layer->open() and $layer->getshape() methods. Those methods
were initially intended for use to fetch query results only. It would
not be easily possible to provide a getNumShapes() on the layerObj due
to the various types of datasources supported. However, it would be
possible, and perhaps desirable to add a $layer->getNextShape() ... you
might want to file this as an enhancement in bugzilla.
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