[Xastir] ESRI shapefiles and dbfawk

James Ewen jewen at shaw.ca
Wed Dec 15 02:06:21 EST 2004


> > 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?
> 
> This is part of the "metadata" that the provider of the 
> shapefiles should have.  There is no way to determine this 
> from the shapefiles themselves.

Okay, I think I know the metadata format... fgdc-std-001-1998, which appears
to a standard metadata format. I have not been able to find anything that
lists the field names and possible entries.

However, I used dbfinfo to find our the field names. By viewing the
shapefile with ArcExplorer, I was able to find values used for NATRDCLASS
which would allow me to select different types of roads. 

So, now this still leaves me in a quandary. The dbfawk file basically has a
list of patterns to match, and instructions on how to display data that
matches the pattern.

Which file is the pattern matching run against? Should I not be able to grep
the file, looking for the data?

I can not figure out how to determine what pattern I need to match, when I
have no idea what the file data looks like.

I have guessed at a few possible patterns, none of which work.
/^NATRDCLASS=FREEWAY/ { lanes=4;color=4; next}

I am guessing that NATRDCLASS should be okay, since dbfinfo found it. I
found the value FREEWAY using ArcExplorer. However, I don't know if the
string NATRDCLASS=FREEWAY would ever be found in whatever file would have
the data. Perhaps there are spaces in there... Perhaps the value has quotes
around it as ArcExplorer shows.

This sure sounds like just the thing I'm looking for, but when it takes 30
to 40 man hours to figure out how to set up the dbfawk file, it really gets
frustrating.

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