[Mapserver-users] Get attribute values from Shapefile

Eric Bridger eric at gomoos.org
Tue May 4 23:23:51 EDT 2004


At 05:05 PM 05/04/2004 -0500, Ganesh Pulicherla wrote:
> 
>We are using PHP/Mapscript on Linux. I have a quick question: How can i get the 
>attribute values of a Shape file using PHP/Mapscript ? For eg., In the Counties 
>shapefile, i want to retrieve all the county names under the C_NAME column in 
>the shapefile. 
 
Shape files have 2 parts. *.shp holds the geometry and the attributes are ih a standard dbf file with the same name. Shape # 1 corresponds with the DBF record # 1, etc.
So all you really need is a PHP module to read DBF files, such as dbase. Sorry I don't know the exact PHP module name, something like dbase.so.  In Perl I use something called XBase.pm.  




More information about the mapserver-users mailing list