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 (
GeoDataFrameofLineString) – 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 theminimum_rotated_rectangle.huber (
int, optional) – Huber width for long motorways.
See also
collapse_dual_carriagewaysCollapse 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_rectangledivided by its width.compactness is calculated using \((4·pi·area)/(perimeter^2)\)
References