Corridor Shortener Entrypoint
The Corridor Shortener endpoint is deprecated since March 2017 and may be removed in future releases.
The Corridor Shortener Entrypoint shortens Browse by Corridor Entrypoint's route parameter using Google's polyline encoding format and additionally simplifies it with Radial-Distance algorithm (fast) or Douglas-Peucker (high quality) algorithm if necessary.
With most of the devices it is not possible to use Corridor Entrypoint with URL of more than 2000 characters. Additionally, it is not recommended to have unencoded routes with more than 120 coordinates. To overcome the size limits, this entrypoint could be used to reduce the length of the URL. The result of this entrypoint contains an URL that should be used for subsequent corridor requests.
If encoding the coordinates is not sufficient to reduce URL length, simplifying algorithm is applied. In the process of simplification deviation can emerge. To cover the same space of an original route we provide a new corridor width.
The Corridor Shortener Entrypoint is a Places (Search) API Deprecated entrypoint.
Entrypoint URI
/browse/by-corridor/short
Entrypoint Parameters
Parameter | Type | Description |
---|---|---|
cat | Comma-separated list; optional | A comma-separated list of category ids defining an OR-filter that all places reachable through the resource must match. For a list of supported categories, see the Categories documentation. |
name | String; optional | Plain-text name of a place used to filter out the results. For example, "Brandenburger Tor" The name parameter is mutually exclusive with the 'q' parameter. |
cs | Comma-separated list; optional | A comma-separated ordered list of category systems defining which type of category systems should be returned in the response. Valid category systems are 'places', 'cuisines', and 'pds'. For example cs=places,cuisines |
POST Method
The POST method provides access to the object that contains simplified corridor route and new corridor width. The request must have a Content-Type of application/json
.
Representation Modifiers
The following options are available in this context:
Parameter | Type | Description |
---|---|---|
size | Number (non-negative integer); optional | The maximum number of result items in each collection. |
tf | String; optional; default: html. | Text format. Determines how rich text properties such as location.address.text should be rendered. Note: plain text can still be multiline. In this case newline symbol ("\n" ) is used to separate lines. Supported values are:
|
show_refs | Comma-separated list; optional | A list of one or more external system names or reference types. This parameter exposes place related external references in response. For a full description see Representation Modifiers documentation. |
show_content | Comma-separated list; optional | A list of one or more available content types you can add to the response. For a full description see Representation Modifiers documentation. |
For additional information and examples, see Changing Responses with Representation Modifiers.
Response Media Type
Responses to requests to this endpoint will have the urn:nlp-types:simplified-corridor
media type. See the urn:nlp-types:simplified-corridor
media type documentation for details about the structure and content of the response.
Request Example
Shortens URL for a route corridor with more than 150 coordinates and 2 km off route distance.
https://places.sit.ls.hereapi.com/places/v1/browse/by-corridor/short
?app_id={YOUR_APP_ID}
&app_code={YOUR_APP_CODE}
&cat=petrol-station
&pretty
Request body
{
"route": "[49.2403332,9.1021303|49.2403793,9.1014647|49.2403686,9.1013467|49.2403042,9.1010356|49.2399824,9.0998662|49.2397356,9.0991151|49.2396605,9.0987933|49.2395747,9.0982568|49.2394996,9.0956497|49.2394888,9.0953493|49.2395639,9.0953171|49.2396069,9.0952528|49.2396283,9.0951347|49.2396069,9.0950274|49.2395639,9.0949631|49.2394888,9.0949309|49.2394137,9.0942764|49.239285,9.0937293|49.2386949,9.0917552|49.2385983,9.0913475|49.2384696,9.0907252|49.2382765,9.0895021|49.2382014,9.0887403|49.2381692,9.0882146|49.2381585,9.0872383|49.2381907,9.086498|49.2382872,9.0853608|49.2389095,9.0811014|49.2390382,9.0799642|49.2390811,9.0793526|49.2390811,9.078902|49.2390597,9.0785265|49.2389739,9.0777647|49.238888,9.0773678|49.2387378,9.0767884|49.2381692,9.0771747|49.2372572,9.0777433|49.2367744,9.0779901|49.2357981,9.0784514|49.2350578,9.0787196|49.2347252,9.0788269|49.2337489,9.0790951|49.2330301,9.0792239|49.2321718,9.0793204|49.2315602,9.0793419|49.2311311,9.0793312|49.2304659,9.0792775|49.2300153,9.0792239|49.2293608,9.0790951|49.2289102,9.0789771|49.228245,9.0787303|49.2267323,9.0781295|49.2262924,9.0780008|49.2258418,9.0778935|49.2253911,9.0778184|49.2249298,9.0777862|49.2243505,9.0777969|49.2239213,9.0778399|49.2235243,9.077915|49.2228055,9.0781081|49.2223442,9.0782797|49.2218935,9.0784943|49.2214537,9.0787303|49.2208636,9.0791166|49.2203379,9.0795457|49.218353,9.0813804|49.2178166,9.0817988|49.2174625,9.0820348|49.2169046,9.0823352|49.2165399,9.082464|49.215982,9.082582|49.2155313,9.0825927|49.2152417,9.0825605|49.2148662,9.0824747|49.2145014,9.082346|49.2141366,9.0821743|49.213568,9.0817773|49.2131495,9.0814018|49.2129028,9.0811229|49.2124414,9.0804684|49.2122912,9.0802217|49.211905,9.0794706|49.2118406,9.0793097|49.2116368,9.0787411|49.2111003,9.0768421|49.210875,9.0758657|49.2113471,9.0756083|49.2114866,9.0755332|49.2116261,9.0754151|49.2117655,9.0752649|49.211905,9.0750611|49.2119908,9.0748894|49.2121196,9.0744603|49.2121518,9.0742886|49.2121732,9.0737844|49.2121518,9.0735269|49.2120445,9.0730655|49.2119265,9.0726471|49.211905,9.0724325|49.211905,9.0722179|49.2119265,9.0720141|49.2120123,9.0715635|49.2123878,9.0706515|49.212935,9.0692139|49.2132461,9.068259|49.2135251,9.0673578|49.2138791,9.0660918|49.2142224,9.0646434|49.2144048,9.0637422|49.2147052,9.0621114|49.2148447,9.0611351|49.2149949,9.0598154|49.2150915,9.0588284|49.2151451,9.0580988|49.2152417,9.0559852|49.2152309,9.0537429|49.2151451,9.051801|49.2149734,9.0499771|49.2147911,9.0484107|49.214201,9.0437651|49.2139864,9.0418124|49.2139006,9.0408254|49.2136967,9.0379715|49.2136216,9.0360832|49.2136002,9.0352464|49.2135894,9.0322745|49.2136323,9.0307617|49.2136645,9.0303433|49.2137074,9.0290129|49.2137933,9.0277362|49.2139864,9.0250862|49.2141151,9.0236485|49.214437,9.0206659|49.2147803,9.0178871|49.2154777,9.0130484|49.217838,8.9994013|49.2180741,8.9981461|49.219265,8.991183|49.2208743,8.9820421|49.221282,8.9795423|49.2216039,8.9773428|49.221915,8.9748108];w=2000"
}
Response Example
{
"href": "http://.../places/v1/corridor?size=20&offset=0&apiKey={YOUR_API_KEY}&route=agpkHiwpv@GdC@VJ|@~@hFp@tCL~@PjBNhO@z@ODGJCVBTFJNDLbCXlBtBhKRpAXzBd@rFLvCFhB@bEGrCQ`F{BrYYbFIxB?xADjANvCPnA\rBpBmAtDqB~Aq@bE{ArCs@`AUbEu@lCYjDSxBCtA@dCJxAH`CXxAVdCn@lHxBvAVxATxAN|ADpBAtAGnAOnCe@zAa@xAk@vAo@tBkAhBuAjKoJjBqAdAo@nB{@hAYlBWxAAx@DjAPfAXhA`@pBnArAhAn@v@zAbC\n@lAtCJ`@h@nBhBzJl@bE}Ar@[L[V[\[f@Qb@WrAGb@CbBBr@TzAVrABh@?j@Cf@QxAiAtDmB~G}@~Dw@rDeAzFeA`Hc@rD{@dI[bE]fGSdEIpCSdL@~LPbK`@lJb@vHtB`\\j@dKNdEh@xPLxJBfDBpQIlHErAGhGQ~Fe@pOY~G_ArQeAjPiCf]wMftAo@zFmFnj@aIbx@qArN_AvL}@xN;w=1000&cat=petrol-station;w=2097&cat=petrol-station",
"newCorridorWidth": 2097
}