Package armyc2.c5isr.web.render
Class WebRenderer
- java.lang.Object
-
- armyc2.c5isr.web.render.WebRenderer
-
public final class WebRenderer extends java.lang.ObjectMain class for rendering multi-point graphics such as Control Measures, Atmospheric, and Oceanographic.
-
-
Field Summary
Fields Modifier and Type Field Description static intOUTPUT_FORMAT_GEOJSONstatic intOUTPUT_FORMAT_GEOSVGstatic intOUTPUT_FORMAT_JSONDeprecated.static intOUTPUT_FORMAT_KML
-
Constructor Summary
Constructors Constructor Description WebRenderer()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static java.lang.StringRenderBasic3DShape(java.lang.String id, java.lang.String name, java.lang.String description, int basicShapeType, java.lang.String controlPoints, java.lang.String altitudeMode, double scale, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes, int format)Renders basic 3D shapes, creating KML or GeoJSON that can be used to draw it on a Google map.static java.lang.StringRenderBasicShape(java.lang.String id, java.lang.String name, java.lang.String description, int basicShapeType, java.lang.String controlPoints, java.lang.String altitudeMode, double scale, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes, int format)Renders multipoint basic shapes, creating KML, GeoJSON or SVG that can be used to draw it on a Google map.static MilStdSymbolRenderBasicShapeAsMilStdSymbol(java.lang.String id, java.lang.String name, java.lang.String description, int basicShapeType, java.lang.String controlPoints, java.lang.String altitudeMode, double scale, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes)Renders basic shapes as symbols, creating MilStdSymbol that contains the information needed to draw the shape on the map.static java.lang.StringRenderMilStd3dSymbol(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String symbolCode, java.lang.String controlPoints, java.lang.String altitudeMode, double scale, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes, int format)Renders all 3d multi-point symbols, creating KML or GeoJSON that can be used to draw it on a Google map.static MilStdSymbolRenderMultiPointAsMilStdSymbol(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String symbolCode, java.lang.String controlPoints, java.lang.String altitudeMode, double scale, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes)Renders all MilStd 2525 multi-point symbols, creating MilStdSymbol that contains the information needed to draw the symbol on the map.static java.lang.StringRenderSymbol(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String symbolCode, java.lang.String controlPoints, java.lang.String altitudeMode, double scale, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes, int format)Renders all multi-point symbols, creating KML, GeoJSON or SVG that can be used to draw it on a Google map.static java.lang.StringRenderSymbol2D(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String symbolCode, java.lang.String controlPoints, int pixelWidth, int pixelHeight, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes, int format)Renders all multi-point symbols, creating KML, GeoJSON or SVG for the user to parse and render as they like.
-
-
-
Field Detail
-
OUTPUT_FORMAT_KML
public static final int OUTPUT_FORMAT_KML
- See Also:
- Constant Field Values
-
OUTPUT_FORMAT_JSON
@Deprecated public static final int OUTPUT_FORMAT_JSON
Deprecated.- See Also:
- Constant Field Values
-
OUTPUT_FORMAT_GEOJSON
public static final int OUTPUT_FORMAT_GEOJSON
- See Also:
- Constant Field Values
-
OUTPUT_FORMAT_GEOSVG
public static final int OUTPUT_FORMAT_GEOSVG
- See Also:
- Constant Field Values
-
-
Method Detail
-
RenderSymbol
public static java.lang.String RenderSymbol(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String symbolCode, java.lang.String controlPoints, java.lang.String altitudeMode, double scale, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes, int format)Renders all multi-point symbols, creating KML, GeoJSON or SVG that can be used to draw it on a Google map. Multipoint symbols cannot be draw the same at different scales. For instance, graphics with arrow heads will need to redraw arrowheads when you zoom in on it. Similarly, graphics like a Forward Line of Troops drawn with half circles can improve performance if clipped when the parts of the graphic that aren't on the screen. To help readjust graphics and increase performance, this function requires the scale and bounding box to help calculate the new locations.- Parameters:
id- A unique identifier used to identify the symbol by Google map. The id will be the folder name that contains the graphic.name- a string used to display to the user as the name of the graphic being created.description- a brief description about the graphic being made and what it represents.symbolCode- A 20-30 digit symbolID corresponding to one of the graphics in the MIL-STD-2525DcontrolPoints- The vertices of the graphics that make up the graphic. Passed in the format of a string, using decimal degrees separating lat and lon by a comma, separating coordinates by a space. The following format shall be used "x1,y1[,z1] [xn,yn[,zn]]..."altitudeMode- Indicates whether the symbol should interpret altitudes as above sea level or above ground level. Options are "clampToGround", "relativeToGround" (from surface of earth), "absolute" (sea level), "relativeToSeaFloor" (from the bottom of major bodies of water).scale- A number corresponding to how many meters one meter of our map represents. A value "50000" would mean 1:50K which means for every meter of our map it represents 50000 meters of real world distance. Scale Calculation Examplebbox- The viewable area of the map. Passed in the format of a string "lowerLeftX,lowerLeftY,upperRightX,upperRightY." Not required but can speed up rendering in some cases. example: "-50.4,23.6,-42.2,24.2"modifiers-Map, keyed using constants from Modifiers. Pass in comma delimited String for modifiers with multiple values like AM, AN & Xattributes-Map, keyed using constants from MilStdAttributes.format-OUTPUT_FORMAT_KML,OUTPUT_FORMAT_GEOJSONorOUTPUT_FORMAT_GEOSVG- Returns:
- A KML, GeoJSON or SVG string representation of the graphic.
-
RenderSymbol2D
public static java.lang.String RenderSymbol2D(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String symbolCode, java.lang.String controlPoints, int pixelWidth, int pixelHeight, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes, int format)Renders all multi-point symbols, creating KML, GeoJSON or SVG for the user to parse and render as they like. This function requires the bounding box to help calculate the new locations.- Parameters:
id- A unique identifier used to identify the symbol by Google map. The id will be the folder name that contains the graphic.name- a string used to display to the user as the name of the graphic being created.description- a brief description about the graphic being made and what it represents.symbolCode- A 20-30 digit symbolID corresponding to one of the graphics in the MIL-STD-2525DcontrolPoints- The vertices of the graphics that make up the graphic. Passed in the format of a string, using decimal degrees separating lat and lon by a comma, separating coordinates by a space. The following format shall be used "x1,y1 [xn,yn]..."pixelWidth- pixel dimensions of the viewable map areapixelHeight- pixel dimensions of the viewable map areabbox- The viewable area of the map. Passed in the format of a string "lowerLeftX,lowerLeftY,upperRightX,upperRightY." example: "-50.4,23.6,-42.2,24.2"modifiers-Map, keyed using constants from Modifiers. Pass in comma delimited String for modifiers with multiple values like AM, AN & Xattributes-Map, keyed using constants from MilStdAttributes.format-OUTPUT_FORMAT_KML,OUTPUT_FORMAT_GEOJSONorOUTPUT_FORMAT_GEOSVG- Returns:
- A KML, GeoJSON or SVG string representation of the graphic.
-
RenderMilStd3dSymbol
public static java.lang.String RenderMilStd3dSymbol(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String symbolCode, java.lang.String controlPoints, java.lang.String altitudeMode, double scale, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes, int format)Renders all 3d multi-point symbols, creating KML or GeoJSON that can be used to draw it on a Google map. 3D version of RenderSymbol()- Parameters:
id- A unique identifier used to identify the symbol by Google map. The id will be the folder name that contains the graphic.name- a string used to display to the user as the name of the graphic being created.description- a brief description about the graphic being made and what it represents.symbolCode- A 20-30 digit symbolID corresponding to one of the graphics in the MIL-STD-2525DcontrolPoints- The vertices of the graphics that make up the graphic. Passed in the format of a string, using decimal degrees separating lat and lon by a comma, separating coordinates by a space. The following format shall be used "x1,y1[,z1] [xn,yn[,zn]]..."altitudeMode- Indicates whether the symbol should interpret altitudes as above sea level or above ground level. Options are "clampToGround", "relativeToGround" (from surface of earth), "absolute" (sea level), "relativeToSeaFloor" (from the bottom of major bodies of water).scale- A number corresponding to how many meters one meter of our map represents. A value "50000" would mean 1:50K which means for every meter of our map it represents 50000 meters of real world distance. Scale Calculation Examplebbox- The viewable area of the map. Passed in the format of a string "lowerLeftX,lowerLeftY,upperRightX,upperRightY." Not required but can speed up rendering in some cases. example: "-50.4,23.6,-42.2,24.2"modifiers- keyed using constants from Modifiers. Pass in comma delimited String for modifiers with multiple values like AM, AN & Xattributes- keyed using constants from MilStdAttributes.format-OUTPUT_FORMAT_KML,OUTPUT_FORMAT_GEOJSONorOUTPUT_FORMAT_GEOSVG- Returns:
- A KML, GeoJSON or SVG string representation of the graphic.
-
RenderMultiPointAsMilStdSymbol
public static MilStdSymbol RenderMultiPointAsMilStdSymbol(java.lang.String id, java.lang.String name, java.lang.String description, java.lang.String symbolCode, java.lang.String controlPoints, java.lang.String altitudeMode, double scale, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes)
Renders all MilStd 2525 multi-point symbols, creating MilStdSymbol that contains the information needed to draw the symbol on the map. DOES NOT support RADARC, CAKE, TRACK etc... ArrayList<Point2D> milStdSymbol.getSymbolShapes.get(index).getPolylines() and ShapeInfo = milStdSymbol.getModifierShapes.get(index).- Parameters:
id- A unique identifier used to identify the symbol by Google map. The id will be the folder name that contains the graphic.name- a string used to display to the user as the name of the graphic being created.description- a brief description about the graphic being made and what it represents.symbolCode- A 20-30 digit symbolID corresponding to one of the graphics in the MIL-STD-2525DcontrolPoints- The vertices of the graphics that make up the graphic. Passed in the format of a string, using decimal degrees separating lat and lon by a comma, separating coordinates by a space. The following format shall be used "x1,y1[,z1] [xn,yn[,zn]]..."altitudeMode- ignoredscale- A number corresponding to how many meters one meter of our map represents. A value "50000" would mean 1:50K which means for every meter of our map it represents 50000 meters of real world distance. Scale Calculation Examplebbox- The viewable area of the map. Passed in the format of a string "lowerLeftX,lowerLeftY,upperRightX,upperRightY." Not required but can speed up rendering in some cases. example: "-50.4,23.6,-42.2,24.2"modifiers- Used like: modifiers.put(Modifiers.T_UNIQUE_DESIGNATION_1, "T"); Or modifiers.put(Modifiers.AM_DISTANCE, "1000,2000,3000");attributes- Used like: attributes.put(MilStdAttributes.LineWidth, "3"); Or attributes.put(MilStdAttributes.LineColor, "#00FF00");- Returns:
- MilStdSymbol
-
RenderBasicShapeAsMilStdSymbol
public static MilStdSymbol RenderBasicShapeAsMilStdSymbol(java.lang.String id, java.lang.String name, java.lang.String description, int basicShapeType, java.lang.String controlPoints, java.lang.String altitudeMode, double scale, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes)
Renders basic shapes as symbols, creating MilStdSymbol that contains the information needed to draw the shape on the map. ArrayList<Point2D> milStdSymbol.getSymbolShapes.get(index).getPolylines() and ShapeInfo = milStdSymbol.getModifierShapes.get(index).- Parameters:
id- A unique identifier used to identify the symbol by Google map. The id will be the folder name that contains the graphic.name- a string used to display to the user as the name of the graphic being created.description- a brief description about the graphic being made and what it represents.basicShapeType-BasicShapescontrolPoints- The vertices of the graphics that make up the graphic. Passed in the format of a string, using decimal degrees separating lat and lon by a comma, separating coordinates by a space. The following format shall be used "x1,y1[,z1] [xn,yn[,zn]]..."altitudeMode- ignoredscale- A number corresponding to how many meters one meter of our map represents. A value "50000" would mean 1:50K which means for every meter of our map it represents 50000 meters of real world distance. Scale Calculation Examplebbox- The viewable area of the map. Passed in the format of a string "lowerLeftX,lowerLeftY,upperRightX,upperRightY." Not required but can speed up rendering in some cases. example: "-50.4,23.6,-42.2,24.2"modifiers- Used like: modifiers.put(Modifiers.T_UNIQUE_DESIGNATION_1, "T"); Or modifiers.put(Modifiers.AM_DISTANCE, "1000,2000,3000");attributes- Used like: attributes.put(MilStdAttributes.LineWidth, "3"); Or attributes.put(MilStdAttributes.LineColor, "#00FF00");- Returns:
- MilStdSymbol
-
RenderBasicShape
public static java.lang.String RenderBasicShape(java.lang.String id, java.lang.String name, java.lang.String description, int basicShapeType, java.lang.String controlPoints, java.lang.String altitudeMode, double scale, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes, int format)Renders multipoint basic shapes, creating KML, GeoJSON or SVG that can be used to draw it on a Google map.- Parameters:
id- A unique identifier used to identify the symbol by Google map. The id will be the folder name that contains the graphic.name- a string used to display to the user as the name of the graphic being created.description- a brief description about the graphic being made and what it represents.basicShapeType-BasicShapescontrolPoints- The vertices of the graphics that make up the graphic. Passed in the format of a string, using decimal degrees separating lat and lon by a comma, separating coordinates by a space. The following format shall be used "x1,y1[,z1] [xn,yn[,zn]]..."altitudeMode- ignoredscale- A number corresponding to how many meters one meter of our map represents. A value "50000" would mean 1:50K which means for every meter of our map it represents 50000 meters of real world distance. Scale Calculation Examplebbox- The viewable area of the map. Passed in the format of a string "lowerLeftX,lowerLeftY,upperRightX,upperRightY." Not required but can speed up rendering in some cases. example: "-50.4,23.6,-42.2,24.2"modifiers- keyed using constants from Modifiers. Pass in comma delimited String for modifiers with multiple values like AM, AN & Xattributes- keyed using constants from MilStdAttributes.format-OUTPUT_FORMAT_KML,OUTPUT_FORMAT_GEOJSONorOUTPUT_FORMAT_GEOSVG- Returns:
- A KML, GeoJSON or SVG string representation of the graphic.
-
RenderBasic3DShape
public static java.lang.String RenderBasic3DShape(java.lang.String id, java.lang.String name, java.lang.String description, int basicShapeType, java.lang.String controlPoints, java.lang.String altitudeMode, double scale, java.lang.String bbox, java.util.Map<java.lang.String,java.lang.String> modifiers, java.util.Map<java.lang.String,java.lang.String> attributes, int format)Renders basic 3D shapes, creating KML or GeoJSON that can be used to draw it on a Google map.- Parameters:
id- A unique identifier used to identify the symbol by Google map. The id will be the folder name that contains the graphic.name- a string used to display to the user as the name of the graphic being created.description- a brief description about the graphic being made and what it represents.basicShapeType-Basic3DShapescontrolPoints- The vertices of the graphics that make up the graphic. Passed in the format of a string, using decimal degrees separating lat and lon by a comma, separating coordinates by a space. The following format shall be used "x1,y1[,z1] [xn,yn[,zn]]..."altitudeMode- Indicates whether the symbol should interpret altitudes as above sea level or above ground level. Options are "clampToGround", "relativeToGround" (from surface of earth), "absolute" (sea level), "relativeToSeaFloor" (from the bottom of major bodies of water).scale- A number corresponding to how many meters one meter of our map represents. A value "50000" would mean 1:50K which means for every meter of our map it represents 50000 meters of real world distance. Scale Calculation Examplebbox- The viewable area of the map. Passed in the format of a string "lowerLeftX,lowerLeftY,upperRightX,upperRightY." Not required but can speed up rendering in some cases. example: "-50.4,23.6,-42.2,24.2"modifiers-Map, keyed using constants from Modifiers. Pass in comma delimited String for modifiers with multiple values like AM, AN & Xattributes-Map, keyed using constants from MilStdAttributes.format-OUTPUT_FORMAT_KML,OUTPUT_FORMAT_GEOJSON- Returns:
- A KML or GeoJSON string representation of the graphic.
-
-