GRASS logo

NAME

r.out.gmap

DESCRIPTION

r.out.gmap outputs GRASS raster map into set of image tiles following the tiling scheme of Google Maps and Microsoft Virtual Earth.

NOTES

The r.out.gmap must be run from location with correct mercator projection used by Google Maps and Microsoft Virtual Earth. Projection can be defined using g.proj and setting the EPSG code to esri.extra/900913 or by setting the proj4 parameters to
+proj=merc +lat_ts=0.0000000000 +lon_0=0.0000000000 +k_0=1.00000 00000 +x_0=0 +y_0=0 +no_defs +a=6378137 +b=6378137
for PROJ4 library version 4.6.0 and later. For PROJ4 library version 4.5.0, the following definition should be used instead:
+proj=merc +lat_ts=0.0000000000 +lon_0=0.0000000000 +k_0=1.00000 00000 +x_0=0 +y_0=0 +no_defs +a=6378137 +b=6378137 +nadgrids=@null

To publish the html code (using the -h flag) on internet, the Google Maps API key (line key=abcdefg in html file) has to be replaced by site specific key

Be careful when using n,s,e,w parameters, these should be set in the geographical coordinates (lat/lon).

EXAMPLE

Export of the map elevation.dem from current mapset at the zoom level 10. The output is written to the default googlemap directory:
r.out.gmap input=elevation.dem zoom=10 

Export of the map elevation.dem from mapset srtm location wgs84 at zoom level 9. Map export is restricted to specified extent. Output is written to mytiles directory. Example of google map html file with implemented tiles is created:

r.out.gmap input=elevation.dem location=wgs84 mapset=srtm zoom=9 w=8.5 e=9.75 s=41.25 n=43 outdir=mytiles -hm

REFERENCES

PROJ4 library

Google Map API

SEE ALSO

g.proj

AUTHOR

Tomas Cebecauer
Read more in the OSGeo Journal Volume 5 (2008)

Last changed: $Date$


Main index - raster index - Full index

© 2003-2016 GRASS Development Team