First, thanks Josh for your answer. I tell you that the the file it's good, because i use it in my job with Mapserver. Too i can access to attributes with library dbase from PHP. (dbase_open,...dbase_get_record_with_names,...) So.... i don't know how to continue....
2010/4/20 Joshua Hevenor <[email protected]> > You can check that the shapefile has attributes using the command line tool > ogrinfo. http://www.gdal.org/ogrinfo.html > You can check on spelling of fields, etc. It might as least get you > started. > > Cheers, > Josh > > ------------------------------ > *From:* Pedro Arriondo <[email protected]> > *To:* [email protected] > *Sent:* Tue, April 20, 2010 2:36:15 PM > *Subject:* [mapserver-users] Reading shapefile's attributes > > 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. > >
_______________________________________________ mapserver-users mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/mapserver-users
