neatnet.get_artifacts#
- neatnet.get_artifacts(streets, *, exclusion_mask=None, predicate='intersects', 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)[source]#
Extract face artifacts and return the FAI threshold. See [FV24] for more details.
Compared to
FaceArtifacts, this further includes a routine extending the set of originally discovered artifacts based on continuity and custom thresholds.- Parameters:
- streets
geopandas.GeoDataFrame Input streets that have been preprocessed.
- exclusion_mask
None|geopandas.GeoSeries=None Geometries used to determine face artifacts to exclude from returned output.
- predicate
str= ‘intersects’ The spatial predicate used to exclude face artifacts from returned output.
- threshold
None|float|int=None First option threshold used to determine face artifacts. See the
artifact_thresholdkeyword argument insimplify.neatify().- threshold_fallback
None|float|int=None Second option threshold used to determine face artifacts. See the
artifact_threshold_fallbackkeyword argument insimplify.neatify().- 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.
- streets
- Returns:
- artifacts
geopandas.GeoDataFrame Face artifact polygons.
- threshold
float|None Resultant artifact detection threshold from
FaceArtifacts.threshold. May also be the returned value ofthresholdorthreshold_fallback.
- artifacts