ÐÐÐСÐÐÐÐ d.out.gpsdrive exports the current GRASS display monitor to a [1]GpsDrive compatible backdrop image and updates the GpsDrive image list with the appropriate geo-referencing information. Use at your own risk. Do not use as a primary means of navigation. This software comes with absolutely no warranty. ÐÐ ÐÐÐЧÐÐÐЯ Maps are saved in the user's ~/.gpsdrive directory. Geo-referencing information is added to the user's ~/.gpsdrive/map_koord.txt file. JPEG output requires the pngtopnm and pnmtojpeg programs from the [2]NetPBM tools. 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. Batch export 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 is an example Bash script contributed by Manuel Morales: #!/bin/bash # map scale is determined by "panels" by dividing the N-S # region extent into that number of maps. Note that the # generated maps overlap by 1/2 along the N-S axis and by # approximately 1/2 along the E-W axis. panels=3 iter=$((panels*2-1)) eval `g.region -eg` eval `g.region -g` north=$n south=$s west=$w east=$e unit_ns=$(echo "scale=8; $ns_extent / $panels" | bc) unit_ew=$(echo "scale=8; $unit_ns * 4/3" | bc) panels_ew=$(echo "((2*$ew_extent / $unit_ew +.5 ) -1) / 1" | bc) for i in `seq 1 $panels_ew`; do east=$(echo "scale=8; $west+$unit_ew" | bc) for j in `seq 1 $iter`; do g.region n=$(echo "scale=8; $north-($j-1) * $unit_ns/2" | bc) \ s=$(echo "scale=8; $north-($j-1) * $unit_ns/2-$unit_ns" | bc ) \ w=$west e=$east ewres=$ewres nsres=$nsres d.redraw d.out.gpsdrive -j tile_${i}_${j} done shift_west=$(echo "scale=8; ($ew_extent-$unit_ew)/($panels_ew-1)" | bc) west=$(echo "scale=8; $west+$shift_west" | bc) done Note that to get a smoother transition between backdrop maps this script creates overlapping tiles. СÐ. ТÐÐÐÐ [3]d.info, [4]d.grid, [5]d.out.file, [6]d.out.png, [7]d.save, [8]g.region, [9]v.in.garmin The GRASS [10]PNG driver The [11]GpsDrive project The [12]gpsd personal GPS server project ÐÐТÐÐ Hamish Bowman Department of Marine Science University of Otago New Zealand Last changed: $Date: 2007-09-25 19:12:40 -0500 (ÐÑ, 25 Ñен 2007) $ ÐвÑÐ¾Ñ Ð¿ÐµÑевода References 1. http://www.gpsdrive.de/ 2. http://netpbm.sourceforge.net/ 3. file://localhost/root/tmp/2/fin/d.info.html 4. file://localhost/root/tmp/2/fin/d.grid.html 5. file://localhost/root/tmp/2/fin/d.out.file.html 6. file://localhost/root/tmp/2/fin/d.out.png.html 7. file://localhost/root/tmp/2/fin/d.save.html 8. file://localhost/root/tmp/2/fin/g.region.html 9. file://localhost/root/tmp/2/fin/v.in.garmin.html 10. file://localhost/root/tmp/2/fin/pngdriver.html 11. http://www.gpsdrive.de/ 12. http://gpsd.berlios.de/