This script reads a road spatial layer and retrieves the speed limit (in KPH) for each road section using the HERE API. To use this script:
- Install required Python dependencies:
pip install -r requirements.txt - Obtain a HERE API key from HERE
- Enter your API key in the script by setting the
HERE_API_KEYvariable. - Place your spatial layer (in Shapefile, JSON, GeoJSON, or KML format) in the
datafolder. - Update the
ROAD_LAYER_PATHvariable in the script to match your spatial layer’s filename. If not specified, the sample fileLRS_HIGHWAY_NETWORK_2018.kmlwill be used. - Run the script:
python main.py