de.micromata.opengis.kml.v_2_2_0
Class LineString

java.lang.Object
  extended by de.micromata.opengis.kml.v_2_2_0.AbstractObject
      extended by de.micromata.opengis.kml.v_2_2_0.Geometry
          extended by de.micromata.opengis.kml.v_2_2_0.LineString
All Implemented Interfaces:
java.lang.Cloneable

public class LineString
extends Geometry
implements java.lang.Cloneable

Defines a connected set of line segments. Use to specify the color, color mode, and width of the line. When a LineString is extruded, the line is extended to the ground, forming a polygon that looks somewhat like a wall or fence. For extruded LineStrings, the line itself uses the current LineStyle, and the extrusion uses the current PolyStyle. See the KML Tutorial for examples of LineStrings (or paths).

Syntax:
<LineString id="ID">
   <!-- specific to LineString -->
   <extrude>0</extrude>                   <!-- boolean -->
   <tessellate>0</tessellate>             <!-- boolean -->
   <altitudeMode>clampToGround</altitudeMode> 
       <!-- kml:altitudeModeEnum: clampToGround, relativeToGround, or absolute -->
         <!-- or, substitute gx:altitudeMode: clampToSeaFloor, relativeToSeaFloor -->
                        <!-- or, substitute gx:altitudeMode: clampToSeaFloor, relativeToSeaFloor -->
   <coordinates>...</coordinates>         <!-- lon,lat[,alt] -->
 </LineString>
Extends:


Field Summary
protected  AltitudeMode altitudeMode
          AltitudeMode
protected  java.util.List<Coordinate> coordinates
           (required)
protected  java.lang.Boolean extrude
          
protected  java.util.List<AbstractObject> lineStringObjectExtension
          
protected  java.util.List<java.lang.Object> lineStringSimpleExtension
           
protected  java.lang.Boolean tessellate
          
 
Fields inherited from class de.micromata.opengis.kml.v_2_2_0.Geometry
geometryObjectExtension, geometrySimpleExtension
 
Fields inherited from class de.micromata.opengis.kml.v_2_2_0.AbstractObject
id, objectSimpleExtension, targetId
 
Constructor Summary
LineString()
           
 
Method Summary
 LineString addToCoordinates(double longitude, double latitude)
          add a value to the coordinates property collection
 LineString addToCoordinates(double longitude, double latitude, double altitude)
          add a value to the coordinates property collection
 LineString addToCoordinates(java.lang.String coordinates)
          add a value to the coordinates property collection
 LineString addToGeometryObjectExtension(AbstractObject geometryObjectExtension)
          add a value to the geometryObjectExtension property collection
 LineString addToGeometrySimpleExtension(java.lang.Object geometrySimpleExtension)
          add a value to the geometrySimpleExtension property collection
 LineString addToLineStringObjectExtension(AbstractObject lineStringObjectExtension)
          add a value to the lineStringObjectExtension property collection
 LineString addToLineStringSimpleExtension(java.lang.Object lineStringSimpleExtension)
          add a value to the lineStringSimpleExtension property collection
 LineString addToObjectSimpleExtension(java.lang.Object objectSimpleExtension)
          add a value to the objectSimpleExtension property collection
 LineString clone()
           
 java.util.List<Coordinate> createAndSetCoordinates()
          Creates a new instance of List<Coordinate and set it to this.coordinates.
 boolean equals(java.lang.Object obj)
           
 AltitudeMode getAltitudeMode()
           
 java.util.List<Coordinate> getCoordinates()
           
 java.util.List<AbstractObject> getLineStringObjectExtension()
           
 java.util.List<java.lang.Object> getLineStringSimpleExtension()
           
 int hashCode()
           
 java.lang.Boolean isExtrude()
           
 java.lang.Boolean isTessellate()
           
 void setAltitudeMode(AltitudeMode value)
           
 void setCoordinates(java.util.List<Coordinate> coordinates)
           
 void setExtrude(java.lang.Boolean value)
           
 void setGeometryObjectExtension(java.util.List<AbstractObject> geometryObjectExtension)
           
 void setGeometrySimpleExtension(java.util.List<java.lang.Object> geometrySimpleExtension)
           
 void setLineStringObjectExtension(java.util.List<AbstractObject> lineStringObjectExtension)
           
 void setLineStringSimpleExtension(java.util.List<java.lang.Object> lineStringSimpleExtension)
           
 void setObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
           
 void setTessellate(java.lang.Boolean value)
           
 LineString withAltitudeMode(AltitudeMode altitudeMode)
          fluent setter
 LineString withCoordinates(java.util.List<Coordinate> coordinates)
          fluent setter
 LineString withExtrude(java.lang.Boolean extrude)
          fluent setter
 LineString withGeometryObjectExtension(java.util.List<AbstractObject> geometryObjectExtension)
          fluent setter
 LineString withGeometrySimpleExtension(java.util.List<java.lang.Object> geometrySimpleExtension)
          fluent setter
 LineString withId(java.lang.String id)
          fluent setter
 LineString withLineStringObjectExtension(java.util.List<AbstractObject> lineStringObjectExtension)
          fluent setter
 LineString withLineStringSimpleExtension(java.util.List<java.lang.Object> lineStringSimpleExtension)
          fluent setter
 LineString withObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
          fluent setter
 LineString withTargetId(java.lang.String targetId)
          fluent setter
 LineString withTessellate(java.lang.Boolean tessellate)
          fluent setter
 
Methods inherited from class de.micromata.opengis.kml.v_2_2_0.Geometry
getGeometryObjectExtension, getGeometrySimpleExtension
 
Methods inherited from class de.micromata.opengis.kml.v_2_2_0.AbstractObject
getId, getObjectSimpleExtension, getTargetId, setId, setTargetId
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

extrude

protected java.lang.Boolean extrude

Boolean value. Specifies whether to connect the LineString to the ground. To extrude a LineString, the altitude mode must be either relativeToGround, relativeToSeaFloor, or absolute. The vertices in the LineString are extruded toward the center of the Earth's sphere.

Boolean value. Specifies whether to connect the LinearRing to the ground. To extrude this geometry, the altitude mode must be either relativeToGround, relativeToSeaFloor, or absolute. Only the vertices of the LinearRing are extruded, not the center of the geometry. The vertices are extruded toward the center of the Earth's sphere.

Boolean value. Specifies whether to connect the Polygon to the ground. To extrude a Polygon, the altitude mode must be either relativeToGround, relativeToSeaFloor, or absolute. Only the vertices are extruded, not the geometry itself (for example, a rectangle turns into a box with five faces. The vertices of the Polygon are extruded toward the center of the Earth's sphere.

Boolean value. Specifies whether to connect the point to the ground with a line. To extrude a Point, the value for must be either relativeToGround, relativeToSeaFloor, or absolute. The point is extruded toward the center of the Earth's sphere.


tessellate

protected java.lang.Boolean tessellate

Boolean value. Specifies whether to allow the LineString to follow the terrain. To enable tessellation, the altitude mode must be clampToGround or clampToSeaFloor. Very large LineStrings should enable tessellation so that they follow the curvature of the earth (otherwise, they may go underground and be hidden).

Boolean value. Specifies whether to allow the LinearRing to follow the terrain. To enable tessellation, the value for must be clampToGround or clampToSeaFloor. Very large LinearRings should enable tessellation so that they follow the curvature of the earth (otherwise, they may go underground and be hidden).

Boolean value. Specifies whether to allow the Polygon to follow the terrain. To enable tessellation, the Polygon must have an altitude mode of clampToGround or clampToSeaFloor. Very large Polygons should enable tessellation so that they follow the curvature of the earth (otherwise, they may go underground and be hidden).


altitudeMode

protected AltitudeMode altitudeMode
AltitudeMode

clampToGround, relativeToGround, absolute

See Also: See and


coordinates

protected java.util.List<Coordinate> coordinates
(required)

A single tuple consisting of floating point values for longitude, latitude, and altitude (in that order). Longitude and latitude values are in degrees, where longitude ≥ −180 and <= 180 latitude ≥ −90 and ≤ 90 altitude values (optional) are in meters above sea level

Do not include spaces between the three values that describe a coordinate.

Two or more coordinate tuples, each consisting of floating point values for longitude, latitude, and altitude. The altitude component is optional. Insert a space between tuples. Do not include spaces within a tuple.


lineStringSimpleExtension

protected java.util.List<java.lang.Object> lineStringSimpleExtension

lineStringObjectExtension

protected java.util.List<AbstractObject> lineStringObjectExtension

This is an abstract base class and cannot be used directly in a KML file. It provides the id attribute, which allows unique identification of a KML element, and the targetId attribute, which is used to reference objects that have already been loaded into Google Earth. The id attribute must be assigned if the mechanism is to be used.

Syntax:
<!-- abstract element; do not create -->
 <!-- Object id="ID" targetId="NCName" -->
 <!-- /Object> -->

Constructor Detail

LineString

public LineString()
Method Detail

isExtrude

public java.lang.Boolean isExtrude()
Returns:
possible object is Boolean

setExtrude

public void setExtrude(java.lang.Boolean value)
Parameters:
value - allowed object is Boolean
See Also:
extrude

isTessellate

public java.lang.Boolean isTessellate()
Returns:
possible object is Boolean

setTessellate

public void setTessellate(java.lang.Boolean value)
Parameters:
value - allowed object is Boolean
See Also:
tessellate

getAltitudeMode

public AltitudeMode getAltitudeMode()
Returns:
possible object is <Object <AltitudeMode <de.micromata.opengis.kml.v_2_2_0.gx.AltitudeMode
See Also:
altitudeMode

setAltitudeMode

public void setAltitudeMode(AltitudeMode value)
Parameters:
value - allowed object is <Object <AltitudeMode <de.micromata.opengis.kml.v_2_2_0.gx.AltitudeMode
See Also:
altitudeMode

getLineStringSimpleExtension

public java.util.List<java.lang.Object> getLineStringSimpleExtension()
See Also:
lineStringSimpleExtension

getLineStringObjectExtension

public java.util.List<AbstractObject> getLineStringObjectExtension()
See Also:
lineStringObjectExtension

getCoordinates

public java.util.List<Coordinate> getCoordinates()
See Also:
coordinates

hashCode

public int hashCode()
Overrides:
hashCode in class Geometry

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class Geometry

setCoordinates

public void setCoordinates(java.util.List<Coordinate> coordinates)
Parameters:
coordinates -
See Also:
coordinates

addToCoordinates

public LineString addToCoordinates(double longitude,
                                   double latitude)
add a value to the coordinates property collection

Parameters:
longitude - required parameter
latitude - required parameter
Returns:
true (as general contract of Collection.add).

addToCoordinates

public LineString addToCoordinates(double longitude,
                                   double latitude,
                                   double altitude)
add a value to the coordinates property collection

Parameters:
altitude - required parameter
longitude - required parameter
latitude - required parameter
Returns:
true (as general contract of Collection.add).

addToCoordinates

public LineString addToCoordinates(java.lang.String coordinates)
add a value to the coordinates property collection

Parameters:
coordinates - required parameter
Returns:
true (as general contract of Collection.add).

setLineStringSimpleExtension

public void setLineStringSimpleExtension(java.util.List<java.lang.Object> lineStringSimpleExtension)
Parameters:
lineStringSimpleExtension -
See Also:
lineStringSimpleExtension

addToLineStringSimpleExtension

public LineString addToLineStringSimpleExtension(java.lang.Object lineStringSimpleExtension)
add a value to the lineStringSimpleExtension property collection

Parameters:
lineStringSimpleExtension - Objects of the following type are allowed in the list: Object
Returns:
true (as general contract of Collection.add).

setLineStringObjectExtension

public void setLineStringObjectExtension(java.util.List<AbstractObject> lineStringObjectExtension)
Parameters:
lineStringObjectExtension -
See Also:
lineStringObjectExtension

addToLineStringObjectExtension

public LineString addToLineStringObjectExtension(AbstractObject lineStringObjectExtension)
add a value to the lineStringObjectExtension property collection

Parameters:
lineStringObjectExtension - Objects of the following type are allowed in the list: AbstractObject
Returns:
true (as general contract of Collection.add).

setObjectSimpleExtension

public void setObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
Overrides:
setObjectSimpleExtension in class Geometry
See Also:
objectSimpleExtension

addToObjectSimpleExtension

public LineString addToObjectSimpleExtension(java.lang.Object objectSimpleExtension)
Description copied from class: AbstractObject
add a value to the objectSimpleExtension property collection

Overrides:
addToObjectSimpleExtension in class Geometry
Parameters:
objectSimpleExtension - Objects of the following type are allowed in the list: Object
Returns:
true (as general contract of Collection.add).

setGeometrySimpleExtension

public void setGeometrySimpleExtension(java.util.List<java.lang.Object> geometrySimpleExtension)
Overrides:
setGeometrySimpleExtension in class Geometry
See Also:
geometrySimpleExtension

addToGeometrySimpleExtension

public LineString addToGeometrySimpleExtension(java.lang.Object geometrySimpleExtension)
Description copied from class: Geometry
add a value to the geometrySimpleExtension property collection

Overrides:
addToGeometrySimpleExtension in class Geometry
Parameters:
geometrySimpleExtension - Objects of the following type are allowed in the list: Object
Returns:
true (as general contract of Collection.add).

setGeometryObjectExtension

public void setGeometryObjectExtension(java.util.List<AbstractObject> geometryObjectExtension)
Overrides:
setGeometryObjectExtension in class Geometry
See Also:
geometryObjectExtension

addToGeometryObjectExtension

public LineString addToGeometryObjectExtension(AbstractObject geometryObjectExtension)
Description copied from class: Geometry
add a value to the geometryObjectExtension property collection

Overrides:
addToGeometryObjectExtension in class Geometry
Parameters:
geometryObjectExtension - Objects of the following type are allowed in the list: AbstractObject
Returns:
true (as general contract of Collection.add).

withExtrude

public LineString withExtrude(java.lang.Boolean extrude)
fluent setter

Parameters:
extrude - required parameter
See Also:
setExtrude(Boolean)

withTessellate

public LineString withTessellate(java.lang.Boolean tessellate)
fluent setter

Parameters:
tessellate - required parameter
See Also:
setTessellate(Boolean)

withAltitudeMode

public LineString withAltitudeMode(AltitudeMode altitudeMode)
fluent setter

Parameters:
altitudeMode - required parameter
See Also:
#setAltitudeMode(Object)

withCoordinates

public LineString withCoordinates(java.util.List<Coordinate> coordinates)
fluent setter

Parameters:
coordinates - required parameter
See Also:
#setCoordinates(List)

withLineStringSimpleExtension

public LineString withLineStringSimpleExtension(java.util.List<java.lang.Object> lineStringSimpleExtension)
fluent setter

Parameters:
lineStringSimpleExtension - required parameter
See Also:
#setLineStringSimpleExtension(List)

withLineStringObjectExtension

public LineString withLineStringObjectExtension(java.util.List<AbstractObject> lineStringObjectExtension)
fluent setter

Parameters:
lineStringObjectExtension - required parameter
See Also:
#setLineStringObjectExtension(List)

withObjectSimpleExtension

public LineString withObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
Description copied from class: AbstractObject
fluent setter

Overrides:
withObjectSimpleExtension in class Geometry
Parameters:
objectSimpleExtension - required parameter
See Also:
#setObjectSimpleExtension(List)

withId

public LineString withId(java.lang.String id)
Description copied from class: AbstractObject
fluent setter

Overrides:
withId in class Geometry
Parameters:
id - required parameter
See Also:
AbstractObject.setId(String)

withTargetId

public LineString withTargetId(java.lang.String targetId)
Description copied from class: AbstractObject
fluent setter

Overrides:
withTargetId in class Geometry
Parameters:
targetId - required parameter
See Also:
AbstractObject.setTargetId(String)

withGeometrySimpleExtension

public LineString withGeometrySimpleExtension(java.util.List<java.lang.Object> geometrySimpleExtension)
Description copied from class: Geometry
fluent setter

Overrides:
withGeometrySimpleExtension in class Geometry
Parameters:
geometrySimpleExtension - required parameter
See Also:
#setGeometrySimpleExtension(List)

withGeometryObjectExtension

public LineString withGeometryObjectExtension(java.util.List<AbstractObject> geometryObjectExtension)
Description copied from class: Geometry
fluent setter

Overrides:
withGeometryObjectExtension in class Geometry
Parameters:
geometryObjectExtension - required parameter
See Also:
#setGeometryObjectExtension(List)

createAndSetCoordinates

public java.util.List<Coordinate> createAndSetCoordinates()
Creates a new instance of List<Coordinate and set it to this.coordinates. This method is a short version for:
 
 List newValue = new List();
 this.setCoordinates(newValue); 
 


clone

public LineString clone()
Overrides:
clone in class Geometry