Reading Shapefile DBF attributes?
Eric Bridger
eric at GOMOOS.ORG
Fri Jan 14 06:22:30 PST 2005
At 08:46 AM 01/14/2005 -0500, Norman Vine wrote:
>Gerry Creager writes:
>>
>> I'm sure this is an easy one.
>>
>> I need to get the attributes of the shapefile from the dbf in a readable
>> form.
>>
>> I'm going thru the archives and docs, so I may find it and render all
>> the excess bandwidth for naught, but I thought I'd try to optimize the
>> time usage, and ask the collective consciousness.
>
>Probably easiest to use mapscript
>
>See the Perl or Python examples directory for shpinfo.XX
>
>or dbfinfo from the shapelib distribution < contrib directory >
>
>http://shapelib.maptools.org/
You will need Perl on your system (of course) and the XBase.pm module (available on CPAN) to run shpinfo.pl .
But it is very easy to use. I rely on Mapscript.pm to read and write shape files and XBase.pm for the corresponding dbf files.
I can send you some sample Perl scripts if you like.
Eric
More information about the MapServer-users
mailing list