Export for GpsDrive: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
(→‎About this page: new wiki online)
 
(3 intermediate revisions by the same user not shown)
Line 2: Line 2:


''GpsDrive's wiki is down so in addition to information about how to use the d.out.gpsdrive module, this page will temporarily include some GDAL and datasource tips not directly related to GRASS. Once the page is fully (re)composed the GpsDrive specific content will move from here into a README file in the GpsDrive SVN. Sorry for any inconvenience, --HB''
''GpsDrive's wiki is down so in addition to information about how to use the d.out.gpsdrive module, this page will temporarily include some GDAL and datasource tips not directly related to GRASS. Once the page is fully (re)composed the GpsDrive specific content will move from here into a README file in the GpsDrive SVN. Sorry for any inconvenience, --HB''
'''Update: [https://apps.sourceforge.net/mediawiki/gpsdrive/ new GpsDrive wiki is now online at SourceForge]


:: [http://hamish.bowman.googlepages.com/ambrose_gpsdrive.png/ambrose_gpsdrive-full;init:.png http://hamish.bowman.googlepages.com/ambrose_gpsdrive.png/ambrose_gpsdrive-large.png]<BR>''GpsDrive with downloaded NOAA BSB Navigation Chart #12326,<BR>"Approaches to NY Harbor", processed with gdalwarp and gdal_slice.sh''
:: [http://hamish.bowman.googlepages.com/ambrose_gpsdrive.png/ambrose_gpsdrive-full;init:.png http://hamish.bowman.googlepages.com/ambrose_gpsdrive.png/ambrose_gpsdrive-large.png]<BR>''GpsDrive with downloaded NOAA BSB Navigation Chart #12326,<BR>"Approaches to NY Harbor", processed with gdalwarp and gdal_slice.sh''
Line 56: Line 59:
=== Using d.out.gpsdrive ===
=== Using d.out.gpsdrive ===


* Import ENC vector data with v.in.ogr
* Import S-57 ENC vector data with v.in.ogr
* Import BSB raster chart scan with r.in.gdal
: See the [[S-57 data]] wiki page for more information
* Display selected layers and overlays in an xmon (d.* modules)
* Import BSB raster RNC chart scan with r.in.gdal
: See the [[BSB data]] wiki page for more information
 
* Display selected layers and overlays in an xmon (d.* modules) and zoom to desired area
* Export with d.out.gpsdrive
* Export with d.out.gpsdrive
: See example in the [http://grass.osgeo.org/grass63/manuals/html63_user/d.out.gpsdrive.html d.out.gpsdrive help page]
: See the [http://grass.osgeo.org/grass63/manuals/html63_user/d.out.gpsdrive.html d.out.gpsdrive help page]
d.out.gpsdrive output=tile_name


=== Using gpsfetchmap.pl ===
=== Using gpsfetchmap.pl ===

Latest revision as of 10:24, 3 November 2008

About this page

GpsDrive's wiki is down so in addition to information about how to use the d.out.gpsdrive module, this page will temporarily include some GDAL and datasource tips not directly related to GRASS. Once the page is fully (re)composed the GpsDrive specific content will move from here into a README file in the GpsDrive SVN. Sorry for any inconvenience, --HB

Update: new GpsDrive wiki is now online at SourceForge


http://hamish.bowman.googlepages.com/ambrose_gpsdrive.png/ambrose_gpsdrive-large.png
GpsDrive with downloaded NOAA BSB Navigation Chart #12326,
"Approaches to NY Harbor", processed with gdalwarp and gdal_slice.sh


TODO

  • Incorporate info from the gpsdrive man page
  • Incorporate info from mailing list howto posts
  • Incorporate info from the d.out.gpsdrive help page

About GpsDrive

"GpsDrive is a car (bike, ship, plane) navigation system. GpsDrive displays your position provided from your GPS receiver on a zoomable map. The maps are autoselected for best resolution depending of your position and can be downloaded from the Internet. Speech output is supported if the "festival" software is running. All GPS receivers supported by gpsd should be usable.
GpsDrive is written in C with use of the GTK+ toolkit under the GPL license, and runs with Linux, Mac OSX, and FreeBSD."


Creating maps

GpsDrive tile format

(d.out.gpsdrive should take care of this for you)

File format

  • Common image format (Tiff, PNG, JPEG, ...) of size 1280x1024

Map registration

The map name, center coordinate, and map scaling parameter are saved in the map index file: ~/.gpsdrive/map_koord.txt

  • map_* maps
  • top_* maps
Important! The maps must be named "map_*" for UTM-like projections
(lat:lon = 1:cos(lat)) and "top_*" for lat/lon Plate carree projection
(lat:lon = 1:1). The prefix is given so that gpsdrive knows how to
scale the maps correctly. Alternatively the maps can be stored without
prefix in subdirectories of $HOME/.gpsdrive/ which end in "_map" or
"_top".


How to calculate the scaling factor
meters_per_pixel * 2817.947378

Perhaps 2817 was someone's monitor DPI converted to pixels/meter??

Using d.out.gpsdrive

  • Import S-57 ENC vector data with v.in.ogr
See the S-57 data wiki page for more information
  • Import BSB raster RNC chart scan with r.in.gdal
See the BSB data wiki page for more information
  • Display selected layers and overlays in an xmon (d.* modules) and zoom to desired area
  • Export with d.out.gpsdrive
See the d.out.gpsdrive help page
d.out.gpsdrive output=tile_name

Using gpsfetchmap.pl

  • ...

Using gdal_slice.sh

  • Make sure that GDAL can read the format,
gdalinfo filename.ext

Check installed GDAL supported formats:

gdalinfo --formats

If the GDAL webpage says that the format is supported but you can't seem to access it, check that your copy of GDAL was built with support for it. You may have to rebuild GDAL yourself with the switch for that format enabled.

  • If GDAL can read the format, but it is not georeferenced, you will have to take care of that first. You should see some information about the coordinate system used and the lat/lon coordinates of the four corners of the map. See the #Georefencing section of this page.
  • edit the filename information at the top of the script
  • run the script (make sure you have execute permission set on the file)
./gdal_slice.sh
  • move the files into your ~/.gpsdrive/ directory and merge in the registration information into the ~/.gpsdrive/map_koord.txt file.

Examples

BSB Softcharts

work in progress, see mailing list posting linked at the end of this page

  • Download free BSB charts from NOAA
  • Check with gdalinfo
  • Modify gdal_slice.sh
  • Run gdal_slice.sh
  • move tiles and map registration info into ~/.gpsdrive

Using GRASS GIS's d.out.gpsdrive


Data sources

Worldwide / Generic

Online MapServers

  • OpenStreeMap.org
  • gpsfetchmap.pl:
    • Google Maps
    • source2...
    • source3...
    • source4...


GIS data

Using GDAL and OGR
  • GDAL homepage
  • gdal_slice.sh - script to chop up a georeferenced raster image in any supported GDAL format to GpsDrive tiles

Navigation data

  • Generic S-57 ENC format

Other WMS servers

  • idea: build generic WMS support into gpsfetchmap.pl by hacking current code or using GDAL 1.5.0's WMS import tool.
Advantage: you can specify target tile size (1280x1024) directly in the request; simpler with fewer steps (ie doesn't require any heavy lifting with GRASS).
  • Use GRASS's r.in.wms module to load into GRASS, then run d.out.gpsdrive


Canada

Terrestrial data

(if possible, try to find Tiff format, hopefully they will be GeoTiffs)


  • Pat found good, free topo maps and nav charts (boat maps) for Canada.

Browse to find the data block from: http://toporama.cits.rncan.gc.ca/toporama_en.html

and then download the GeoTIFF for that block from: http://ftp2.cits.rncan.gc.ca/pub/canmatrix/50k_300dpi/031/e/

That may be in lat/lon with the NAD83 datum. For correctness's sake you could convert that to WGS84 first using gdalwarp. (GPSs typically provide fixes in WGS84) But as the difference between NAD83 and WGS84 are so minor (NAD83 uses the GRS80 ellipsoid) the error is likely to be much less than the distance covered by the pixel width, so not worth the trouble. (?)

Finally, create GpsDrive tiles with the gdal_slice.sh script.

Nautical data

  • ...


United States

Terrestrial data

  • Libremap has
    • 24k scale USGS DRG's - detailed topographic maps for all 50 states.
    • SVG boundary border files for all US states (including state, county, and town boundaries)
  • OpenStreetMap.org has imported all US roads into their database from the US's TIGER dataset.

Nautical data

NOAA ENC and BSB Navigational Charts

See these mailing list posts for more detail:
http://thread.gmane.org/gmane.comp.linux.gps/3920/focus=3937
http://thread.gmane.org/gmane.comp.linux.gps/3920/focus=3934
  • NOAA S-57 format vector data (ENC)
http://nauticalcharts.noaa.gov/mcd/enc/download.htm
  • NOAA BSB format raster data (RNC)
http://nauticalcharts.noaa.gov/mcd/Raster/download.htm
  • Nice previews / chart picker:
http://www.oceangrafix.com/o.g/search-nautical-charts.html