[Xastir] pos file

Tom Russo russo at bogodyn.org
Thu May 21 15:49:21 EDT 2009


On Thu, May 21, 2009 at 11:49:12AM -0700, we recorded a bogon-computron collision of the <archer at eskimo.com> flavor, containing:
> On Thu, 21 May 2009, Keith Kaiser wrote:
> 
> > I'm working in a bike ride Sunday the 31st and I was sent a .pos file. I was 
> > told it could be loaded into UiView or Xastir but I'm not sure how.
> >
> > It looks like this;
> >
> > *Lone Star Century May 31 2009
> > A1!3851.26N/09453.59W/ 151st & New Century Parkway
> > A2!3851.28N\09454.55Wa 151st & Moonlight Rd
> >
> > Is all I need to do is convert it to look like this to make it work with 
> > Xastir?
> >
> > ;A1*311530z3851.26N/09453.59Wh151st & New Century Parkway
> > ;A2*311530z3851.28N/09454.55Wa151st & Moonlight Rd
> 
> You've got the right idea but I'd have to look in the spec to see
> the exact format, or turn off compressed objects and create a few,
> then look in the file.

Careful.  Object format always has 9 character names, padded with spaces on the
right.  So you'd do:

;A1       *311530z3851.26N/09453.59Wh151st & New Century Parkway

Otherwise, it does look like this approach would work, with the caveat that
Curt has provided:

> Be aware that creating objects in the manner you're describing will
> cause Xastir to own them and therefore try to transmit them unless
> you turn off object/item transmit on the Interface menu.

Indeed, only use the object.log thing if you want to beacon those objects
or are willing to disable object transmission completely.  For an event like
this, beaconing the points might be desirable to get all the displays in 
sync, though, and only require one station to have the data file.

Another approach that would make a strictly local map without beaconing 
the points would be to use the technique described under 
"Rolling your own shapefiles" in README.MAPS (point 4)
The pos format is pretty simple and a simple script could generate the 
necessary "dbfadd" and "shpadd" commands.   You'd to have the shpcreate,
dbfcreate, shpadd, and dbfadd programs from shapelib installed.  I don't think 
most binary packages do that so you might have to go get the source code and 
build them separately.  But assuming you have them, you could make a shapefile 
for the two examples above with:

 shpcreate lsc31May09 point
 dbfcreate lsc31May09 -n ID 8 0 -s CFCC 3 -s NAME 30
 shpadd lsc31May09 -94.8931666 38.8543333
 dbfadd lsc31May09 1 'X/W ' 'A1'
 shpadd lsc31May09 -94.9091666 38.8546666
 dbfadd lsc31May09 2 'X/W ' 'A2'

and so forth.  This would create a shapefile and associated dbf file called 
"lsc31May09.shp" and Xastir would use the "tgrlpt.dbfawk" file to render the 
points -- when Alan Crosswell set up that dbfawk for the old ESRI TIGER 
landmark point file, he added a non-tiger feature where if "CFCC" started with 
X (not used by TIGER) then the next three characters are interpreted as an APRS 
symbol/overlay string.     You could always use a different dbfcreate
line to create a dbf file with more information in it (such as a comment field
to contain "151st & New Century Parkway"), but then you'd have to write your
own dbfawk file to match it.

-- 
Tom Russo    KM5VY   SAR502   DM64ux          http://www.swcp.com/~russo/
Tijeras, NM  QRPL#1592 K2#398  SOC#236        http://kevan.org/brain.cgi?DDTNM
  In some cultures what I do would be considered normal. 
                                  -- Ineffective daily affirmation 




More information about the Xastir mailing list