|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectucar.unidata.data.gis.KmlUtil
public class KmlUtil
DataSource for Web Map Servers
| Constructor Summary | |
|---|---|
KmlUtil()
|
|
| Method Summary | |
|---|---|
static Element |
balloonstyle(Element parent,
String text,
Color bgColor)
Create a BalloonStyle element |
static Element |
balloonstyle(Element parent,
String id,
String text,
Color bgColor)
Create a BalloonStyle element wrapped in a Style element |
static Element |
coordinates(Element parent,
String coordinates)
Make a coordinates element |
static Element |
description(Element parent,
String description)
Make a description element (wrapped in a CDATA structure) |
static Element |
document(Element parent,
String name)
Make a KML Document |
static Element |
document(Element parent,
String name,
boolean visible)
Make a KML Document Element |
static Element |
folder(Element parent,
String name)
Create a Folder element |
static Element |
folder(Element parent,
String name,
boolean visible)
Create a Folder element |
static Element |
groundOverlay(Element parent,
String name,
String description,
String url,
double north,
double south,
double east,
double west)
Create a GroundOverlay element |
static Element |
iconstyle(Element parent,
String url,
double scale,
Color color)
Create an IconStyle element |
static Element |
iconstyle(Element parent,
String id,
String url)
Create an IconStyle element enclosed in a Style element |
static Element |
iconstyle(Element parent,
String id,
String url,
double scale)
Create an IconStyle element enclosed in a Style element |
static Element |
iconstyle(Element parent,
String id,
String url,
double scale,
Color color)
Create an IconStyle element enclosed in a Style element |
static Element |
kml(String name)
Make the kml element |
static Element |
labelstyle(Element parent,
Color color,
int scale)
Create a LabelStyle element |
static Element |
labelstyle(Element parent,
String id,
Color color,
int scale)
Create a LabelStyle element enclosed in a Style Element |
static Element |
linestring(Element parent,
boolean extrude,
boolean tesselate,
float[][] coords)
Create a LineString element |
static Element |
linestring(Element parent,
boolean extrude,
boolean tesselate,
String coordinates)
Create a LineString element |
static Element |
linestyle(Element parent,
String id,
Color color,
int width)
Create a LineStyle element |
static Element |
makeElement(Element parent,
String tag)
Make a Kml element |
static Element |
makeText(Element parent,
String tag,
String text)
Make a text node in the parent element |
static Element |
name(Element parent,
String name)
Make a name element (wrapped in a CDATA structure) |
static Element |
networkLink(Element parent,
String name,
String url)
Make a NetworkLink element |
static Element |
open(Element parent,
boolean open)
Set the open flag on an elemenet |
static Element |
pair(Element parent,
String key,
String styleUrl)
Make a pair element |
static double[][] |
parseCoordinates(String coords)
Parse coordinates |
static Element |
placemark(Element parent,
String name,
String description)
Create a Placemark |
static Element |
placemark(Element parent,
String name,
String description,
double lat,
double lon,
double alt,
String styleUrl)
Make a Placemark element |
static Element |
placemark(Element parent,
String name,
String description,
double lat,
double lon,
double alt,
String[] styleUrls,
boolean visible)
Make a Placemark element |
static Element |
placemark(Element parent,
String name,
String description,
float[][] coords,
Color color,
int width)
Make a Placemark with a Linestring |
static String |
point(double lat,
double lon,
double alt,
String style)
Make a point Element string |
static Element |
screenoverlay(Element parent,
String name,
String iconURL,
double overlayX,
double overlayY,
String overlayXunits,
String overlayYunits,
double screenX,
double screenY,
String screenXunits,
String screenYunits)
Create a ScreenOverlay Element |
static Element |
screenoverlay(Element parent,
String name,
String iconURL,
double overlayX,
double overlayY,
String overlayXunits,
String overlayYunits,
double screenX,
double screenY,
String screenXunits,
String screenYunits,
double sizeX,
double sizeY,
String sizeXunits,
String sizeYunits)
Create a ScreenOverlay Element |
static Element |
snippet(Element parent,
String snippet)
Make a snippet Element |
static Element |
style(Element parent,
String id)
Make a Style element |
static Element |
stylemap(Element parent,
String id,
String normalStyleUrl,
String highlightStyleUrl)
Create a StyleMap for normal and highlighted styles |
static Element |
styleurl(Element parent,
String url)
Make a styleUrl element (why isn't the s capitalized?) |
static Element |
timestamp(Element parent,
Date dttm)
Make a timestamp from the date |
static String |
toBGRHexString(Color c)
Convert the given color to is string BGR hex representation. |
static Element |
visible(Element parent,
boolean visible)
Set the visibility on an Element |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final String TAG_ALTITUDE
public static final String TAG_ALTITUDEMODE
public static final String TAG_BALLOONSTYLE
public static final String TAG_BOTTOMFOV
public static final String TAG_CAMERA
public static final String TAG_COLOR
public static final String TAG_COLORMODE
public static final String TAG_COORDINATES
public static final String TAG_DESCRIPTION
public static final String TAG_DOCUMENT
public static final String TAG_EAST
public static final String TAG_EXTRUDE
public static final String TAG_FOLDER
public static final String TAG_GROUNDOVERLAY
public static final String TAG_HEADING
public static final String TAG_HREF
public static final String TAG_ICON
public static final String TAG_ICONSTYLE
public static final String TAG_KEY
public static final String TAG_KML
public static final String TAG_LABELSTYLE
public static final String TAG_LATITUDE
public static final String TAG_LATLONBOX
public static final String TAG_LEFTFOV
public static final String TAG_LINESTRING
public static final String TAG_LINESTYLE
public static final String TAG_LINK
public static final String TAG_LONGITUDE
public static final String TAG_LOOKAT
public static final String TAG_MULTIGEOMETRY
public static final String TAG_NAME
public static final String TAG_NEAR
public static final String TAG_NETWORKLINK
public static final String TAG_NORTH
public static final String TAG_PHOTOOVERLAY
public static final String TAG_OPEN
public static final String TAG_OVERLAYXY
public static final String TAG_PAIR
public static final String TAG_PLACEMARK
public static final String TAG_POINT
public static final String TAG_RIGHTFOV
public static final String TAG_ROLL
public static final String TAG_ROTATION
public static final String TAG_SCHEMA
public static final String TAG_SCREENOVERLAY
public static final String TAG_SCREENXY
public static final String TAG_SNIPPET
public static final String TAG_SOUTH
public static final String TAG_STYLE
public static final String TAG_STYLEMAP
public static final String TAG_STYLEURL
public static final String TAG_TESSELATE
public static final String TAG_TEXT
public static final String TAG_TILT
public static final String TAG_TIMESTAMP
public static final String TAG_TOPFOV
public static final String TAG_URL
public static final String TAG_VIEWVOLUME
public static final String TAG_SCALE
public static final String TAG_VIEWBOUNDSCALE
public static final String TAG_VISIBILITY
public static final String TAG_WEST
public static final String TAG_WHEN
public static final String TAG_WIDTH
public static final String TAG_TOUR
public static final String TAG_PLAYLIST
public static final String TAG_FLYTO
public static final String TAG_WAIT
public static final String ATTR_ID
public static final String ATTR_NAME
public static final String ATTR_X
public static final String ATTR_Y
public static final String ATTR_XUNITS
public static final String ATTR_YUNITS
public static final String XMLNS_KML2_2
| Constructor Detail |
|---|
public KmlUtil()
| Method Detail |
|---|
public static Element makeElement(Element parent,
String tag)
parent - the parent elementtag - the tag name
public static Element kml(String name)
name - the name of the element (not used)
public static Element document(Element parent,
String name)
parent - parent Elementname - the name of the Document
public static Element document(Element parent,
String name,
boolean visible)
parent - the parent nodename - the name of the documentvisible - true if visible
public static Element networkLink(Element parent,
String name,
String url)
parent - parent nodename - name of the linkurl - link URL
public static Element makeText(Element parent,
String tag,
String text)
parent - the parenttag - the tagtext - the text
public static Element visible(Element parent,
boolean visible)
parent - the parent elementvisible - true to be visible
public static Element snippet(Element parent,
String snippet)
parent - the parentsnippet - the snippet text
public static Element open(Element parent,
boolean open)
parent - the parent nodeopen - true to be open
public static Element timestamp(Element parent,
Date dttm)
parent - the parent nodedttm - the date
public static Element pair(Element parent,
String key,
String styleUrl)
parent - the parent elementkey - the pair keystyleUrl - the pair styleUrl
public static Element stylemap(Element parent,
String id,
String normalStyleUrl,
String highlightStyleUrl)
parent - the parent elementid - the id of the StyleMapnormalStyleUrl - the styleUrl of the normal stylehighlightStyleUrl - the styleUrl of the highlighted style
public static Element styleurl(Element parent,
String url)
parent - the parent elementurl - the url
public static Element style(Element parent,
String id)
parent - the parent nodeid - the Style id
public static Element iconstyle(Element parent,
String id,
String url)
parent - the parent Elementid - name of the enclosing Style elementurl - the icon URL
public static Element iconstyle(Element parent,
String id,
String url,
double scale)
parent - the parent Elementid - name of the enclosing Style elementurl - the icon URLscale - the size scale (>= 0, 1 = normal size)
public static Element iconstyle(Element parent,
String id,
String url,
double scale,
Color color)
parent - the parent Elementid - name of the enclosing Style elementurl - the icon URLscale - the size scale (>= 0, 1 = normal size)color - the icon color
public static Element iconstyle(Element parent,
String url,
double scale,
Color color)
parent - the parent (Style) Elementurl - the icon URLscale - the size scale (>= 0, 1 = normal size)color - the icon color
public static Element balloonstyle(Element parent,
String text,
Color bgColor)
parent - parent (Style) elementtext - the balloon textbgColor - the background color
public static Element balloonstyle(Element parent,
String id,
String text,
Color bgColor)
parent - parent elementid - of the enclosing Style elementtext - the balloon textbgColor - the background color
public static Element labelstyle(Element parent,
String id,
Color color,
int scale)
parent - The parent for the styleid - the Style idcolor - the label colorscale - the label size scale
public static Element labelstyle(Element parent,
Color color,
int scale)
parent - The parent (Style) elementcolor - the label colorscale - the label size scale
public static Element linestyle(Element parent,
String id,
Color color,
int width)
parent - the parent nodeid - the id for the enclosing Stylecolor - line colorwidth - line width
public static Element linestring(Element parent,
boolean extrude,
boolean tesselate,
String coordinates)
parent - the parent nodeextrude - true to extrudetesselate - true to tesselatecoordinates - comma separated list of coordinates (lon1,lat1,alt1,lon2,lat2,alt2,....lonN,latN,altN)
public static Element linestring(Element parent,
boolean extrude,
boolean tesselate,
float[][] coords)
parent - the parent nodeextrude - true to extrudetesselate - true to tesselatecoords - array of coordinates (coords[lon,lat] or coords[lon,lat,alt])
public static Element coordinates(Element parent,
String coordinates)
parent - the parent nodecoordinates - the coordinates (comma separated values)
public static Element name(Element parent,
String name)
parent - the parent nodename - the name text
public static Element description(Element parent,
String description)
parent - the parent nodedescription - the description
public static Element folder(Element parent,
String name)
parent - the parent nodename - the name of the folder
public static Element folder(Element parent,
String name,
boolean visible)
parent - the parent nodename - the name of the foldervisible - true to be visible. (all children must be not visible if you want the folder turned off)
public static Element placemark(Element parent,
String name,
String description)
parent - the parent nodename - the name of the placemarkdescription - the description of the placemark
public static String point(double lat,
double lon,
double alt,
String style)
lat - the point latitudelon - the point longitudealt - the point altitudestyle - the point style (not used)
public static Element placemark(Element parent,
String name,
String description,
double lat,
double lon,
double alt,
String styleUrl)
parent - the parent nodename - the Placemark namedescription - the Placemark descriptionlat - the latitudelon - the latitudealt - the latitudestyleUrl - the styleUrl
public static Element placemark(Element parent,
String name,
String description,
double lat,
double lon,
double alt,
String[] styleUrls,
boolean visible)
parent - the parent nodename - the Placemark namedescription - the Placemark descriptionlat - the latitudelon - the latitudealt - the latitudestyleUrls - the array styleUrlsvisible - true for this to be showing
public static Element groundOverlay(Element parent,
String name,
String description,
String url,
double north,
double south,
double east,
double west)
parent - the parent nodename - the name of the GroundOverlaydescription - the description of the GroundOverlayurl - the URL of the overlaynorth - the north coordinatesouth - the south coordinateeast - the east coordinatewest - the west coordinate
public static Element placemark(Element parent,
String name,
String description,
float[][] coords,
Color color,
int width)
parent - the parent nodename - the name of the Placemarkdescription - the description of the Placemarkcoords - the line coordinatescolor - the line colorwidth - the line width
public static double[][] parseCoordinates(String coords)
coords - the string of space separated coordinates
public static String toBGRHexString(Color c)
c - color
public static Element screenoverlay(Element parent,
String name,
String iconURL,
double overlayX,
double overlayY,
String overlayXunits,
String overlayYunits,
double screenX,
double screenY,
String screenXunits,
String screenYunits)
parent - parent Elementname - the name of the elementiconURL - the URL of the iconoverlayX - x component of a point on the overlay imageoverlayY - y component of a point on the overlay imageoverlayXunits - units of overlayX, can be one of: fraction, pixels, or insetPixelsoverlayYunits - units of overlayY, can be one of: fraction, pixels, or insetPixelsscreenX - x component of a point on the screenscreenY - y component of a point on the screenscreenXunits - units of screenX, can be one of: fraction, pixels, or insetPixelsscreenYunits - units of screenY, can be one of: fraction, pixels, or insetPixels
public static Element screenoverlay(Element parent,
String name,
String iconURL,
double overlayX,
double overlayY,
String overlayXunits,
String overlayYunits,
double screenX,
double screenY,
String screenXunits,
String screenYunits,
double sizeX,
double sizeY,
String sizeXunits,
String sizeYunits)
parent - parent Elementname - the name of the elementiconURL - the URL of the iconoverlayX - x component of a point on the overlay imageoverlayY - y component of a point on the overlay imageoverlayXunits - units of overlayX, can be one of: fraction, pixels, or insetPixelsoverlayYunits - units of overlayY, can be one of: fraction, pixels, or insetPixelsscreenX - x component of a point on the screenscreenY - y component of a point on the screenscreenXunits - units of screenX, can be one of: fraction, pixels, or insetPixelsscreenYunits - units of screenY, can be one of: fraction, pixels, or insetPixelssizeX - the x size of the image for the screen overlay, as follows: 1 indicates to use the native dimension,
0 indicates to maintain the aspect ratio, a value of n sets the value of the dimensionsizeY - the y size of the image for the screen overlay (see sizeX)sizeXunits - units of sizeX, fraction or pixelssizeYunits - units of sizeY, fraction or pixels
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||