[Xastir] New capability: 2008 Tiger Shapefile street maps (Curt, WE7U)

Jeremy Utley jerutley at gmail.com
Sat Apr 18 16:18:39 EDT 2009


On Sat, Apr 18, 2009 at 2:41 PM, Dale Seaburg <kg5lt at verizon.net> 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.  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?  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.

Jeremy, N0YAX



More information about the Xastir mailing list