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

Reading Geometric Features

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.

Splitting new data into Geometric Features

GeometricFeatures.split(fc[, destinationDir])

Split a feature collection into individual files for each feature.

write_feature_names_and_tags([...])

Make a json file with all the available features and tags by component and object type, used to update the file when new geometric features are added to the repo

Reading a Feature Collection

read_feature_collection(fileName)

Read a feature collection from a geojson file.

Creating a Feature Collection

FeatureCollection([features, otherProperties])

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

Manipulating a Feature Collection

FeatureCollection.add_feature(feature)

Add a feature to the feature collection if it isn't already 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.

Aggregation

aggregation

aggregation.get_aggregator_by_name(region_group)

Get a geojson mask file and the appropriate file suffix for the given region group.

aggregation.ocean

aggregation.ocean.subbasins(gf)

Aggregates ocean regions into the following larger sub-basins: * Arctic Ocean Basin * North Atlantic Basin * South Atlantic Basin * North Pacific Basin * South Pacific Basin * Indian Ocean Basin * Southern Ocean Basin

aggregation.ocean.basins(gf)

Aggregate Global Ocean as well as Atlantic, Pacific, Indian, Arctic, Southern Ocean, Equatorial (global 15S-15N), and Mediterranean basins

aggregation.ocean.moc(gf)

Aggregate features defining the ocean basins used in computing the meridional overturning circulation (MOC)

aggregation.ocean.arctic(gf)

Aggregate ocean-relevant Arctic regions

aggregation.ocean.antarctic(gf)

Aggregate Antarctic regions similar to Timmermann et al. (2013).

aggregation.ocean.ismip6_greenland(gf)

Aggregate Greenland continental shelf regions similar to ISMIP6

aggregation.ocean.ice_shelves(gf)

Aggregate 106 Antarctic ice shelves and ice-shelf regions

aggregation.ocean.transport(gf)

Aggregate standard transport transects

aggregation.seaice

aggregation.seaice.arctic(gf)

Aggregate sea-ice-relevant Arctic regions

aggregation.seaice.qgreenland(gf)

Aggregate regions defining median monthly arctic sea ice extent (1981-2010) from the QGreenland dataset (doi:10.5281/zenodo.12823307).

aggregation.landice.nasa_greenland(gf)

Aggregate NASA Greenland ice sheet basin regions extended to continental shelf.