neatnet.FaceArtifacts#
- class neatnet.FaceArtifacts(gdf, index='circular_compactness', height_mins=-inf, height_maxs=0.008, prominence=0.00075)[source]#
Identify face artifacts in street networks.
For a given street network composed of transportation-oriented geometry containing features representing things like roundabouts, dual carriegaways and complex intersections, identify areas enclosed by geometry that is considered a face artifact as per [FV24]. Face artifacts highlight areas with a high likelihood of being of non-morphological (e.g. transporation) origin and may require simplification prior morphological analysis. See [FV24] for more details.
- Parameters:
- gdf
geopandas.GeoDataFrame
GeoDataFrame containing street network represented as (Multi)LineString geometry
- index
str
,optional
A type of the shape compacntess index to be used. Available are [‘circlular_compactness’, ‘isoperimetric_quotient’, ‘diameter_ratio’], by default “circular_compactness”
- height_mins
float
,optional
Required depth of valleys, by default -np.inf
- height_maxs
float
,optional
Required height of peaks, by default 0.008
- prominence
float
,optional
Required prominence of peaks, by default 0.00075
- gdf
- Attributes:
- threshold
float
Identified threshold between face polygons and face artifacts
- face_artifacts
GeoDataFrame
A GeoDataFrame of geometries identified as face artifacts
- polygons
GeoDataFrame
All polygons resulting from polygonization of the input gdf with the face_artifact_index
- kde
scipy.stats._kde.gaussian_kde
Representation of a kernel-density estimate using Gaussian kernels.
- pdf
numpy.ndarray
Probability density function
- peaks
numpy.ndarray
locations of peaks in pdf
- valleys
numpy.ndarray
locations of valleys in pdf
- threshold
Notes
In purely synthetic scenarios where all calculated face artifact index values are equal (e.g. a regular grid/lattice) a
LinAlgError
error will be raised. This is virtually guaranteed to not happen in practice.Examples
>>> fa = neatnet.FaceArtifacts(street_network_prague) >>> fa.threshold 6.9634555986177045 >>> fa.face_artifacts.head() geometry face_artifact_index 6 POLYGON ((-744164.625 -1043922.362, -744167.39... 5.112844 9 POLYGON ((-744154.119 -1043804.734, -744152.07... 6.295660 10 POLYGON ((-744101.275 -1043738.053, -744103.80... 2.862871 12 POLYGON ((-744095.511 -1043623.478, -744095.35... 3.712403 17 POLYGON ((-744488.466 -1044533.317, -744489.33... 5.158554
- __init__(gdf, index='circular_compactness', height_mins=-inf, height_maxs=0.008, prominence=0.00075)[source]#
Methods
__init__
(gdf[, index, height_mins, ...])