no.uio.edd.utils.geoutils
Class GeoPoint
java.lang.Object
no.uio.edd.utils.geoutils.GeoFeature
no.uio.edd.utils.geoutils.GeoPoint
public class GeoPoint
- extends GeoFeature
Class for storing any geographical point. Currently 2d only.
- Author:
- oeide
Constructor Summary |
GeoPoint(double x,
double y)
Create a new geographical point object given the coordinate for it. |
GeoPoint(org.w3c.dom.Node rootNode,
java.lang.String offsetMapType,
java.lang.String id)
Create a new geographical point object based on an XML node |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
GeoPoint
public GeoPoint(double x,
double y)
- Create a new geographical point object given the coordinate for it.
- Parameters:
x
- y
-
GeoPoint
public GeoPoint(org.w3c.dom.Node rootNode,
java.lang.String offsetMapType,
java.lang.String id)
throws GeoLocationException
- Create a new geographical point object based on an XML node
- Parameters:
rootNode
- The node including the XML describing the ordinates.offsetMapType
- A string describing a map with a different zero meridian than
Greenwich. If empty, Greenwich is assumed.id
- A string ID for this object.
- Throws:
GeoLocationException
toString
public java.lang.String toString()
- Overrides:
toString
in class java.lang.Object
asGML
public java.lang.String asGML()
- Description copied from class:
GeoFeature
- The GML fragment returned by this method should contain everything from
the level of the specific geometry, that is, from gml:Point, gml:Polygon,
etc.
- Specified by:
asGML
in class GeoFeature
- Returns:
- An XML-GML fragment representing my vector geometry, if
application; otherwise, return an empty string.
asCoordList
public java.lang.String asCoordList()
- Specified by:
asCoordList
in class GeoFeature
getX
public double getX()
getY
public double getY()
setX
public double setX(double x)
setY
public double setY(double y)
toGeoPointArr
public static GeoPoint[] toGeoPointArr(ExtendableObjectList objList)
- Convert an ExtendableObjectList containing GeoPoint objects to a GeoPoint
array, removing null elements.
- Parameters:
objList
- The object list.
- Returns:
- The array.
getMidpoint
public GeoPoint getMidpoint()
- Specified by:
getMidpoint
in class GeoFeature
moveMe
public GeoPoint moveMe(double offsetX,
double offsetY)