AltusRaster

The AltusRaster program converts raster imagery in a variety of formats to tiles that can be consumed by the Altus Mapping Engine, or by the AltusPackage program which can create offline map packages from raster tiles.

Requirements

AltusRaster requires:

  • Installation of the GDAL library
  • Source imagery must be in 4-band (RGBA) format

You can determine your raster data format using this gdal command:

gdalinfo myimage.tif
If you see something like this:
Band 1 Block=16867x1 Type=Byte, ColorInterp=Red
  Mask Flags: PER_DATASET ALPHA 
Band 2 Block=16867x1 Type=Byte, ColorInterp=Green
  Mask Flags: PER_DATASET ALPHA 
Band 3 Block=16867x1 Type=Byte, ColorInterp=Blue
  Mask Flags: PER_DATASET ALPHA 
Band 4 Block=16867x1 Type=Byte, ColorInterp=Alpha

Then your image is in 4-band RGBA format and will work with AltusRaster.

Otherwise you can convert it to 4-band format with a command like this:

gdal_translate -expand rgba -co COMPRESS=LZW myimage.tif myimageRGBA.tif

Example: FAA VFR Sectional

  • Download an FAA VFR Sectional chart here.
  • Let's assume you download the Charlotte sectionall.
  • Unzip the zip file provided by the FAA.
  • Execute this command to expand the enclosed GeoTIFF to RGBA format:
    gdal_translate -expand rgba -co COMPRESS=LZW Charlotte\ SEC\ 99.tif CharlotteRGBA.tif
  • Execute this command to have AltusRaster create tiles:
    AltusRaster -lk YOUR_LICENSE_KEY -i CharlotteRGBA.tif -of ./mytiles -ml 11

Errors

If you see an error like this:
Error: This file is not in RGBA format. Please convert it to RGBA.
For example: gdal_translate -of vrt -expand rgba Charlotte SEC 99.tif Charlotte SEC 99.tif_RGBA.vrt
Then re-run AtlusRaster using the converted file.

This is an indication the source image is not in RGBA format.

AltusRaster Command Line

AltusRaster v2.0.ut-2153-g60764257e
AltusRaster - Raster tile creator. Copyright (c) 2016 BA3, LLC. ALL RIGHTS RESERVED.
USAGE: AltusRaster [OPTIONS]
OPTIONS:
-border, --border_size ARG           Define a stitching border in pixels.
                                     Defaults to 0.
-cs, --cache_size ARG                Maximum amount of memory, in gigabytes, for
                                     in-memory cache during processing. The
                                     default is 2GB.
-fa, --filtering_algorithm ARG       Filtering algorithm. Default is bilinear.
                                     Can be one of: nearest, bilinear, cubic,
                                     cubicspline, lanczos, average.
-h, --help ARG                       Display usage instructions.
-i, --input_file ARG                 Input file
-lk, --license_key ARG               Commercial-use license key. (i.e.
                                     "01234567-0123-0123-0123-012345678901")
-maxX, --maximum_x ARG               East-most edge of output map data.
-maxY, --maximum_y ARG               Northern-most edge of output map data.
-minX, --minimum_x ARG               West-most edge of output map data.
-minY, --minimum_y ARG               Southern-most edge of output map data.
-ml, --max_level ARG                 Maximum level to generate. If not
                                     specified, the optimum level will be
                                     computed automatically.
-mps, --meters_per_sample ARG        An alternative way of controlling to what
                                     'depth' data is created. This is especially
                                     useful if you have over polar regions
                                     coming from EPSG:4326 projections. Use this
                                     instead of maximum level (-ml) when you
                                     have data that covers the poles. For
                                     example, if you have an image that spans
                                     the planet, and you desire to go to the
                                     maximum resolution of your source data,
                                     divide the circumference of the Earth in
                                     meters at the equator by the pixel width of
                                     your image. If you have an image that is
                                     40,008,000 pixels wide, the math would look
                                     like this: 40,008,000 / 86,000 = 465. You
                                     would therefore use a meters-per-sample
                                     setting of 465 to ensure that the full
                                     resolution of your data is used.
-of, --output_folder ARG             Output folder (i.e. /maps/mapdata)
-shell, --use_shell                  Forward operations gdal utility programs
                                     like gdalwarp.
-sl, --start_level ARG               Starting level to begin at.
-ts, --tile_size ARG                 The width and height for tiles. Default is
                                     256.
-us_bounds, --united_states_bounds   Use continental United States bounds.
EXAMPLES:
Command line usage:
==================
AltusRaster -i MyMaps/MyMap.vrt -of MyTiles/MyMapTiles -fa cubic
This will generate a tile tree to the optimum depth of the source data 
resolution and create 256x256 tiles using bi-cubic sampling of the source data.
Note: Source data should be in RGBA format and in a non-rotated projection.
The program will will issue errors if the source data or projection are not supported.
AltusRaster v2.0.ut-2153-g60764257e Copyright (c) 2016 BA3, LLC. ALL RIGHTS RESERVED.
Built from commit: 60764257e4ba51dd571dee9d649af206c6fe58ff

AltusMappingEngine Server v2.0.ut.2153.g60764257e master

COPYRIGHT (C) 2017, BA3, LLC ALL RIGHTS RESERVED