Garmin Custom Maps

From Wildsong
Jump to navigationJump to search

A Garmin "Custom Map" is a specific format of KML Superoverlay.

The rules

From Garmin: 08/18/2014

Certain guidelines need to be followed to insure Garmin Custom Maps will display on the device. Some guidelines to remember when creating Garmin Custom Maps are:

  • More than one jpeg can preside in a kmz file.
  • The only kml file that will be processed is a doc.kml, inside the kmz file
  • Jpegs files are the only supported image type
  • Jpeg must be saved without Progressive Image (typically found under advanced option).
  • Kmz files are read from \Garmin\CustomMaps directory on both the unit's internal memory and on the SD Card.
  • Images over 1 mega pixel (1024x1024 pixels, 512x2048 pixels, etc.) will be rendered at a reduced resolution on the unit. If this is causing a problem for your map, you can split the image and use multiple jpegs inside of one kmz file.
  • Each jpeg should be less than 3MB.
  • The max number of Custom Map JPEG images that can be loaded:
    • Typically 100 for supported devices

Exceptions: Montana (500) Monterra (99) Oregon 600 series (500) GPSMAP 64 series (500)

  • The size of the jpeg files will affect the draw speed on the Garmin device
  • There is no limitation on kmz file size as long as the previous limitations are met
  • Since each kmz file will need at least one jpeg file to be a functional custom map, kmz file limitations match jpeg limitations
  • Custom Maps are enabled or disabled as a group

My observations

Derived by disassembling the free Lassen topo map.

The doc.kml file has a Region tag describing the extent of the entire set of tiles.

It has tag for each GroundOverlay file, like this:

<GroundOverlay>
  <name>lassen1_kmzA02</name>
  <Icon>
    <href>lassen1_kmzA02.jpg</href>
  </Icon>
  <LatLonBox>
    <north>40.58698654174804700</north>
    <south>40.56451703403927000</south>
    <east>-121.51911997831685000</east>
    <west>-121.54866826552562000</west>
  </LatLonBox>
  <Region>
    <LatLonAltBox>
      <north>40.58698654174804700</north>
      <south>40.56451703403927000</south>
      <east>-121.51911997831685000</east>
      <west>-121.54866826552562000</west>
    </LatLonAltBox>
    <Lod>
      <minLodPixels>64</minLodPixels>
    </Lod>
  </Region>
</GroundOverlay>

The rasters have to be in JPEG format.

Each JPEG looks like this:

 gdalinfo lassen1_kmzA01.jpg 
Driver: JPEG/JPEG JFIF
Files: lassen1_kmzA01.jpg
Size is 1024, 1024
Coordinate System is `'
Image Structure Metadata:
  COMPRESSION=JPEG
  INTERLEAVE=PIXEL
  SOURCE_COLOR_SPACE=YCbCr
Corner Coordinates:
Upper Left  (    0.0,    0.0)
Lower Left  (    0.0, 1024.0)
Upper Right ( 1024.0,    0.0)
Lower Right ( 1024.0, 1024.0)
Center      (  512.0,  512.0)
Band 1 Block=1024x1 Type=Byte, ColorInterp=Red
  Overviews: 512x512, 256x256, 128x128
  Image Structure Metadata:
    COMPRESSION=JPEG
Band 2 Block=1024x1 Type=Byte, ColorInterp=Green
  Overviews: 512x512, 256x256, 128x128
  Image Structure Metadata:
    COMPRESSION=JPEG
Band 3 Block=1024x1 Type=Byte, ColorInterp=Blue
  Overviews: 512x512, 256x256, 128x128
  Image Structure Metadata:
    COMPRESSION=JPEG