[Xastir] DBFAWK guidance? and layer numbering documentation

Tom Russo russo at bogoflux.losalamos.nm.us
Sun Oct 19 12:50:10 EDT 2003


I just this week started looking at building Xastir with dbfawk.  Now that I 
have it, I'm not quite sure whether to keep it, as I don't quit grok what's
going on.

Pre-dbfawk, I would typically set my USGS quad rasters to be at layer
0, then at higher layers have some vector APRS maps (layers 10 and
up), then the county boundaries through the weather alert shapefiles,
and then a shapefile for the continent coastlines just for the rare
occasions when I zoom WAY out (at layer 100).  County lines and the
coastlines showed up with the default color of black, with a very
aesthetically pleasing line width.  This got me the topo base layer I
like, with some vector features cleanly layered on top.

As soon as I enabled dbfawk, the .dbfawk files in config are
apparently telling Xastir to fill the county shapefile instead of
using it as boundaries.  This makes the entire US look one uniform
shade of lavendar with no county boundaries at all, and since I'd been
using the counties as a transparent vector layer at high layer value,
the now-filled polygons cover up all my topo maps.

Also, because my coastline shapefile had no dbfawk associated with it,
it wound up as a non-filled lavendar vector layer with really wide
lines.  It looks awful.

I tinkered briefly with the dbfawk files, trying to make a dbfawk file
for my coastline layer and only succeeded in making the coastline
vanish altogether --- I think I don't quite grok what the "name" and
"key" fields are supposed to be, and my shapefile has only two keys:
ID and CAT_ID (it was actually a GRASS vector layer exported to
shapefile, ID is line number, CAT_ID is the line "category" and in
this case the categories are all 0).  I started from the tgrcty.dbfawk
file, removed the matching rules that were specific to the tgrcty type
maps, set the dbfinfo to match what testawk told me was the signature,
set the dbffields to "ID:CAT_ID", then tweaked the BEGIN_RECORD so it
was the same as the original, but with filled=0, lanes=1 and some
color other than 11 (I experimented trying to find black, and never
succeeded).  At first I had no matching rules that would set "key" to
anything, then I tried "/^CAT_ID=(.*)$/ {key=$1; next}" and a handful
of variations on that theme.  At some point in my late-night
experimenting my layer just stopped showing up at all so I gave up
experimenting out of frustration and rebuilt the code with dbfawk
disabled.

I'm also very confused about how we were *meant* to use the c_, w_ and
z_ files in conjunction with dbfawk support --- if I assign them to
the same map layer that I always did I get a useless, solid lavendar
colored US with no county boundaries.  I tried tweaking the dbfawk
files but didn't really know what I was doing --- I changed "filled=1"
to "filled=0" in nwsc_ddmmyy.dbfawk, but it was late and I didn't
realize there was also nwsw_ddmmyy.dbfawk and nwsz_ddmmyy.dbfawk
interfering.  By the time I realize there were multiple dbfawk files
to tweak I'd just rebuilt xastir without dbfawk support and shrugged
it off.

So:
  1) How are folks using those county shapefiles along with dbfawk support?
     Is it a matter of just putting different shapefiles at different
     layer numbers instead of letting them get chosen alphabetically?
  2) Does anyone else prefer the county lines to be boundaries instead of
     filled polygons?  If so, do you know how to make it work that way 
     with dbfawk enabled?  If not, how do you layer things so the
     filled counties don't clobber other rasters?  
  3) And is any sort of dbfawk tutorial available?  Just cribbing off the
     existing dbfawk files got me nowhere when trying to tell xastir
     "Just display my coastline shapefile as an outline with thin
      black lines like you would have if there was no dbfawk support."

I'd like to suggest that the dbfawk support be tweaked slightly, so if
no matching signature is found the code behaves just as it did before
dbfawk existed.  This is not the case right now as far as I can tell
(or my coastlines would have been thin black lines).

OH! and as long as I've written a huge post, might as well make it
longer --- the help file on layer numbering states that layer numbers
can range from -99999 to +99999.  I discovered once that while you can
indeed use the map properties dialog to set and use negative map
layers, when you exit and restart Xastir complains loudly that the
negative layers are invalid.  Some other documentation claims that the
layer range is 0-99999.  Might want to make that consistent.  I, for
one, would like the negative layers to be truly supported --- if I set
my raster layers at 0 so they're always on the bottom layer, then
import a GPS track through GPSman, the raster layer winds up
clobbering the new GPS track (because it's also defaulted to layer 0
when imported) unless I rearrange directory names or go into the map
chooser and tweak the new track's layer number.  If I could set my
raster layers at -999, then new vector layers imported through GPSman
would always be layered on top by default. 

-- 
Tom Russo   KM5VY    QRPL #1592   K2#398    http://www.swcp.com/~russo/
Tijeras, NM DM64ux   SOC #236     AHTB#1    http://www.qsl.net/~km5vy/
 echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]



More information about the Xastir mailing list