de.micromata.opengis.kml.v_2_2_0.gx
Class LatLonQuad

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

public class LatLonQuad
extends AbstractObject
implements java.lang.Cloneable

Allows non-rectangular quadrilateral ground overlays.

If a third value is inserted into any tuple (representing altitude) it will be ignored. Altitude is set using and (or ) extending . Allowed altitude modes are absolute, clampToGround, and clampToSeaFloor.

Specifies the coordinates of the four corner points of a quadrilateral defining the overlay area. Exactly four coordinate tuples have to be provided, each consisting of floating point values for longitude and latitude. Insert a space between tuples. Do not include spaces within a tuple. The coordinates must be specified in counter-clockwise order with the first coordinate corresponding to the lower-left corner of the overlayed image. The shape described by these corners must be convex.

Syntax:
<GroundOverlay id="ID">
   ...
   <Icon>...</Icon>
   <altitude>0</altitude>
   <altitudeMode>clampToGround</altitudeMode>                   <!-- or absolute -->
          <!-- can substitute <gx:altitudeMode>clampToSeaFloor</gx:altitudeMode> -->
 
   <gx:LatLonQuad>
     <coordinates>...</coordinates>              <!-- four lon,lat tuples -->
   </gx:LatLonQuad>
 </GroundOverlay>
Extends:


Field Summary
protected  java.util.List<Coordinate> coordinates
           (required)
 
Fields inherited from class de.micromata.opengis.kml.v_2_2_0.AbstractObject
id, objectSimpleExtension, targetId
 
Constructor Summary
LatLonQuad()
           
 
Method Summary
 LatLonQuad addToCoordinates(double longitude, double latitude)
          add a value to the coordinates property collection
 LatLonQuad addToCoordinates(double longitude, double latitude, double altitude)
          add a value to the coordinates property collection
 LatLonQuad addToCoordinates(java.lang.String coordinates)
          add a value to the coordinates property collection
 LatLonQuad addToObjectSimpleExtension(java.lang.Object objectSimpleExtension)
          add a value to the objectSimpleExtension property collection
 LatLonQuad 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)
           
 java.util.List<Coordinate> getCoordinates()
           
 int hashCode()
           
 void setCoordinates(java.util.List<Coordinate> coordinates)
           
 void setObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
           
 LatLonQuad withCoordinates(java.util.List<Coordinate> coordinates)
          fluent setter
 LatLonQuad withId(java.lang.String id)
          fluent setter
 LatLonQuad withObjectSimpleExtension(java.util.List<java.lang.Object> objectSimpleExtension)
          fluent setter
 LatLonQuad withTargetId(java.lang.String targetId)
          fluent setter
 
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

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.

Constructor Detail

LatLonQuad

public LatLonQuad()
Method Detail

getCoordinates

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

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractObject

equals

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

setCoordinates

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

addToCoordinates

public LatLonQuad 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 LatLonQuad 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 LatLonQuad 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).

setObjectSimpleExtension

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

addToObjectSimpleExtension

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

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

withCoordinates

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

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

withObjectSimpleExtension

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

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

withId

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

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

withTargetId

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

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

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 LatLonQuad clone()
Overrides:
clone in class AbstractObject