Roads
GET /contesto/strade
Composition of the road network around the point, by road type.
Example Request
curl --location 'https://sandbox-context.realitycs.it/contesto/strade?latitudine=43.32215&longitudine=11.3259&raggio=250' \
--header 'Authorization: Bearer <token>'
Request Fields
| Field | Required | Default | Description | Type | Example | Notes |
|---|---|---|---|---|---|---|
latitudine | yes | Latitude of the point | number | 43.32215 | ||
longitudine | yes | Longitude of the point | number | 11.3259 | ||
raggio | optional | 500 | Search radius around the point, in metres | number | 250 | From 1 to 1000 |
JSON keys in the response:
strade is an array with one entry per road type found around the point:
- tipo: Name of the road type, in Italian. Observed values include
Locali,Pedonali / ciclabiliandResidenziali / servizio. - per: Share of that type on the road network of the area, in percentage.
The array is not a fixed list
Only the types actually present around the point are returned, so the length of the array and the set of tipo values change from one call to another. Do not index into the array by position, and do not expect a given type to be there: look it up by tipo and treat a missing entry as zero.
Shares, not lengths
per is a percentage of the local road network, not a distance. The values of a response add up to 100, so they describe the character of the area rather than how much road there is.
Example Response
{
"contesto": {
"strade": [
{
"tipo": "Locali",
"per": 9.31
},
{
"tipo": "Pedonali / ciclabili",
"per": 58.89
},
{
"tipo": "Residenziali / servizio",
"per": 31.8
}
]
}
}