Feature

Luo_Suppe2026-08-15

gma.gio.Feature

class Feature(geom = None, values = [], gtype = None, ftypes = None, crs = None):

Feature object for vector data. Create a Feature object.

Parameters:

geom: None||Geometry. Default = None

The geometry of the feature. If None, create an empty geometry.

values: list. Default = []

The field values of the feature.

gtype: str. Default = None

The geometry type of the feature. See `dtypes.DefinedGeomTypes` for valid types. If None, use the geometry type of `geom`.

ftypes: None||listofFieldType. Default = None

The FieldTypes of the feature. If None, create an empty FieldTypes.

crs: str. Default = None

The projection of the geometry. If None, no projection is set.


Methods

copy

[method] .copy():

copy self. --> Feature


plot

[method] .plot(ax = None, **kwargs):

Make plots of Geometry.

Optional:

ax = None||matplotlib.~.AxesSubplot. Default None.

A matplotlib subplot. If None, a default axes will be created.

**kwargs.

Other plotting parameters. For more, see: ~.carto.utils.PolyCollection/LineCollection/PointCollection.

Returns:

matplotlib.~.AxesSubplot.


set_fid

[method] .set_fid(fid):

Set the feature identifier.

Parameters:

fid: int.

the new feature identifier value to assign.


set_geom

[method] .set_geom(geom):

Set feature geometry. This function updates the features geometry, except that this function does not assume ownership of the passed geometry, but instead makes a copy of it.

Parameters:

geom: Geometry.

new geometry to apply to feature.


update

[method] .update(other):

Set one feature from another. Overwrite the contents of this feature from the geometry and attributes of another.

Parameters:

other: Feature.

feature from which geometry and field values will be copied.


Property

crs

Get coordinate reference system. --> CoordinateReferenceSystem


fid

Get feature identifier. --> int


fields

Get fields for feature. --> dict


ftypes

Get field types for feature. --> FieldTypes


geom

Get geometry for feature. --> Geometry


Last Updated 8/15/2026, 8:42:21 AM