public class ExportableAnalyticSurface extends AnalyticSurface implements Exportable
AnalyticSurface.AnalyticSurfaceObject, AnalyticSurface.ClampToGroundSurface, AnalyticSurface.GridPointAttributes, AnalyticSurface.OrderedSurface, AnalyticSurface.RenderInfo, AnalyticSurface.ShadowSurface
Modifier and Type | Field and Description |
---|---|
protected int |
exportImageHeight |
protected java.lang.String |
exportImageName |
protected java.lang.String |
exportImagePath |
protected int |
exportImageWidth |
altitude, altitudeMode, clampToGroundSurface, clientLayer, DEFAULT_ALTITUDE, DEFAULT_ALTITUDE_MODE, DEFAULT_COLOR, DEFAULT_DIMENSION, DEFAULT_GRID_POINT_ATTRIBUTES, DEFAULT_VALUE, expired, extremeValues, globeStateKey, height, pickObject, pickSupport, referencePoint, referencePos, regenTime, RELATIVE_TO_GROUND_REGEN_PERIOD, sector, shadowSurface, surfaceAttributes, surfaceRenderInfo, updateFailed, values, verticalScale, visible, width
FORMAT_NOT_SUPPORTED, FORMAT_PARTIALLY_SUPPORTED, FORMAT_SUPPORTED
Constructor and Description |
---|
ExportableAnalyticSurface() |
Modifier and Type | Method and Description |
---|---|
java.awt.image.BufferedImage |
createImage(int imageWidth,
int imageHeight)
Create an exportable image from this surface's colors and attributes.
|
void |
export(java.lang.String mimeType,
java.lang.Object output)
Export's this surface's color values as a KML GroundOverlay.
|
protected void |
exportAsKML(java.lang.Object output)
Export the surface image to KML as a
<GroundOverlay> element. |
protected void |
exportKMLLatLonBox(javax.xml.stream.XMLStreamWriter xmlWriter) |
int |
getExportImageHeight()
Indicates the image height of the ground overlay image when this surface is exported to KML.
|
java.lang.String |
getExportImageName()
Indicates the name to give this surface's ground overlay image when the surface is exported to KML.
|
java.lang.String |
getExportImagePath()
Indicates the directory in which this surface's export image is stored when exporting to KML.
|
int |
getExportImageWidth()
Indicates the image width of the ground overlay image when this surface is exported to KML.
|
java.lang.String |
isExportFormatSupported(java.lang.String format)
Does this object support a certain export format?
|
void |
setExportImageHeight(int exportImageHeight)
Specifies the image width of the ground overlay image when this surface is exported to KML.
|
void |
setExportImageName(java.lang.String exportImageName)
Specifies the name of the ground overlay image file to create when this surface is exported to KML.
|
void |
setExportImagePath(java.lang.String path)
Specifies the path at which to write this surface's exported image.
|
void |
setExportImageWidth(int exportImageWidth)
Specifies the image width of the ground overlay image when this surface is exported to KML.
|
beginDrawing, bind, computeExtremeValues, computeExtremeValues, computeSurfacePoint, createClampToGroundSurface, createColorGradientAttributes, createColorGradientValues, createDefaultValues, createGridPointAttributes, createShadowSurface, doDrawOrderedRenderable, doUpdate, drawInterior, drawOrderedRenderable, drawOutline, drawSurfaceObjects, endDrawing, getAltitude, getAltitudeMode, getClientLayer, getDimensions, getExtent, getPickObject, getSector, getSurfaceAttributes, getValues, getVerticalScale, intersectsFrustum, isExpired, isVisible, makeOrderedRenderable, preRender, preRenderSurfaceObjects, render, setAltitude, setAltitudeMode, setClientLayer, setDimensions, setExpired, setPickObject, setSector, setSurfaceAttributes, setValues, setVerticalScale, setVisible, update, updateNextSurfacePoint, updateSurfaceNormals, updateSurfacePoints
protected int exportImageHeight
protected java.lang.String exportImageName
protected java.lang.String exportImagePath
protected int exportImageWidth
public java.awt.image.BufferedImage createImage(int imageWidth, int imageHeight)
imageWidth
- The width of the image to create.imageHeight
- The height of the image to create.public void export(java.lang.String mimeType, java.lang.Object output) throws java.io.IOException
If color values have not been specified for the surface then the interior if the output image is blank. The image outline is exported only if the surface's drawOutline file is true.
export
in interface Exportable
mimeType
- Desired export format. Only "application/vnd.google-earth.kml+xml" is supported.output
- Object that will receive the exported data. The type of this object depends on the export format.
All formats should support java.io.OutputStream
. Text based format (for example, XML
formats) should also support java.io.Writer
. Certain formats may also support other
object types.java.io.IOException
- if an error occurs while writing the output file or its image.setExportImageName(String)
,
setExportImagePath(String)
,
setExportImageWidth(int)
,
setExportImageHeight(int)
protected void exportAsKML(java.lang.Object output) throws java.io.IOException, javax.xml.stream.XMLStreamException
<GroundOverlay>
element. The output
object will receive the
data. This object must be one of: java.io.Writer java.io.OutputStream javax.xml.stream.XMLStreamWriteroutput
- Object to receive the generated KML.javax.xml.stream.XMLStreamException
- If an exception occurs while writing the KMLjava.io.IOException
- if an exception occurs while exporting the data.protected void exportKMLLatLonBox(javax.xml.stream.XMLStreamWriter xmlWriter) throws javax.xml.stream.XMLStreamException
javax.xml.stream.XMLStreamException
public int getExportImageHeight()
public java.lang.String getExportImageName()
public java.lang.String getExportImagePath()
public int getExportImageWidth()
public java.lang.String isExportFormatSupported(java.lang.String format)
Exportable
isExportFormatSupported
in interface Exportable
format
- Desired export format.Exportable.FORMAT_SUPPORTED
, Exportable.FORMAT_NOT_SUPPORTED
, or Exportable.FORMAT_PARTIALLY_SUPPORTED
.Exportable.export(String, Object)
public void setExportImageHeight(int exportImageHeight)
exportImageHeight
- The export image height.public void setExportImageName(java.lang.String exportImageName)
exportImageName
- The name of the file in which to write the exported image. This field must be non-null
when this surface is exported.setExportImagePath(String)
public void setExportImagePath(java.lang.String path)
setExportImageName(String)
.path
- The directory in which to store the exported ground overlay image. This field must be non-null when
this surface is exported.setExportImageName(String)
public void setExportImageWidth(int exportImageWidth)
exportImageWidth
- The export image width.