[Xastir] Mapshots shapefiles

Scott Nolde N4CI kd5zef at gmail.com
Thu Jan 3 10:54:14 EST 2008


I've recently begun my APRS experience with APRS and XASTIR on FreeBSD
and have found it quite fun.  While not difficult to configure, I've
been able to use shapefiles from Mapshots.com.  Well, mapshots will
provide files for each county for each state, meaning that if I needed
then entire state of GA on my xastir map to show I'd have to download
159 individual files!

For future reference, I've simplified the downloading of the mapshots
data by doing the following for Georgia:
for number in `jot 321 1 | awk '{printf "%03d \n", $1}'`; \
do fetch http://www.mapshots.com/ftp/tiger/Georgia/TGR13$number.zip; \
done

The 321 comes from the (alphabetically) last file in the mapshots
Georgia county dropdown list and is the FIPS county code.  The TGR13
is a tiger map for the (alphabetically) thirteenth state, and is the
FIPS state code.  The above command will download all the files for GA
that mapshots has to offer.

Each zipped file from mapshots has several layers in it (county lines,
roads, minor roads, etc...) which I've separated into the layers with
the following commands in a script:
for f in `ls TGR*.zip`; do unzip -qo $f "*lkA.*" -d roads/.; done
for f in `ls TGR*.zip`; do unzip -qo $f "*lkB.*" -d roads_minor/.; done
for f in `ls TGR*.zip`; do unzip -qo $f "*lkC.*" -d paths/.; done
for f in `ls TGR*.zip`; do unzip -qo $f "*lkH.*" -d rivers/.; done
for f in `ls TGR*.zip`; do unzip -qo $f "*wat.*" -d water/.; done
for f in `ls TGR*.zip`; do unzip -qo $f "*dcu.*" -d polit_subs/.; done
for f in `ls TGR*.zip`; do unzip -qo $f "*ycu.*" -d city_bound/.; done
for f in `ls TGR*.zip`; do unzip -qo $f "*urb.*" -d urban/.; done

And when you're done with that, perhaps you'd like to remove the zip files.

By separating the layers into different subdirectories, I've been able
to turn on each layer at will after indexing the maps at startup.
(Side thought: Perhaps there's a way to combine the 159 or so files in
each layer into a single file?  That would make indexing much faster.)

The layer with roads and political subdivisions is particularly handy.
 However, I haven't made maps from google maps (yet) but have found
doing the above is rather time-efficient for the desired states.
Also, I don't have available resources for other, more colorful, map
resources.  Perhaps in the future I'll look into it.

But in my short time with xastir, I do enjoy it and I've learned quite
a bit about APRS and digipeating and have hade a few QSOs both inside
and outside my ALOHA radius.

If someone has other good map making ideas, please feel free to
respond, I'm willing to learn more!  Maybe I'm reinventing the wheel,
but I've been having fun doing so.


73,
Scott, N4CI



More information about the Xastir mailing list