Export for GpsDrive: Difference between revisions

From GRASS-Wiki
Jump to navigation Jump to search
No edit summary
Line 53: Line 53:
Perhaps 2817 was someone's monitor DPI converted to pixels/meter??
Perhaps 2817 was someone's monitor DPI converted to pixels/meter??


=== Data sources ===
=== Using gpsfetchmap.pl ===
 
=== Using gdal_slice.sh ===
 
* Get the [http://hamish.bowman.googlepages.com/gpsdrivefiles#tiles gdal_slice.sh] script
 
* 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.


==== Online MapServers ====
=== Using GRASS GIS's d.out.gpsdrive ===
 
* The [http://grass.osgeo.org/grass63/manuals/html63_user/d.out.gpsdrive.html d.out.gpsdrive help page]
 
 
 
== Data sources ==
 
=== Online MapServers ===


* gpsfetchmap.pl:
* gpsfetchmap.pl:
Line 63: Line 85:
** source4...  
** source4...  


==== GDAL and OGR ====
=== GIS data ===
 
==== Using GDAL and OGR ====


* [http://gdal.osgeo.org GDAL homepage]
* [http://gdal.osgeo.org GDAL homepage]
Line 71: Line 95:
** [http://www.gdal.org/ogr/ogr_formats.html supported OGR vector formats]
** [http://www.gdal.org/ogr/ogr_formats.html supported OGR vector formats]


==== Navigation data ====
=== Navigation data ===


* NOAA ENC and BSB data
* NOAA ENC and BSB data
Line 78: Line 102:
* Generic S-57 ENC format
* Generic S-57 ENC format


==== Other WMS servers ====
=== 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.
* idea: build generic WMS support into gpsfetchmap.pl by hacking current code or using GDAL 1.5.0's WMS import tool.
Line 84: Line 108:


* Use GRASS's r.in.wms module to load into GRASS, then run d.out.gpsdrive
* Use GRASS's r.in.wms module to load into GRASS, then run d.out.gpsdrive
=== Using gpsfetchmap.pl ===
=== Using gdal_slice.sh ===
* Get the [http://hamish.bowman.googlepages.com/gpsdrivefiles#tiles gdal_slice.sh] script
* 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.
=== Using GRASS GIS's d.out.gpsdrive ===
* The [http://grass.osgeo.org/grass63/manuals/html63_user/d.out.gpsdrive.html d.out.gpsdrive help page]

Revision as of 05:39, 11 March 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

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

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 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.

Using GRASS GIS's d.out.gpsdrive


Data sources

Online MapServers

  • 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

  • NOAA ENC and BSB data
See mailing list posts
  • 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