cartagen.detect_dual_carriageways

cartagen.detect_dual_carriageways#

detect_dual_carriageways(roads, importance=None, value=None, concavity=0.85, elongation=6.0, compactness=0.12, area=60000.0, width=20.0, huber=16)#

Detect dual carriageways based on geometric properties.

This algorithm proposed by Touya [1] detects the network faces as road separator (i.e. separation between dual carriageways) when the polygon meets the geometric requirements. Those values can be tweaked to fine-tune the detection, but complex interchange will nonetheless cause wrong characterization.

Parameters:
  • roads (GeoDataFrame of LineString) – Road network to analyze.

  • importance (str, optional) – The attribute name of the data on which road importance is based. Default value is set to None which means every road is taken for the network face calculation.

  • value (int, optional) – Maximum value of the importance attribute. Roads with an importance higher than this value will not be taken.

  • concavity (float, optional) – Maximum concavity.

  • elongation (float, optional) – Minimum elongation.

  • compactness (float, optional) – Maximum compactness.

  • area (float, optional) – Area factor to detect very long motorways.

  • width (float, optional) – Maximum width of the the minimum_rotated_rectangle.

  • huber (int, optional) – Huber width for long motorways.

See also

collapse_dual_carriageways

Collapse dual carriageways using a TIN skeleton.

Notes

  • concavity is the area of the polygon divided by the area of its convex hull.

  • elongation is the length of the minimum_rotated_rectangle divided by its width.

  • compactness is calculated using \((4·pi·area)/(perimeter^2)\)

References

(Source code)

../_images/detect_dual_carriageways.png