[Xastir] Poll: GPSMan and GPS track rendering
Tom Russo
russo at bogodyn.org
Sun Dec 7 09:49:17 PST 2025
I am in the throes of refactoring the code in map_shp.c, with an eye to
improving readability, robustness, and maintainability, because we have a
couple of bugs and issues in github that will need addressing in this file,
and as it stands it's hard to touch without possibly breaking things even
if you can spot where you have to change it.
I'm currently staring at the code that handles downloaded GPS tracks. This
feature was intended to support search and rescue and other public service
events.
There is code to handle making multiple GPS tracks distinct, both with unique
labels and distinct colors. There are currently TWO ways to do this, the
very old way and the newer way.
The old way was a one-off block of code that got the label and color from the
shapefile's filename. To use it you copied the GPSMan shapefile from where
it got saved (your local '.xastir/gps' directory) to the system-wide GPS
directory and renamed it. (If you did this a lot, you could just symlink
your own .xastir/gps directory into Xastir's maps/GPS directory.) This
technique depended on the file path containing the letters "GPS".
The new way uses dbfawk just like every other shapefile Xastir supports.
Xastir now writes out a generic dbfawk file at the same time it saves the
GPSMan shapefile. To use it, you edit the dbfawk file to set the color and
label. You can then copy the shapefile components and dbfawk file anywhere
that Xastir can find it, not necessarily only the maps/GPS directory.
If a dbfawk file of the same name as the shapefile is found, the second method
is always used. The first method is only used when no dbfawk file is found.
My poll questions are these:
-----
- Do you actually use GPSMan to get GPS tracks into Xastir at all?
- If you don't use GPSMan and don't even care about getting data from
GPS units, you can ignore this poll.
- If you do:
- Do you get these tracks colored the old way, which was to move them
into the system-wide GPS directory and rename them
"<label>_<color>.shp/shx/dbf"
- Do you do it the new way, which is to move them anywhere Xastir can
find them, copying the .dbfawk that Xastir automatically creates
along with them and editing the dbfawk to set label, color, and any
other rendering attributes.
- If you DON'T use GPSMan now, but actually used to do so a lot and have
tons of GPS tracks you want to keep and display:
- do you use the old way of getting these colored and labeled?
- if you do, would you be OK with just adding DBFAWK files to keep
them rendered properly?
- If you had no idea that Xastir could get data from GPS units using
GPSMan, and think it's a cool idea that you'd actually use, will you?
- which of these two methods sounds like less of a PITA to you?
----
The reason I'm asking about this is that I think that the GPSMan feature is
already fairly niche, and I have no idea if anyone even uses it anymore. And
even if it *is* in use, having two completely different ways to get the same
job done makes the code unnecessarily kludgy and harder to maintain.
I would *like* to strip out the non-dbfawk version of GPS rendering at some
point if it wouldn't cause user pain. This is not a priority or something
that's going to happen any time soon, but it would be good to know if this
would negatively impact any current users.
--
Tom Russo KM5VY
Tijeras, NM
echo "prpv_a'rfg_cnf_har_cvcr" | sed -e 's/_/ /g' | tr [a-m][n-z] [n-z][a-m]
More information about the Xastir
mailing list