GRASS logo

NAME

v.in.mbsys_fnv

DESCRIPTION

This module will import .fnv format navigation files generated by MB-System. Ship's track and swath coverage information may be imported in a number of different ways.

NOTES

Geodesic line length/swath width (in meters) is provided for the track line and scanline types, and geodesic area (in square meters) is given for the swath coverage type.

The databases for port_trk and stbd_trk line maps contain the ship's center track line lat/lon starting and ending position, not the starting and ending position of the outward beams. Positions for the start and end points of the outward beams are encoded in the map data and may be extracted with e.g. the v.to.db module.

The v.patch module can be used to group many scan lines together into the same map. See the GRASS MB-System wiki page for details and many examples.
If you want to patch the tracks together later it is suggested to extract some sort of integer from the input filename to set as the category number. GRASS vector maps must have SQL compliant names, i.e. they may not start with a number or contain characters such as "." or "-".

If attributes for all maps are stored in a central database, for example SQLite or Postgres, an assortment of SQL database queries can be made.

EXAMPLES

Here is a loop to read in all the maps listed in the datalist-1 file and import tracks and swath coverages for them. Category is simply left as an incrementing number as naming schemes will be dataset or equipment specific.
for TYPE in track swath ; do
   COUNT=0
   for TRACK in `cut -f1 -d' ' datalist-1` ; do
      COUNT=`expr $COUNT + 1`
      OUTNAME="${TYPE}_$( echo "`basename $TRACK .fnv`" | sed -e 's/[- .]/_/g' )"
      echo "Importing <$OUTNAME> ..."

      v.in.mbsys_fnv in="${TRACK}.fnv" out="$OUTNAME" type=$TYPE cat=$COUNT
   done
done
Here is an example of how you might derive a category number from the filename, in this case it is concatenating the Julian day with the hour/minute timestamp:
#FILENAME="MB2004-132-1219.xtf.fnv"
OUTNAME=track_MB2004_132_1219_xtf

CAT=`echo "$OUTNAME" | cut -f3,4 -d'_' | tr -d '_'`

# cat is now set as 1321219

SQL queries

After maps are imported SQL queries may be performed on a unified database (for example SQLite or Postgres).

Find all track files within a given bounding box on julain day 261 with a track length shorter than 500 meters:

echo "SELECT filename  FROM datalist_tracks \
   WHERE length_m < 500 AND julian_day = 261 AND \
   bbox_north <= 40.4 AND bbox_south > 40.3 AND \
   bbox_west > -73.75 AND bbox_east <= -73.5" | db.select
Find tracks shorter than 500m from a combined v.patch vector map:
db.select sql="SELECT length_m, filename, start_time \
  FROM datalist_tracks WHERE length_m < 500"

SEE ALSO

v.in.ascii
v.in.mapgen
r.in.xyz
v.patch
v.to.db


The MB-System page on the GRASS wiki site
MB-System software for multibeam and sidescan sonar processing

AUTHOR

Hamish Bowman
Dept. Marine Science
University of Otago
Dunedin, New Zealand

Last changed: $Date$


Main index - vector index - Full index

© 2003-2016 GRASS Development Team