[Mapserver-users] #features for layer in php/mapscript?
woodbri at swoodbridge.com
woodbri at swoodbridge.com
Mon Apr 28 20:45:01 PDT 2003
Oops, right you are, my bad!
$layer->getshape() gets an individual obj out of a shapefile and
numshapes only makes sense when applied to a shapefile object.
See if you can use the ShapefileObj as Daniel mentioned.
Ok, sleep now, before I confuse anyone else ... like myself :)
-Steve W.
On 28 Apr 2003 at 23:14, Daniel Morissette wrote:
> woodbri at 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 at dmsolutions.ca
> DM Solutions Group http://www.dmsolutions.ca/
> ------------------------------------------------------------
> _______________________________________________
> Mapserver-users mailing list
> Mapserver-users at lists.gis.umn.edu
> http://lists.gis.umn.edu/mailman/listinfo/mapserver-users
>
More information about the MapServer-users
mailing list