API reference

This page provides an auto-generated summary of the geometric features API. For more details and examples, refer to the relevant chapters in the main part of the documentation.

Command-line scripts

combine_features()

Entry point for combining features from a file

difference_features()

Entry point for differencing features from a file

fix_features_at_antimeridian()

Entry point for splitting features that cross +/- 180 degrees

merge_features()

Entry point for merging features from the geometric_data cache

plot_features()

Entry point for plotting features from a file

set_group_name()

Set the group name of the feature collection

split_features()

Features in the collection are split into individual files in the geometric_data cache

simplify_features()

Features in the collection are simplified using shapely

tag_features()

Features in the collection are tagged with the given tag(s)

Python package

GeometricFeatures([cacheLocation, …])

An object for keeping track of where geometric features are cached and downloading missing features as needed.

GeometricFeatures.read(componentName, objectType)

Read one or more features from the cached collection of geometric features.

GeometricFeatures.split(fc[, destinationDir])

Split a feature collection into individual files for each feature.

read_feature_collection(fileName)

Read a feature collection from a geojson file.

FeatureCollection([features, otherProperties])

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

FeatureCollection.add_feature(feature)

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

FeatureCollection.merge(other)

Merge another feature collection into this one

FeatureCollection.tag(tags[, remove])

Add tags to all features in the collection

FeatureCollection.set_group_name(groupName)

Set the group name of a feature collection

FeatureCollection.combine(featureName)

Combines the geometry of the feature collection into a single feature

FeatureCollection.difference(maskingFC[, …])

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

FeatureCollection.fix_antimeridian()

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

FeatureCollection.simplify([tolerance])

Features in the collection are simplified using shapely

FeatureCollection.feature_in_collection(feature)

Is this feature already in the collection?

FeatureCollection.to_geojson(fileName[, …])

Write the feature collection to a geojson file

FeatureCollection.plot(projection[, …])

Plot the features on a map using cartopy.