DESCRIPTION

d.out.gpsdrive exports the current GRASS display monitor to a GpsDrive compatible backdrop image and updates the GpsDrive image list with the appropriate geo-referencing information.

Use at your own risk. Do not use for navigation. This software comes with absolutely no warranty.

NOTES

Maps are saved in the user's ~/.gpsdrive directory. Geo-referencing information is added to the user's ~/.gpsdrive/map_koord.txt file.

GpsDrive assumes northings are not rotated compared to true-geographic north. If you are using a projection with significant curvature away from the central meridian, or a map datum with a significant rotational component, then you will likely end up with a distorted or inexact background map! Keeping the area small will lessen the error, but not eliminate it.

Best output is created from a Lat/Lon location or by keeping the output area small (1:50,000). This translates to approx a 22.7km x 18.2km image window in the GIS. [x_ext=scale*(1280/2817.95)]

For your convenience (calculations are rough, but nominal):

1:50,000 uses a region 22.7km x 18.2km.
1:75,000 uses a region 34.1km x 27.3km.
1:100,000 uses a region  45.4km x 36.3km.
1:175,000 uses a region  79.5km x 63.6km.

Maps exported from lat-lon locations will be given a "top_" prefix. Maps exported from locations of other projections will be given a "map_" prefix. This is done so GpsDrive knows how to scale the image correctly.

GpsDrive requires backdrop images to be 1280x1024 pixels in size. While this script takes care of that automatically, to avoid annoying bands on the sides of your image you may want to set up your display monitor at half-scale (same aspect ratio) and use d.zoom to select the full frame. For example:

export GRASS_WIDTH=640
export GRASS_HEIGHT=512
d.mon x0

Map scaling is set from the region settings so should work correctly even when the display's aspect ratio does not match that of the output image.

It may be desirable to create a series of image tiles covering a large area. An easy way to do this is to run d.out.gpsdrive in a shell loop. Here are some ideas to get you started: (contribution of full code welcome!)

#get region width and height (in map units)
eval `g.region -ge`

# shift the region by that amount
g.region e=e+$ew_extent w=w+$ew_extent
d.out.gpsdrive tile_${i}_${j}
i=`expr $i + 1`
etc.

To get a smoother transition between backdrop maps it may be better to create tiles which overlap every half or 2/3's of the region's extent:

ew_extent2=`echo $ew_extent | awk '{printf("%f", $1 / 2. )}'`
g.region e=e+$ew_extent2 w=w+$ew_extent2


SEE ALSO

d.info, d.grid, d.out.file, d.out.png, d.save, g.region, v.in.garmin

The GRASS PNG driver
The GpsDrive project
The gpsd personal GPS server project

AUTHOR

Hamish Bowman
Department of Marine Science
University of Otago
New Zealand


Last changed: $Date$