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:
- roads
geopandas.GeoDataFrame
Input roads that have been preprocessed.
- threshold
None
|float
|int
=None
First option threshold used to determine face artifacts. See the
artifact_threshold
keyword argument insimplify.simplify_network()
.- threshold_fallback
None
|float
|int
=None
Second option threshold used to determine face artifacts. See the
artifact_threshold_fallback
keyword argument insimplify.simplify_network()
.- area_threshold_blocks
float
|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 belowarea_threshold_blocks
, and is of elongated shape (see alsoisoareal_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_blocks
float
|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 belowisoareal_threshold_blocks
(seeesda.shape.isoareal_quotient
), i.e., if it has an elongated shape; and it has a sufficiently small area (see alsoarea_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_circles
float
|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 belowarea_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 (seeesda.shape.isoperimetric_quotient
) aboveisoperimetric_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 aboveisoareal_threshold_circles_enclosed
, i.e., if its shape is close to circular; then it will be classified as an artifact.- isoareal_threshold_circles_enclosed
float
|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 alsoarea_threshold_circles
), and the polygon is fully enclosed by polygons already classified as artifacts, and its isoareal quotient (seeesda.shape.isoareal_quotient
) is above the value passed toisoareal_threshold_circles_enclosed
, i.e., if its shape is close to circular; then it will be classified as an artifact.- isoperimetric_threshold_circles_touching
float
|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 alsoarea_threshold_circles
), and the polygon is touched by at least one polygon already classified as artifact, and its isoperimetric quotient (seeesda.shape.isoperimetric_quotient
) is above the value passed toisoperimetric_threshold_circles_touching
, i.e., if its shape is close to circular; then it will be classified as an artifact.- exclusion_mask
None
|geopandas.GeoSeries
=None
Polygons used to determine face artifacts to exclude from returned output.
- predicate
str
= ‘intersects’ The spatial predicate used to exclude face artifacts from returned output.
- roads
- Returns:
- artifacts
geopandas.GeoDataFrame
Face artifact polygons.
- threshold
float
Resultant artifact detection threshold from
FaceArtifacts.threshold
. May also be the returned value ofthreshold
orthreshold_fallback
.
- artifacts