geometric_features.feature_collection.FeatureCollection

class geometric_features.feature_collection.FeatureCollection(features=None, otherProperties=None)[source]

An object for representing and manipulating a collection of geoscientific geometric features.

Variables
  • features (list of dict) – A list of python dictionaries describing each feature, following the geojson convention

  • otherProperties (dict) – Other properties of the feature collection such as type and groupName

__init__(features=None, otherProperties=None)[source]

Construct a new feature collection

featureslist of dict, optional

A list of python dictionaries describing each feature, following the geojson convention

otherPropertiesdict

Other properties of the feature collection such as type and groupName

Methods

__init__([features, otherProperties])

Construct a new feature collection

add_feature(feature)

Add a feature to the feature collection if it isn’t alerady present

combine(featureName)

Combines the geometry of the feature collection into a single feature

difference(maskingFC[, show_progress])

Use features from a masking collection to mask out (remove part of the geometry from) this collection.

feature_in_collection(feature)

Is this feature already in the collection?

fix_antimeridian()

Split features at +/-180 degrees (the antimeridian) to make them valid geojson geometries

merge(other)

Merge another feature collection into this one

plot(projection[, maxLength, figsize, …])

Plot the features on a map using cartopy.

set_group_name(groupName)

Set the group name of a feature collection

simplify([tolerance])

Features in the collection are simplified using shapely

tag(tags[, remove])

Add tags to all features in the collection

to_geojson(fileName[, stripHistory, indent])

Write the feature collection to a geojson file