org.onebusaway.transit_data_federation.model
Class ProjectedPoint

java.lang.Object
  extended by org.onebusaway.transit_data_federation.model.ProjectedPoint
All Implemented Interfaces:
Serializable

public class ProjectedPoint
extends Object
implements Serializable

Simple point class that keeps both the global lat-lon representation and the projected x-y representation for faster distance calculations.

Author:
bdferris
See Also:
Serialized Form

Constructor Summary
ProjectedPoint(double lat, double lon, double x, double y, int srid)
           
 
Method Summary
 double distance(ProjectedPoint p)
           
 boolean equals(Object obj)
           
 double getLat()
           
 double getLon()
           
 int getSrid()
           
 double getX()
           
 double getY()
           
 int hashCode()
          Object Interface
 CoordinatePoint toCoordinatePoint()
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ProjectedPoint

public ProjectedPoint(double lat,
                      double lon,
                      double x,
                      double y,
                      int srid)
Method Detail

getLat

public double getLat()

getLon

public double getLon()

toCoordinatePoint

public CoordinatePoint toCoordinatePoint()

getX

public double getX()

getY

public double getY()

getSrid

public int getSrid()

distance

public double distance(ProjectedPoint p)

hashCode

public int hashCode()
Object Interface

Overrides:
hashCode in class Object

equals

public boolean equals(Object obj)
Overrides:
equals in class Object

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2011 OneBusAway. All Rights Reserved.