This API provides OpenLR decoding capabilities, allowing users to convert binary OpenLR location references into human-readable formats. It supports decoding LinearLocationReference and PointAlongLineLocationReference, extracting relevant details such as reference points, functional road class, form of way, and calculated geographic coordinates.
This API is built using:
- HERE Data SDK for Java/Scala - Provides tools for location data processing and OpenLR decoding.
- HERE Flexible Polyline - Used for encoding and decoding polylines efficiently.
- HERE Route Matching v8 - Used for matching OpenLR decoded locations to real-world road networks.
Before using this API, you must:
- Install the HERE Data SDK.
- Obtain valid credentials from HERE Platform.
- Ensure access to HERE Route Matching v8 API for accurate road matching.
This endpoint accepts a list of OpenLR binary-encoded strings (Base64 format) and returns a JSON representation of the decoded location reference.
{
"openlr_data": [
"CC0BEAIpJN5Pc+9JxgAJBQQAAl0ACgQDACUAABz/6wAJBQQAAtwAAABABwwCAQA=",
"CD0BEAA5ON4cEfFiqQAJBQQBA7cACgUEAelnAPEEAlEACQUEAQNIAHABz7YCswAJBQQBA8YACgUEAZ9VAAAA"
]
}{
"decoded_results": [
{
"type": "LinearLocationReference",
"firstReferencePoint": {
"coordinate": {
"lat": -3.73625,
"lon": -38.51415
},
"lineProperties": {
"bearing": 142,
"bearingDegrees": 199.7,
"frc": 3,
"fow": 3,
"fowDescription": "SINGLE_CARRIAGEWAY"
},
"pathProperties": {
"lfrcnp": 3,
"dnp": 63,
"againstDrivingDirection": false
}
},
"lastReferencePoint": {
"coordinate": {
"lat": -3.73679,
"lon": -38.51433
},
"lineProperties": {
"bearing": 14,
"bearingDegrees": 19.7,
"frc": 3,
"fow": 3,
"fowDescription": "SINGLE_CARRIAGEWAY"
}
}
}
]
}- OpenLR Decoding: Supports decoding binary OpenLR data into structured JSON.
- Geographic Coordinates: Converts reference points into WGS84 latitude/longitude.
- Road Classification: Extracts information such as Functional Road Class (FRC) and Form of Way (FOW).
- Route Matching: Uses HERE Route Matching v8 API to integrate decoded locations with real-world road networks.
- Java 8+
- Jackson JSON Processing Library
- HERE Data SDK (Requires valid credentials from HERE Platform)
- HERE Route Matching v8 API Access
- Clone the repository:
git clone https://github.com/your-repo/openlr-api.git
- Build the project:
mvn clean install
- Run the API server:
java -jar target/openlr-api.jar
This project is licensed under the MIT License.
