[GRASSLIST:820] Re: Planning swath bathymetry surveys

David Finlayson david.p.finlayson at gmail.com
Sun Apr 23 02:11:17 EDT 2006


I tried to put together a little script to test out some ideas. Things
worked OK to a point. I ran into limits on the number of segments I
could add to a line with v.split which limits the resolution of the
resulting swath map. I also ran into problems with v.buffer which did
not buffer the lines in the way I would expect. I put together a web
page with a visual of what I mean (use the script copied below):

http://david.p.finlayson.googlepages.com/swathwidth

I would love to hear any comments on how to do this better.

---- test script ----
#!/bin/bash
# Visualize SWATH coverage from a line

LINE=survey    # A vector line
DEM=psdem2005  # An elevation raster
BEAM_MULT=3    # Beam width multiple of water depth

# Split the line into cell-sized segments (Can't do this, I get
# a out of memory error if the number of segments gets too large
EWRES=`r.info -s map=$DEM | grep ns | cut -d= -f2`
g.remove vect=temp_split
v.split input=$LINE output=temp_split length=100

# Now remove duplicate categories (for each segment) and
# renumber consecutively
g.remove vect=temp_split2
v.category input=temp_split output=temp_split2 option=del
g.remove vect=temp_split3
v.category input=temp_split2 output=temp_split3 option=add

# Attribute each line with an elevation and upload to the
# attribute table
g.remove vect=temp_drape
v.drape input=temp_split3 type=line rast=$DEM output=temp_drape

v.db.addtable temp_drape col="x double, y double, z double" layer=1
v.to.db map=temp_drape type=line option=start col=x,y,z layer=1

# Assign z value to segments from dem. Then calculate the width
# of the beam as a function of water depth and store this in a
# second (layer 2) attribute table
echo "DROP TABLE temp_drape2" | db.execute
echo "create table temp_drape2 as select cat, x, y, z, -1 * $BEAM_MULT
* z as width from temp_drape" | db.execute
echo "update temp_drape2 set width = 0 where width < 0" | db.execute
v.db.connect -o map=temp_drape table=temp_drape2 layer=1

# Buffer the line segments based on the width attribute (This doesn't
# do what I expected)
g.remove vect=temp_buff
v.buffer input=temp_drape output=temp_buff type=line layer=1
bufcol=width tolerance=0.01

# Convert to buffered vector to a raster
g.remove rast=survey_buff
v.to.rast input=temp_buff output=survey_buff use=val value=1

---- end script ----


On 4/20/06, Patton, Eric <epatton at nrcan.gc.ca> wrote:
> David,
>
> What water depths will you be working at? I ask because you can usually plan
> parallel lines in deeper water where you don't have to contend with islands,
> shoals, fishing gear, etc. We use Regulus software from ICAN as our nav
> package for swath surveys, but all it really does is plot parallel lines of
> a given length and angle orientation, (i.e. v.parallel, v.digit). For
> non-parallel survey grids, we really just digitize arbitrary survey tracks.
>
> I'm not sure if the MB-System has a survey grid making tool, maybe worth a
> check:
> http://www.ldeo.columbia.edu/res/pi/MB-System/
>
> ~ Eric.
>
>
>
>
> -----Original Message-----
> From: owner-GRASSLIST at baylor.edu
> To: David Finlayson
> Cc: GRASSLIST at baylor.edu
> Sent: 4/19/2006 11:48 PM
> Subject: [GRASSLIST:773] Re: Planning swath bathymetry surveys
>
> > Has anyone built a tool to assist in planning SWATH bathymetry surveys
> > in GRASS? Alternatively, do you know of a tool that would take
> > existing bathymetry as input and help me plan survey lines?
>
> r.transect -g, r.profile -g
> and make vector lines from result, then v.buffer?
> That way might be fairly labor intensive without a script.
> just use v.digit or QGIS digitization of lines over a DEM backdrop?
>
> how much will depth vary? (as beam width & space between tracks will
> increase with depth)
>
> "v.mkgrid angle=" might be quite useful
>
> Simrad setup or similar? digital out?
>
> For old paper Sidescan Sonar recorders + GPS track the new thin plate
> spline warping in gdalwarp has given me much better results than with
> Caris GIS or ERDAS. A few bumps along the way but in the end a pretty
> smooth process.
>
> Someone made a good free (beer) data viewer for swath data.. can't
> remember the name now :/ I'll rereply if it comes to me.
>
> Ocean Data View isn't really what you're after, but maybe useful:
>   http://odv.awi-bremerhaven.de/
>
> Also check out Bob's Tekmap website. http://www.tekmap.ns.ca/
>
>
> Hamish
>
>


--
David Finlayson




More information about the grass-user mailing list