[Xastir] more dbfawk problems

Jason Winningham jdw at eng.uah.edu
Sun Jan 2 14:36:45 EST 2005


I'm working on a dbfawk for the roads shapefile from NOAA, and it's not 
doing what I want.

some roads have lengthy names, like "US 72, US 231, US 431, SR 1, SR 2" 
or "I- 20, I- 59, US 11, SR 5, SR 7".  I'm trying to use just the text 
before the first comma and ignore the rest, so the map isn't so 
cluttered. Here's the guts of the file:

/^FEATURE=Limited Access Highway/ { lanes=3; color=4; label_level=2048; 
font_size=3}
/^ROUTE=[ ]*([^,]*).*$/ {name="$1";next}
/^ROUTE=[ ]*(.*)$/ {name="$1"}

Usually what happens is that I don't get any text for labels that 
should match the /^ROUTE=([^,]*).*$/ rule. Oddly enough, if I use a 
rule like this

/^ROUTE=([ ]*)([^,]*)(.*)$/ {name="$1:$2:$3";next}

I see something like " :US 72:, SR 20". which seems to indicate that my 
regexp syntax is OK, but maybe dbfawk isn't doing what I want with it.  
I have also tried it like /^ROUTE=([ ]*)([^,]*)(.*)$/ {name="$2";next} 
which gives me the same incorrect results.

help?

-Jason
kg4wsv




More information about the Xastir mailing list