Skip to content

Commit a9d0f91

Browse files
committed
Fix areas documentation in profiles.md
1 parent 5328a65 commit a9d0f91

File tree

1 file changed

+19
-13
lines changed

1 file changed

+19
-13
lines changed

docs/core/profiles.md

Lines changed: 19 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -333,23 +333,29 @@ speed:
333333
areas:
334334
custom1:
335335
type: "Feature"
336-
# the following 'id' entry will be ignored and a 'properties' entry must be avoided or empty
337-
id: "something"
336+
id: "something" # optional, but will be ignored
337+
properties: { } # optional, but will be ignored
338338
geometry:
339339
type: "Polygon"
340-
coordinates: [
341-
[ 10.75, 46.65 ],
342-
[ 9.54, 45.65 ],
343-
[ 10.75, 44.65 ],
344-
[8.75, 44.65],
345-
[8.75, 45.65],
346-
[8.75, 46.65]
347-
]
340+
coordinates: [ [
341+
[ 1.525, 42.511 ],
342+
[ 1.510, 42.503 ],
343+
[ 1.531, 42.495 ],
344+
[ 1.542, 42.505 ],
345+
[ 1.525, 42.511 ]
346+
] ]
348347
```
349348

350-
The areas are given in GeoJson format, but currently only Polygons are allowed. Note that JSON can be directly copied
351-
into YAML without further modifications. Using the `areas` feature you can also block entire areas i.e. by multiplying
352-
the speed with `0`, but for this you should rather use the `priority` section that we will explain next.
349+
Areas are given in GeoJson format, but currently only the exact format in the above example is supported, i.e. one
350+
object with type `Feature`, a geometry with type `Polygon` and optional id and properties fields. Note that the
351+
coordinates array of `Polygon` is an array of arrays that each must describe a closed ring, i.e. the first point must be
352+
equal to the last. Each point is given as an array [longitude, latitude], so the coordinates array has three dimensions
353+
total.
354+
355+
Since YAML is a superset of JSON you can also paste GeoJSON to the `areas` section directly.
356+
357+
Using the `areas` feature you can also block entire areas i.e. by multiplying the speed with `0`, but for this you
358+
should rather use the `priority` section that we will explain next.
353359

354360
#### Customizing `priority`
355361

0 commit comments

Comments
 (0)