0

We are new to Here Api, Our team is working on one transportation project in which we required to get max speed limit of road using vehicle (latitude ,longitude). From last few days we are trying to figure out which api should we use in HereApi to achieve what we want.

Arnav A
  • 11

1 Answers1

0

Regarding this documentation of HERE Route Matching 8: https://developer.here.com/documentation/route-matching/api-reference.html

Send please POST request like:

https://routematching.hereapi.com/v8/match/routelinks?apikey=LXX1Axs75efnlFAlgbPxVekPDR0Hz6rTcRHQMT0EvQs&routeMatch=1&mode=fastest;car;traffic:disabled;&attributes=SPEED_LIMITS_FCn(*),LINK_ATTRIBUTE_FCn(*),TRAFFIC_PATTERN_FCn(*),TRUCK_SPEED_LIMITS_FCn(*),SPEED_LIMITS_VAR_FCn(*),SPEED_LIMITS_COND_FCn(*)

With in body:

LATITUDE,LONGITUDE

37.4201866,15.049515

See please attached the Postman collection for test of HERE Rote Match API v8 https://developer.here.com/documentation/route-matching/dev_guide/index.html :

{
    "info": {
        "_postman_id": "2563b7cc-2d62-4485-bb64-2f9561318aa2",
        "name": "RMEspeed_limit",
        "schema": "https://schema.getpostman.com/json/collection/v2.1.0/collection.json",
        "_exporter_id": "1051680"
    },
    "item": [
        {
            "name": "speed_limit",
            "request": {
                "method": "POST",
                "header": [],
                "body": {
                    "mode": "raw",
                    "raw": "LATITUDE,LONGITUDE\r\n37.4201866,15.049515"
                },
                "url": {
                    "raw": "https://routematching.hereapi.com/v8/match/routelinks?apikey=LXX1Axs75efnlFAlgbPxVekPDR0Hz6rTcRHQMT0EvQs&routeMatch=1&mode=fastest;car;traffic:disabled;&attributes=SPEED_LIMITS_FCn(*),LINK_ATTRIBUTE_FCn(*),TRAFFIC_PATTERN_FCn(*),TRUCK_SPEED_LIMITS_FCn(*),SPEED_LIMITS_VAR_FCn(*),SPEED_LIMITS_COND_FCn(*) ",
                    "protocol": "https",
                    "host": [
                        "routematching",
                        "hereapi",
                        "com"
                    ],
                    "path": [
                        "v8",
                        "match",
                        "routelinks"
                    ],
                    "query": [
                        {
                            "key": "apikey",
                            "value": "LXX1Axs75efnlFAlgbPxVekPDR0Hz6rTcRHQMT0EvQs"
                        },
                        {
                            "key": "routeMatch",
                            "value": "1"
                        },
                        {
                            "key": "mode",
                            "value": "fastest;car;traffic:disabled;"
                        },
                        {
                            "key": "attributes",
                            "value": "SPEED_LIMITS_FCn(*),LINK_ATTRIBUTE_FCn(*),TRAFFIC_PATTERN_FCn(*),TRUCK_SPEED_LIMITS_FCn(*),SPEED_LIMITS_VAR_FCn(*),SPEED_LIMITS_COND_FCn(*) "
                        }
                    ]
                }
            },
            "response": []
        }
    ]
}

An apikey and coordinate you specify your own for sure.

About all layers attributes you can see this example: https://demo.support.here.com/pde/maps?url_root=pde.api.here.com

In Python you should use normal POST request using some http libraries developed for Python: https://www.geeksforgeeks.org/get-post-requests-using-python/