|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectde.cm.osm2po.sd.routing.SdTouchPoint
public class SdTouchPoint
This class represents a geographic point on the graph. It can be both, a Vertex or an arbitray virtual point on edge.
Method Summary | |
---|---|
static SdTouchPoint |
create(SdGraph sdGraph,
double lat,
double lon,
int[] edgeIdxs,
int edgeFlags)
Finds the closest edge for a coordinate. |
static SdTouchPoint |
create(SdGraph sdGraph,
double lat,
double lon,
int edgeIdx,
int pointIdx,
boolean isPoint)
Creates a TouchPoint from already known attributes. |
static SdTouchPoint |
create(SdGraph sdGraph,
float lat,
float lon)
Finds the closest point and creates an SdTouchPoint . |
static SdTouchPoint |
create(SdGraph sdGraph,
float lat,
float lon,
boolean carMode)
Convenience method which calls create(SdGraph, float, float, int)
with either SdEdge.FLAG_CAR or
SdEdge.FLAG_BIKE |SdEdge.FLAG_FOOT |
static SdTouchPoint |
create(SdGraph sdGraph,
float lat,
float lon,
int edgeFlags)
Finds the closest point and creates an SdTouchPoint . |
static SdTouchPoint |
create(SdGraph sdGraph,
java.lang.String key)
Reconstructs a TouchPoint from a String created by getKey() . |
SdSection[] |
createIncomingSections(SdGraph sdGraph)
Returns the outgoing edges of a TouchPoint. |
SdSection[] |
createOutgoingSections(SdGraph sdGraph)
Returns the outgoing edges of a TouchPoint. |
boolean |
equals(java.lang.Object obj)
|
int |
getEdgeIdx()
|
int |
getEdgePointIdx()
|
long[] |
getGeometryIn()
|
long[] |
getGeometryOut()
|
java.lang.String |
getKey()
Returns a unique key for a TouchPoint. |
double |
getLat()
|
double |
getLon()
|
double |
getRatio()
|
boolean |
isPoint()
|
static SdTouchPoint |
load(java.io.DataInput dis)
Reconstructs a TouchPoint from a Stream created by save(DataOutput) . |
boolean |
save(java.io.DataOutput dos)
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public int getEdgeIdx()
public int getEdgePointIdx()
public boolean isPoint()
public double getLat()
public double getLon()
public double getRatio()
public long[] getGeometryIn()
public long[] getGeometryOut()
public static SdTouchPoint create(SdGraph sdGraph, float lat, float lon, boolean carMode)
create(SdGraph, float, float, int)
with either SdEdge.FLAG_CAR
or
SdEdge.FLAG_BIKE
|SdEdge.FLAG_FOOT
sdGraph
- SdGraph
lat
- float Latitudelon
- float LongitudecarMode
- true: optimize for carMode, foot/bike otherwise
SdTouchPoint
or null if not foundpublic static SdTouchPoint create(SdGraph sdGraph, float lat, float lon)
SdTouchPoint
.
Calls create(SdGraph, float, float, int)
with
SdEdge.FLAG_NULL
as last parameter.
sdGraph
- SdGraph
lat
- float Latitudelon
- float Longitude
SdTouchPoint
or null if not foundpublic static SdTouchPoint create(SdGraph sdGraph, float lat, float lon, int edgeFlags)
SdTouchPoint
.
Calls SdGraph.findCloseEdgeIdxs(float, float)
internally.
sdGraph
- SdGraph
lat
- float Latitudelon
- float LongitudeedgeFlags
- int mask for allowed way-types or SdEdge.FLAG_NULL
SdTouchPoint
, if found or null.public static SdTouchPoint create(SdGraph sdGraph, double lat, double lon, int edgeIdx, int pointIdx, boolean isPoint)
sdGraph
- SdGraph
lat
- double Latitudelon
- double LongitudeedgeIdx
- int Index of Edge (only forward edges accepted)pointIdx
- int Index of geometry-point of edgeisPoint
- boolean true: coordinate is given by point
SdTouchPoint
or null if error.public static SdTouchPoint load(java.io.DataInput dis)
save(DataOutput)
.
dis
- DataInput
Serialized Touchpoint
SdTouchPoint
or null if errorpublic static SdTouchPoint create(SdGraph sdGraph, java.lang.String key)
getKey()
.
Calls create(SdGraph, double, double, int, int, boolean)
.
sdGraph
- SdGraph
key
- String Unique key.
SdTouchPoint
or null.public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getKey()
create(SdGraph, String)
public boolean save(java.io.DataOutput dos)
public static SdTouchPoint create(SdGraph sdGraph, double lat, double lon, int[] edgeIdxs, int edgeFlags)
sdGraph
- SdGraph
lat
- double Latitudelon
- double LongitudeedgeIdxs
- int[] EdgeIdx-Array, Set of edges to be analyzed.edgeFlags
- int mask for allowed way-types or SdEdge.FLAG_NULL
SdTouchPoint
, null if not found.public SdSection[] createOutgoingSections(SdGraph sdGraph)
sdGraph
- SdGraph
SdSection
public SdSection[] createIncomingSections(SdGraph sdGraph)
sdGraph
- SdGraph
SdSection
|
osm2po-sd-5.0.0 (c) December 24 2014 Carsten Moeller - info@osm2po.de | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |