de.micromata.opengis.kml.v_2_2_0
Class LinearRing

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.LinearRing
All Implemented Interfaces:
java.lang.Cloneable

public class LinearRing
extends Geometry
implements java.lang.Cloneable

Defines a closed line string, typically the outer boundary of a Polygon. Optionally, a LinearRing can also be used as the inner boundary of a Polygon to create holes in the Polygon. A Polygon can contain multiple elements used as inner boundaries.

Note: In Google Earth, a Polygon with an of clampToGround follows the great circle; however, a LinearRing (by itself) with an of clampToGround follows lines of constant latitude.

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


Field Summary
protected  AltitudeMode altitudeMode
          AltitudeMode
protected  java.util.List<Coordinate> coordinates
           (required)
protected  java.lang.Boolean extrude
          
protected  java.util.List<AbstractObject> linearRingObjectExtension
          
protected  java.util.List<java.lang.Object> linearRingSimpleExtension
           
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
LinearRing()
           
 
Method Summary
 LinearRing addToCoordinates(double longitude, double latitude)
          add a value to the coordinates property collection
 LinearRing addToCoordinates(double longitude, double latitude, double altitude)
          add a value to the coordinates property collection
 LinearRing addToCoordinates(java.lang.String coordinates)
          add a value to the coordinates property collection
 LinearRing addToGeometryObjectExtension(AbstractObject geometryObjectExtension)
          add a value to the geometryObjectExtension property collection
 LinearRing addToGeometrySimpleExtension(java.lang.Object geometrySimpleExtension)
          add a value to the geometrySimpleExtension property collection
 LinearRing addToLinearRingObjectExtension(AbstractObject linearRingObjectExtension)
          add a value to the linearRingObjectExtension property collection
 LinearRing addToLinearRingSimpleExtension(java.lang.Object linearRingSimpleExtension)
          add a value to the linearRingSimpleExtension property collection
 LinearRing addToObjectSimpleExtension(java.lang.Object objectSimpleExtension)
          add a value to the objectSimpleExtension property collection
 LinearRing 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> getLinearRingObjectExtension()
           
 java.util.List<java.lang.Object> getLinearRingSimpleExtension()
           
 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 setLinearRingObjectExtension(java.util.List<AbstractObject> linearRingObjectExtension)
           
 void setLinearRingSimpleExtension(java.util.List<java.lang.Object> linearRingSimpleExtension)
           
 void setObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
           
 void setTessellate(java.lang.Boolean value)
           
 LinearRing withAltitudeMode(AltitudeMode altitudeMode)
          fluent setter
 LinearRing withCoordinates(java.util.List<Coordinate> coordinates)
          fluent setter
 LinearRing withExtrude(java.lang.Boolean extrude)
          fluent setter
 LinearRing withGeometryObjectExtension(java.util.List<AbstractObject> geometryObjectExtension)
          fluent setter
 LinearRing withGeometrySimpleExtension(java.util.List<java.lang.Object> geometrySimpleExtension)
          fluent setter
 LinearRing withId(java.lang.String id)
          fluent setter
 LinearRing withLinearRingObjectExtension(java.util.List<AbstractObject> linearRingObjectExtension)
          fluent setter
 LinearRing withLinearRingSimpleExtension(java.util.List<java.lang.Object> linearRingSimpleExtension)
          fluent setter
 LinearRing withObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
          fluent setter
 LinearRing withTargetId(java.lang.String targetId)
          fluent setter
 LinearRing 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.


linearRingSimpleExtension

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

linearRingObjectExtension

protected java.util.List<AbstractObject> linearRingObjectExtension

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

LinearRing

public LinearRing()
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

getLinearRingSimpleExtension

public java.util.List<java.lang.Object> getLinearRingSimpleExtension()
See Also:
linearRingSimpleExtension

getLinearRingObjectExtension

public java.util.List<AbstractObject> getLinearRingObjectExtension()
See Also:
linearRingObjectExtension

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 LinearRing 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 LinearRing 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 LinearRing 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).

setLinearRingSimpleExtension

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

addToLinearRingSimpleExtension

public LinearRing addToLinearRingSimpleExtension(java.lang.Object linearRingSimpleExtension)
add a value to the linearRingSimpleExtension property collection

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

setLinearRingObjectExtension

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

addToLinearRingObjectExtension

public LinearRing addToLinearRingObjectExtension(AbstractObject linearRingObjectExtension)
add a value to the linearRingObjectExtension property collection

Parameters:
linearRingObjectExtension - 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 LinearRing 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 LinearRing 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 LinearRing 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 LinearRing withExtrude(java.lang.Boolean extrude)
fluent setter

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

withTessellate

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

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

withAltitudeMode

public LinearRing withAltitudeMode(AltitudeMode altitudeMode)
fluent setter

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

withCoordinates

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

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

withLinearRingSimpleExtension

public LinearRing withLinearRingSimpleExtension(java.util.List<java.lang.Object> linearRingSimpleExtension)
fluent setter

Parameters:
linearRingSimpleExtension - required parameter
See Also:
#setLinearRingSimpleExtension(List)

withLinearRingObjectExtension

public LinearRing withLinearRingObjectExtension(java.util.List<AbstractObject> linearRingObjectExtension)
fluent setter

Parameters:
linearRingObjectExtension - required parameter
See Also:
#setLinearRingObjectExtension(List)

withObjectSimpleExtension

public LinearRing 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 LinearRing 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 LinearRing 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 LinearRing 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 LinearRing 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 LinearRing clone()
Overrides:
clone in class Geometry