com.veriplace.client
Class Position

java.lang.Object
  extended by com.veriplace.client.Position
Direct Known Subclasses:
Location, PointOfInterest, StreetIntersection

public class Position
extends java.lang.Object

Base class for objects that describe a geographic location.

Longitude, latitude, and uncertainty radius are always required. All other properties, such as street address, are optional and will be null (rather than empty strings) if not available.

Since:
2.7

Constructor Summary
Position(double longitude, double latitude, double uncertainty, java.lang.String street, java.lang.String street2, java.lang.String neighborhood, java.lang.String city, java.lang.String state, java.lang.String postal, java.lang.String countryCode)
           
Position(Position copyFrom)
           
 
Method Summary
 java.lang.String getAddressLine()
          A single line combining the address properties in the format "street, city, state postal".
 java.lang.String getCity()
          City name, if available.
 java.lang.String getCountryCode()
          Country code, if available.
 double getLatitude()
          Latitude, in degrees.
 double getLongitude()
          Longitude, in degrees.
 java.lang.String getNeighborhood()
          Neighborhood name, if available.
 java.lang.String getPostal()
          Postal code, if available.
 java.lang.String getState()
          State name, if available.
 java.lang.String getStreet()
          Street address, if available.
 java.lang.String getStreet2()
          Second street address line, if available.
 double getUncertainty()
          Approximate uncertainty radius, in meters.
 java.lang.String toString()
          Default string conversion using the format "(longitude, latitude, uncertainty)".
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Position

public Position(Position copyFrom)

Position

public Position(double longitude,
                double latitude,
                double uncertainty,
                java.lang.String street,
                java.lang.String street2,
                java.lang.String neighborhood,
                java.lang.String city,
                java.lang.String state,
                java.lang.String postal,
                java.lang.String countryCode)
Method Detail

getLongitude

public double getLongitude()
Longitude, in degrees.


getLatitude

public double getLatitude()
Latitude, in degrees.


getUncertainty

public double getUncertainty()
Approximate uncertainty radius, in meters.


getStreet

public java.lang.String getStreet()
Street address, if available.

This may represent a house number, street, or intersection.


getStreet2

public java.lang.String getStreet2()
Second street address line, if available.

If this position represents a street intersection, this is the cross street.


getNeighborhood

public java.lang.String getNeighborhood()
Neighborhood name, if available.

Note that neighbhorhood data is only available for certain metro regions.


getCity

public java.lang.String getCity()
City name, if available.


getState

public java.lang.String getState()
State name, if available.


getPostal

public java.lang.String getPostal()
Postal code, if available.


getCountryCode

public java.lang.String getCountryCode()
Country code, if available.


getAddressLine

public java.lang.String getAddressLine()
A single line combining the address properties in the format "street, city, state postal". Returns an empty string if none of these are present.


toString

public java.lang.String toString()
Default string conversion using the format "(longitude, latitude, uncertainty)".

Overrides:
toString in class java.lang.Object