|
Routify Documentation
|
Public Member Functions | |
| CustomVertex (double latitude, double longitude, Long osmId) | |
| void | loadMetaData () |
| void | setAltitude (double altitude) |
| String | toString () |
| double[] | toLineStringArray () |
| double[] | toLonLatArray () |
| Long | getOsmId () |
| double | getLon () |
| double | getLat () |
| double | getAltitude () |
| double | getNoise () |
| boolean | equals (Object compareTo) |
| int | hashCode () |
| long | computeId () |
| double | getPm10 () |
| void | setPm10 (double pm10) |
| long | getId () |
Static Public Member Functions | |
| static CustomVertex | getByNodeId (long nodeId) |
| static double | distance (CustomVertex from, CustomVertex to) |
Represents a custom vertex in a graph, uniquely identified by a UUID and an OpenStreetMap ID (osmId). Each vertex is characterized by geographical coordinates (latitude, longitude) and optionally altitude and noise level. This class supports determining if a vertex represents a tunnel or a bridge and includes utility methods for geographical calculations.
The primary coordinate system used is EPSG:4326 (WGS 84).
|
inline |
Constructs a CustomVertex with specified geographical coordinates, tunnel and bridge status, and an OpenStreetMap ID. Altitude and noise level are retrieved from the Routify system if available; otherwise, they are initialized to sentinel values.
| latitude | The latitude of the vertex in decimal degrees. |
| longitude | The longitude of the vertex in decimal degrees. |
| osmId | The OpenStreetMap ID associated with the vertex. |
|
inline |
Computes a deterministic id using the full range of a long value. This provides maximum uniqueness and distribution for the coordinates and OSM ID.
|
inlinestatic |
Calculates the distance in meters between two CustomVertex instances using the Haversine formula. This method considers the earth's curvature and is appropriate for short distances.
| from | The starting CustomVertex. |
| to | The ending CustomVertex. |
|
inline |
Compares this CustomVertex with another object for equality, based on latitude and longitude.
| compareTo | The object to compare with. |
|
inline |
|
inlinestatic |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Generates a strong hash code for this CustomVertex based on its coordinates and OSM ID. Uses a combination of bit manipulation and prime number multiplication for better distribution.
|
inline |
|
inline |
|
inline |
|
inline |
Converts the CustomVertex to a double array containing the latitude and longitude. This format is compatible with the "coordinates" array in a GeoJSON "LineString" object.
|
inline |
Converts the CustomVertex to a double array containing the longitude and latitude. This format is often used in geographic systems, where the order is [longitude, latitude]. It is compatible with coordinate formats used by many map APIs and geographic data systems.
|
inline |
Returns a string representation of the vertex in the format "(latitude,longitude)".