[Xastir] New capability: 2008 Tiger Shapefile street maps (Dale Seaburg)

Dale Seaburg kg5lt at verizon.net
Sun Apr 19 17:44:49 EDT 2009


On Apr 18, 2009, at 6:54 PM, Dale Seaburg wrote:

>>
>> On Apr 18, 2009, at 1:11 PM, Jeremy Utley wrote:
>>
>>> On Sat, Apr 18, 2009 at 5:07 AM, Curt, WE7U <archer at eskimo.com>  
>>> wrote:
>>>>
>>>> ? ?vi ~/.xastir/config/map_index.sys
>>>> ? ?:g/tabblock/s/01000/00995/
>>>> ? ?:g/pointlm/s/01000/00996/
>>>> ? ?:g/arealm/s/01000/00997/
>>>> ? ?:wq
>>>>
>>>> (Who's a "sed" user? ?Give us some commands to do the same thing in
>>>> sed please! ?Commands should be similar but can then be scripted.)
>>>
>>>
>>> Curt - try out something like this:
>>>
>>> sed -i -e "/tabblock/s/01000/00995/g" \
>>> ? ? ? ? -e "/pointlm/s/01000/00996/g" \
>>> ? ? ? ? -e "/arealm/s/01000/00997/g" map_index.sys
>>>
>>>
>>> If I remember my seddish correctly, that should do it. ?Note this
>>> would require GNU sed for the -i parameter (in place) - with  
>>> other sed
>>> binaries, you'd need something more like this:
>>>
>>> cp map_index.sys mapindex.sys.bak
>>> sed -e "/tabblock/s/01000/00995/g" \
>>> ? ? ? ? -e "/pointlm/s/01000/00996/g" \
>>> ? ? ? ? -e "/arealm/s/01000/00997/g" map_index.sys.bak >  
>>> map_index.sys
>>>
>>>
>>> Someone please try this out and see if it works like it should!
>>
>>
>> The second one worked for me, Jeremy. ?Because of my font in the  
>> Macbook
>> email client I use (grrrr), it wasn't clear that you need a space  
>> between
>> the last double-quote and the backslash of each line. ?That should  
>> have been
>> obvious, but was once I got an error! ?Most reflectors require  
>> plain text vs
>> rich-text-font (rtf). ?I have tried making some of my commands in  
>> Courier or
>> Courier New (like these), so the fixed-width fonts take the  
>> guesswork out of
>> proper spacing, etc. ?But, the email client I use requires me to  
>> send in rtf
>> when I specify a fixed-width font. ?So, I'm not sure if they come  
>> through
>> the reflector that way.
>>
>> 73 - Dale. ?KG5LT
>
> Thanks Dale.  I'm not surprised on Mac you'd have to use the second
> version - the -i flag to sed is a GNU-specific flag, so would probably
> only work on Linux or OpenSolaris - software that uses a GNU
> User-land.  The second invocation is not as clean, since it leaves the
> bak file hanging around, but it has the advantage of working
> everywhere.

Actually, when I tested, I was on a Linux PC, not the Macbook.  I use  
the Macbook strictly for email, websurfing (mostly) and portability.   
It stays strictly OS-X.  It could be that without the spaces (dummy  
me), I got an error with your first version.

> Did you by chance compare the resulting file with one
> done the old way, to ensure my command does the same thing as the vim
> :g commands?

Yes, I did.  I renamed the map_index.sys to something else, had  
xastir rebuild it fresh, then applied the "sed" technique.  Then,  
entered xastir again.  It worked perfectly.

> I'm pretty sure vim's :g does the same thing as the g at
> the end of the sed expression - in fact, the way I usually do global
> search/replace in vim is ":%s/foo/bar/g".
>
> I'm currently working on a new Xastir install on my desktop right now
> - so I might try out using the newer tiger files on this build.

I added one more line to the 3-line layer adjustment technique.  It  
allows the cousub,dbfawk and cousub00.dbfawk files to place the town/ 
city names (census docs refer to the name as a subdivision name)  
within a county over all other features.  I was experiencing the  
names being overlaid by roads (in particular) when the name and road/ 
feature crossed.  Here it is:

-e "/cousub/s/01000/01001/g"

73 - Dale.  KG5LT






More information about the Xastir mailing list