[Xastir] ESRI shapefiles and dbfawk

James Ewen jewen at shaw.ca
Tue Dec 14 03:54:37 EST 2004


> Download Shapelib, gunzip/untar the file, go into the new 
> directories created, find the contrib directory.  Type 
> "make".  If you're lucky you'll end up with some new 
> executables there that you can use.

Aha... That's what I was missing!

> >From what I read, not only do I need to find out the names of the 
> >fields, but I also have to determine the values used. 
> 
> dbfinfo, dbfcat, dbfdump, shpinfo, shpcat, shpdump.  Those 
> are the ones I've used.  The shp file contains the 
> points/vectors/polygon info.  The dbf file contains the 
> attributes that go along with each shape.

Okay, did the research on all of the executables, and played with them a
bit.

I'm still not sure how I determine what value I need to match when creating
the dbfawk file.

In Tom's example file he checks for matches in the CFCC field:


/^CFCC=A1/ {lanes=4; color=4; label_level=512; font_size=3; next}
/^CFCC=A2/ {lanes=3; color=8; label_level=256; font_size=2; next}
/^CFCC=A3/ {lanes=2; color=8; label_level=128; font_size=1; next}

How do you find out what values are in the CFCC field. Can that be
determined from the shp file with one of these tools, or do I have to find a
descriptor file for the particular shp file I am trying to parse?

James
VE6SRV

-- 
No virus found in this outgoing message.
Checked by AVG Anti-Virus.
Version: 7.0.296 / Virus Database: 265.5.0 - Release Date: 12/9/2004
 




More information about the Xastir mailing list