Package sec.web.renderer
Class Shape3DHandler
java.lang.Object
sec.web.renderer.Shape3DHandler
Responsible for generating the KML for all 3D shapes. This
- Author:
- stephen.pinizzotto
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic Stringstatic Stringstatic Stringstatic Stringstatic final Stringstatic final doublestatic final Stringstatic final doublestatic final Stringstatic final doublestatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final doublestatic final Stringstatic final doublestatic final Stringstatic final doublestatic final Stringstatic final String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringbuildCake(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.static StringbuildCylinder(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes) Builds a cylinder given a point.static Stringstatic StringbuildOrbit(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes) Build an Orbit graphic.static StringbuildPolyArc(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes) Builds the PolyArc graphicstatic StringbuildPolygon(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes) Builds a 3d Polygon with elevation.static StringbuildRadarc(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes) Builds the Radarc graphicstatic StringbuildRoute(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes) Builds a route graphic.static StringbuildTrack(String controlPoints, String id, String name, String description, String lineColor, String fillColor, KmlOptions.AltitudeMode altitudeMode, SymbolModifiers attributes) Builds a track graphic composed of multiple routesstatic Stringrender3dSymbol(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.
-
Field Details
-
CYLINDER
- See Also:
-
ORBIT
- See Also:
-
ROUTE
- See Also:
-
POLYGON
- See Also:
-
RADARC
- See Also:
-
POLYARC
- See Also:
-
CAKE
- See Also:
-
TRACK
- See Also:
-
ATTRIBUTES
- See Also:
-
MIN_ALT
- See Also:
-
MAX_ALT
- See Also:
-
RADIUS1
- See Also:
-
RADIUS2
- See Also:
-
LEFT_AZIMUTH
- See Also:
-
RIGHT_AZIMUTH
- See Also:
-
MIN_ALT_DEFAULT
public static final double MIN_ALT_DEFAULT- See Also:
-
MAX_ALT_DEFAULT
public static final double MAX_ALT_DEFAULT- See Also:
-
RADIUS1_DEFAULT
public static final double RADIUS1_DEFAULT- See Also:
-
RADIUS2_DEFAULT
public static final double RADIUS2_DEFAULT- See Also:
-
LEFT_AZIMUTH_DEFAULT
public static final double LEFT_AZIMUTH_DEFAULT- See Also:
-
RIGHT_AZIMUTH_DEFAULT
public static final double RIGHT_AZIMUTH_DEFAULT- See Also:
-
DEFAULT_ATTRIBUTES
- See Also:
-
ERR_ATTRIBUTES_NOT_FORMATTED
-
ERR_COORDINATES_NOT_FORMATTED
-
ERR_GENERAL_ERROR
-
ERR_INVALID_NUMBER_POINTS_ERROR
-
-
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 graphicfillColor- The fill color of the graphicaltitudeMode- 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
-
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:
-