[Xastir-Dev] proposed method of doing canoncial shapefile DBF attributes support

Gerry Creager (N5JXS) gerry.creager at tamu.edu
Fri Jun 27 13:21:46 EDT 2003


I'm leaving for the airport shortly for the 8-hour task of flying back 
to Texas.  Can I send it tomorrow?  If I get delayed at teh San Diego 
Airport, I'll do it today.

gerry

Alan Crosswell wrote:
> Get me the pointer, but if it ain't KISS, it ain't gonna get implemented 
> any time soon.
> /a
> 
> Gerry Creager (N5JXS) wrote:
> 
>> Woohoo!  Metadata!  In a consistent fashion!
>>
>> There are standards we can tap for metadata, including GML instead of 
>> awk syntax, which are reasonably mature and don't require defining our 
>> own.
>>
>> If there's interest, I can get the OGC GML references and making them 
>> available; they're on the OpenGIS.org site, too.
>>
>> One thing I'd love to see is Xastir-2 OGC compliant for Location-Based 
>> Services, among other areas.
>>
>> gerry
>>
>> Alan Crosswell wrote:
>>
>>> OK, so I guess attachments get broken.  Here it is inline:
>>>
>>> Use a metadata file for each map that translates map-specific fields 
>>> into
>>> canonical fields.  When the metadata file is missing, guess at which one
>>> of several pre-defined metadata definitions to use based on the dbf
>>> "signature" (as the code does currently).
>>>
>>> Let's try a sample file (use Tiger/line since they are the most 
>>> complicated):
>>>
>>> Use awk subset syntax.  Implement patterns using the pcre(3) library.
>>> pattern { action}
>>>
>>> Action grammar is:
>>> <attr> := "width" | "color" | "name" | "filled" | "pattern"
>>>           | "display_level" | "label_level"
>>> <attr_set> := <attr> "=" value
>>> <op>   := "next"   # like awk, to end pattern search
>>> <stmt> := <attr_set> | <op>
>>> <stmt_list> := <stmt_list> ";" <stmt> | <stmt>
>>> <action> := <stmt_list>
>>>
>>> Read DBF fields and pass them to this function as
>>> <field>=value
>>>
>>> Sample file for Tiger/Line:
>>> # see tig2aprs.c cfccrange() for related examples.  See Tiger/Line
>>> # technical documentation for complete list of codes.
>>> # set defaults:  empty pattern matches everything.
>>> {key=""; width=1; color=black; name=""; filled=0; pattern=solid;
>>>  display_level=8192; label_level=32}
>>> # set the search key to be the Tiger/Line ID.  Not currently used.
>>> /^TLID=\(.*\)$/ {key=$1}
>>> # set the label to be the Feature Name
>>> /^FENAME=United States Highway\(.*\)$/ {label="US $1"};
>>> /^FENAME=State Highway\(.*\)$/ {label="State $1"};
>>> /^FENAME=State Route\(.*\)$/ {label="SR $1"};
>>> /^FENAME=\(.*\)$/ {label=$1}
>>> # Census Feature Class Code
>>> # A: roads
>>> /^CFCC=A1/ {lanes=4; color=brown}
>>> /^CFCC=A2/ {lanes=3; color=black}
>>> /^CFCC=A3[1-6]/ {display_level=256; next}
>>> /^CFCC=A3[7-8]/ {display_level=128; next}
>>> /^CFCC=A3/ {lanes=2; color=black}
>>> /^CFCC=A4/ {display_level=96; label_level=16; color=gray35; lanes=1}
>>> /^CFCC=A5/ {lanes=2; color=gray35; display_level=64}
>>> /^CFCC=A65/ {lanes=2, color=black, pattern=dashed; next}
>>> /^CFCC=A6[^5]/ {color=gray35; display_level=64; next}
>>> /^CFCC=A7[12]/ {lanes=1; color=red; pattern=dashed; display_level=64; 
>>> next}
>>> /^CFCC=A7[03-9]/ {lanes=1; color=gray35; pattern=dashed; 
>>> display_level=64; next}
>>> # need to implement these:
>>> # B: railroads
>>> # C: transmission lines
>>> # D: landmarks
>>> # E: physical featuers
>>> # F: county boundaries
>>> # (G not used by census;  tig2aprs uses for special maps)
>>> # H: hydrography
>>> /^CFCC=H0/ {lanes=0; color=Steelblue;}
>>> /^CFCC=H02/ {pattern=dashed; next}
>>> /^CFCC=H[1-6]2/ {lanes=1; pattern=dashed; next}
>>> /^CFCC=H[1-6][013-9] {lanes=1; next}
>>> /^CFCC=H7/ {display_level=0; label_level=0; next}
>>> /^CFCC=H8/ {color=steelblue; lanes=1}
>>> /^CFCC=H81/ {color=white; next}
>>>
>>>
>>> Alan Crosswell wrote:
>>>
>>>> What do you think:
>>>>
>>>>
>>>> ------------------------------------------------------------------------ 
>>>>
>>>>
>>>> _______________________________________________
>>>> Xastir-dev mailing list
>>>> Xastir-dev at xastir.org
>>>> https://krypton.hscs.virginia.edu/mailman/listinfo/xastir-dev
>>>
>>>
>>>
>>>
>>> _______________________________________________
>>> Xastir-dev mailing list
>>> Xastir-dev at xastir.org
>>> https://krypton.hscs.virginia.edu/mailman/listinfo/xastir-dev
>>
>>
>>

-- 
Gerry Creager -- gerry.creager at tamu.edu
Network Engineering -- AATLT, Texas A&M University
Office: 979.458.4020  FAX: 979.847.8578
Cell: 979.229.5301    Pager: 979.228.0173




More information about the Xastir-dev mailing list