[mapserver-users] Reading shapefile's attributes
Pedro Arriondo
pedroaa10 at gmail.com
Tue Apr 20 11:36:15 PDT 2010
Hi friends, i writte from Argentina.
I'd like read attributes from a shapefile but i get "nothing", however i can
read very good the geometries.
My code:
$shpFile = ms_newShapeFileObj( $_SERVER["DOCUMENT_ROOT"]."/zonas", -1); //my
shapefile in disc
echo $shpFile->numshapes; //8 -> it's right!!
$oShape = $shpFile->getShape(0); //get first object
//..but....:
echo $oShape->numvalues; //0, however it has 2 values: "CODIGO" and "NOMBRE"
echo $oShape->values["CODIGO"]; //Here get empty (value is 4)
Thanks in advance!!!!.
Pedro.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/mapserver-users/attachments/20100420/3353c531/attachment.htm>
More information about the MapServer-users
mailing list