javax.microedition.location
Class GeographicArea

java.lang.Object
  extended by javax.microedition.location.GeographicArea
Direct Known Subclasses:
CircleGeographicArea, PolygonGeographicArea, RectangleGeographicArea

public abstract class GeographicArea
extends java.lang.Object

This interface represents a geographical area on the surface on WGS 84 Ellipsoid (see reference [WGS84]). In the calculations related to these geographical areas the altitude information contained in the Coordinates object is ignored. All geographical areas deal with Coordinates objects Therefore if an instance of QualifiedCoordinates is used to construct a geographical area, the accuracy information from the QualifiedCoordinates is not preserved. These issues apply also to the subclasses of this class. The more shape specific geographic area classes CircleGeographicArea, RectangleGeographicArea and PolygonGeographicArea extend this class. Applications can use these classes to request services, for example, from the MapServiceProvider.

This interface provides methods common to all shape specific geographic area classes.

Since:
2.0

Method Summary
abstract  boolean containsCoordinates(Coordinates coordinate)
          With this method an application can check if the given coordinate is inside this GeographicArea object.
abstract  RectangleGeographicArea getBoundingBox()
          Returns the RectangleGeographicArea object that surrounds this geographic area completely.
abstract  Coordinates getCenterPoint()
          Returns the coordinates of the center point of this geographic area.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

containsCoordinates

public abstract boolean containsCoordinates(Coordinates coordinate)

With this method an application can check if the given coordinate is inside this GeographicArea object. If the given coordinate is null, false is returned.

Parameters:
coordinate - a coordinates to be checked
Returns:
true, if the given point is inside this geographical area, else false

getBoundingBox

public abstract RectangleGeographicArea getBoundingBox()

Returns the RectangleGeographicArea object that surrounds this geographic area completely. This is the smallest rectangle that can be drawn around the area. If the area is bigger than what is allowed in WGS 84 coordinate system, the rectangle is truncated to valid WGS 84 coordinate values. The RectangeleGeographicArea is always aligned with parallels and meridians.

Returns:
a RectangleGeographicArea object containing this area

getCenterPoint

public abstract Coordinates getCenterPoint()

Returns the coordinates of the center point of this geographic area.

Returns:
the center point coordinates of the area


Copyright © 2003-2008 Nokia Corporation. All Rights Reserved.
Java is a trademark of Sun Microsystems, Inc.