org.eclipse.ohf.stem.definitions.adapters.spatial.geo
Class LatLong.Segment
java.lang.Object
org.eclipse.ohf.stem.definitions.adapters.spatial.geo.LatLong.Segment
- Enclosing class:
- LatLong
public static class LatLong.Segment
- extends java.lang.Object
This class represents a sequence of latitude/longitude data pairs. A
segment could form a closed polygon or it could be a path.
Methods inherited from class java.lang.Object |
getClass, notify, notifyAll, wait, wait, wait |
LatLong.Segment
public LatLong.Segment(double[][] data)
- Parameters:
data
- an array of latitude/longitude pairs
latitude
public double latitude(int i)
- Parameters:
i
- the index of the data pair
- Returns:
- the latitude value of the i'th latitude/longitude data pair
longitude
public double longitude(int i)
- Parameters:
i
- the index of the latitude/longitude data pair
- Returns:
- the longitude value of the i'th latitude/longitude data pair
size
public int size()
- Returns:
- the number of latitude/longitude data pairs
isPolygon
public boolean isPolygon()
- Returns:
true
if the sequence of lat/long pairs form a
closed polygon, false
, otherwise.
toInlineURIString
public java.lang.String toInlineURIString()
- Returns:
- create a URI string the encodes the latitude/longitude values
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
- See Also:
Object.toString()
hashCode
public int hashCode()
- Overrides:
hashCode
in class java.lang.Object
- See Also:
Object.hashCode()
equals
public boolean equals(java.lang.Object obj)
- Overrides:
equals
in class java.lang.Object
- See Also:
Object.equals(java.lang.Object)