neatnet.get_artifacts

Contents

neatnet.get_artifacts#

neatnet.get_artifacts(roads, threshold=None, threshold_fallback=None, area_threshold_blocks=100000.0, isoareal_threshold_blocks=0.5, area_threshold_circles=50000.0, isoareal_threshold_circles_enclosed=0.75, isoperimetric_threshold_circles_touching=0.9, exclusion_mask=None, predicate='intersects')[source]#

Extract face artifacts and return the FAI threshold. See [FV24] for more details.

Parameters:
roadsgeopandas.GeoDataFrame

Input roads that have been preprocessed.

thresholdNone | float | int = None

First option threshold used to determine face artifacts. See the artifact_threshold keyword argument in simplify.simplify_network().

threshold_fallbackNone | float | int = None

Second option threshold used to determine face artifacts. See the artifact_threshold_fallback keyword argument in simplify.simplify_network().

area_threshold_blocksfloat | int = 1e5

This is the first threshold for detecting block-like artifacts whose Face Artifact Index (see [FV24]) is above the value passed in artifact_threshold. If a polygon has an area below area_threshold_blocks, and is of elongated shape (see also isoareal_threshold_blocks), and touches at least one polygon that has already been classified as artifact, then it will be classified as an artifact.

isoareal_threshold_blocksfloat | int = 0.5

This is the second threshold for detecting block-like artifacts whose Face Artifact Index (see [FV24]) is above the value passed in artifact_threshold. If a polygon has an isoareal quotient below isoareal_threshold_blocks (see esda.shape.isoareal_quotient), i.e., if it has an elongated shape; and it has a sufficiently small area (see also area_threshold_blocks), and if it touches at least one polygon that has already been detected as an artifact, then it will be classified as an artifact.

area_threshold_circlesfloat | int = 5e4

This is the first threshold for detecting circle-like artifacts whose Face Artifact Index (see [FV24]) is above the value passed in artifact_threshold. If a polygon has an area below area_threshold_circles, and one of the following 2 cases is given: (a) the polygon is touched, but not enclosed by polygons already classified as artifacts, and with an isoperimetric quotient (see esda.shape.isoperimetric_quotient) above isoperimetric_threshold_circles_touching, i.e., if its shape is close to circular; or (b) the polygon is fully enclosed by polygons already classified as artifacts, and with an isoareal quotient above isoareal_threshold_circles_enclosed, i.e., if its shape is close to circular; then it will be classified as an artifact.

isoareal_threshold_circles_enclosedfloat | int = 0.75

This is the second threshold for detecting circle-like artifacts whose Face Artifact Index (see [FV24]) is above the value passed in artifact_threshold. If a polygon has a sufficiently small area (see also area_threshold_circles), and the polygon is fully enclosed by polygons already classified as artifacts, and its isoareal quotient (see esda.shape.isoareal_quotient) is above the value passed to isoareal_threshold_circles_enclosed, i.e., if its shape is close to circular; then it will be classified as an artifact.

isoperimetric_threshold_circles_touchingfloat | int = 0.9

This is the third threshold for detecting circle-like artifacts whose Face Artifact Index (see [FV24]) is above the value passed in artifact_threshold. If a polygon has a sufficiently small area (see also area_threshold_circles), and the polygon is touched by at least one polygon already classified as artifact, and its isoperimetric quotient (see esda.shape.isoperimetric_quotient) is above the value passed to isoperimetric_threshold_circles_touching, i.e., if its shape is close to circular; then it will be classified as an artifact.

exclusion_maskNone | geopandas.GeoSeries = None

Polygons used to determine face artifacts to exclude from returned output.

predicatestr = ‘intersects’

The spatial predicate used to exclude face artifacts from returned output.

Returns:
artifactsgeopandas.GeoDataFrame

Face artifact polygons.

thresholdfloat

Resultant artifact detection threshold from FaceArtifacts.threshold. May also be the returned value of threshold or threshold_fallback.