public class SdTouchPoint
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
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) |
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 otherwiseSdTouchPoint
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 LongitudeSdTouchPoint
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 pointSdTouchPoint
or null if error.public static SdTouchPoint load(java.io.DataInput dis)
save(DataOutput)
.dis
- DataInput
Serialized TouchpointSdTouchPoint
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)