[Mapserver-users] Get attribute values from Shapefile

Eric Bridger eric@gomoos.org
Tue, 04 May 2004 23:23:51 -0400


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.  

_______________________________________________
Mapserver-users mailing list
Mapserver-users@lists.gis.umn.edu
http://lists.gis.umn.edu/mailman/listinfo/mapserver-users