## com.bbn.openmap.image
Class ImageServerUtils

    java.lang.Object
      com.bbn.openmap.image.ImageServerUtils

All Implemented Interfaces:
  ImageServerConstants, WMTConstants

public class ImageServerUtils
extends java.lang.Object
implements ImageServerConstants

A class to contain convenience functions for parsing web image requests.

Field Summary

Fields inherited from interface com.bbn.openmap.image.ImageServerConstants
`AZIMUTH, LAT, LAYERMASK, LAYERS, LON, PAN, PROJTYPE, QUERY, RECENTER, SCALE, X, Y`

Fields inherited from interface com.bbn.openmap.image.WMTConstants
`BBOX, BGCOLOR, CAPABILITIES, CRS, EXCEPTIONS, FORMAT, GETCAPABILITIES, GETFEATUREINFO, GETMAP, HEIGHT, IMAGEFORMAT_GEOTIFF, IMAGEFORMAT_GIF, IMAGEFORMAT_JPEG, IMAGEFORMAT_PNG, IMAGEFORMAT_PPM, IMAGEFORMAT_SVG, IMAGEFORMAT_TIFF, IMAGEFORMAT_WBMP, INFO_FORMAT, MAP, QUERY_LAYERS, REQUEST, SERVICE, SRS, STYLES, TRANSPARENT, VERSION, WIDTH, WMTVER`

Constructor Summary
`ImageServerUtils()`

Method Summary
`static Proj` `createOMProjection(java.util.Properties props, Projection defaultProj)` Create an OpenMap projection from the values stored in a Properties object.
`static java.awt.Color` `getBackground(java.util.Properties props)` Create a Color object from the properties TRANSPARENT and BGCOLOR properties.
`static java.awt.Paint` `getBackground(java.util.Properties props, java.awt.Paint defPaint)` Create a Color object from the properties TRANSPARENT and BGCOLOR properties.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### ImageServerUtils

    public ImageServerUtils()

Method Detail

### createOMProjection

    public static Proj createOMProjection(java.util.Properties props,
                                          Projection defaultProj)

  Create an OpenMap projection from the values stored in a Properties object. The properties inside should be parsed out from a map request, with the keywords being those defined in the ImageServerConstants interface. Assumes that the shared instance of the ProjectionFactory has been initialized with the expected Projections.

### getBackground

    public static java.awt.Color getBackground(java.util.Properties props)

  Create a Color object from the properties TRANSPARENT and BGCOLOR properties. Default color returned is white.

  Parameters:
    `props` - the Properties containing background color information.
  Returns:
    Color object for background.

### getBackground

    public static java.awt.Paint getBackground(java.util.Properties props,
                                               java.awt.Paint defPaint)

  Create a Color object from the properties TRANSPARENT and BGCOLOR properties. Default color returned is white.

  Parameters:
    `props` - the Properties containing background color information.
    `defPaint` - the default Paint to use in case the color isn't defined in the properties.
  Returns:
    Color object for background.

Copyright (C) BBNT Solutions LLC; See http://openmap.bbn.com/ for details