Class Shape3DHandler

java.lang.Object
sec.web.renderer.Shape3DHandler

public class Shape3DHandler extends Object
Responsible for generating the KML for all 3D shapes. This
Author:
stephen.pinizzotto
  • Field Details

  • Constructor Details

    • Shape3DHandler

      public Shape3DHandler()
  • Method Details

    • render3dSymbol

      public static String render3dSymbol(String name, String id, String shapeType, String description, String lineColor, String fillColor, String altitudeMode, String controlPoints, SymbolModifiers attributes)
      Generates the KML for a 3D symbol. Symbol should include the all the attributes and information required by the KML for output.
      Parameters:
      name - The user displayed name for the symbol. Users will use this to identify with the symbol.
      id - An internally used unique id that developers can use to uniquely distinguish this symbol from others.
      shapeType - A 15 character ID of the type of symbol to draw.
      description - A brief description of what the symbol represents. Generic text that does not require any format.
      lineColor - The line color of the graphic
      fillColor - The fill color of the graphic
      altitudeMode - Indicates whether the symbol should interpret altitudes as above sea level or above ground level. Options are "relativeToGround" (from surface of earth), "absolute" (sea level), "relativeToSeaFloor" (from the bottom of major bodies of water).
      controlPoints - The vertices of the shape. The number of required vertices varies based on the shapeType of the symbol. The simplest shape requires at least one point. Shapes that require more points than required will ignore extra points. Format for numbers is as follows:

      "x,y,z [x,y,z ]..."
      attributes - A JSON A JSON array holding the parameters for the shape. Attributes should be of the following format:

      {"attributes":[{"attribute1":value,...},{[optional]]}
      Returns:
      A KML string that represents a placemark for the 3D shape
    • buildPolygon

      public static String buildPolygon(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes)
      Builds a 3d Polygon with elevation.
      Parameters:
      controlPoints -
      attributes -
      Returns:
    • buildCylinder

      public static String buildCylinder(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes)
      Builds a cylinder given a point. Can also apply a radius size and an altitude for lower and upper boundaries.
      Parameters:
      controlPoints -
      attributes -
      Returns:
    • buildKml

      public static String buildKml(String[] coords, String id, String name, String lineColor, String fillColor)
    • buildOrbit

      public static String buildOrbit(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes)
      Build an Orbit graphic.
      Parameters:
      controlPoints -
      attributes -
      Returns:
    • buildRadarc

      public static String buildRadarc(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes)
      Builds the Radarc graphic
      Parameters:
      controlPoints -
      attributes -
      Returns:
    • buildPolyArc

      public static String buildPolyArc(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes)
      Builds the PolyArc graphic
      Parameters:
      controlPoints -
      attributes -
      Returns:
    • buildRoute

      public static String buildRoute(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes)
      Builds a route graphic.
      Parameters:
      controlPoints -
      attributes -
      Returns:
    • buildCake

      public static String buildCake(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes)
      Builds a cake graphic--multiple radarcs stacked on top of each other.
      This graphic can take up to 6 attributes. "radius1" is the max radius, "radius2" is the min radius, "minalt", "maxalt", "leftAzimuth", and "rightAzimuth"
      Parameters:
      controlPoints -
      attributes -
      Returns:
    • buildTrack

      public static String buildTrack(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes)
      Builds a track graphic composed of multiple routes
      Parameters:
      controlPoints -
      attributes -
      Returns: