[Xastir] DBFAWK guidance? and layer numbering documentation

Alan Crosswell alan at columbia.edu
Sun Oct 19 13:25:14 EDT 2003


Tom Russo wrote:

>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.
>  
>
There's some DBFAWK documentation in README.MAPS.

>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.
>
See filled=0 in the appropriate .dbfawk file and it won't be filled.  
Make suggestions for what the standard dbfawk files should look like.

>
>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.
>
So write up a .dbfawk file for it.  I think the filling and awful lines 
is probably leftover crud from whatever the previous values were.

>
>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.
>

The key field is for WX alert searching.  The name field is for labels.  
The colors are ugly and are defined in main.c(!).  Black is 8.  I have 
no idea why the colors are as they are.  A todo item is to allow you to 
name the colors in the .dbfawk file.

>
>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.
>  
>
The NWS files are meant to be used for WX alerts.  The .dbfawk stuff 
stil doesn't work properly with them.

>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?
>
For WX alerts, but not yet functional.  I believe I may have since 
changed filled to 0 in nws*.dbfawk.

>  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? 
>
Layering is also an outstanding dbfawk issue:-)

> 
>  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."
>
See README.MAPS.

>
>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).
>
That is correct, but an error message also displays saying there's no 
.dbfawk file.  I would rather get all the needed .dbfawk files created 
to totally supplant the hardcoded choice made in the non-dbfawk map_shp.c..

/a




More information about the Xastir mailing list