altair.Feature#
- class altair.Feature(geometry=Undefined, properties=Undefined, type=Undefined, bbox=Undefined, id=Undefined, **kwds)#
Feature schema 的包装器。
一个包含几何信息和相关属性的特征对象。 https://tools.ietf.org/html/rfc7946#section-3.2
- 参数:
- geometrydict,
Point
,Polygon
,Geometry
,LineString
,MultiPoint
,MultiPolygon
,MultiLineString
,GeometryCollection
特征的几何信息
- propertiesdict,
GeoJsonProperties
, None 与此特征关联的属性。
- typeLiteral[‘Feature’]
指定 GeoJSON 对象的类型。
- bbox
BBox
, Sequence[float] 对象的几何、特征或特征集合的坐标范围的边界框。 https://tools.ietf.org/html/rfc7946#section-5
- idstr, float
在 https://tools.ietf.org/html/rfc7946#section-3.2 中唯一标识此特征的值。
- geometrydict,
- __init__(geometry=Undefined, properties=Undefined, type=Undefined, bbox=Undefined, id=Undefined, **kwds)#
方法
__init__
([geometry, properties, type, bbox, id])返回对象的副本。
返回对象的副本。
from_dict
(dct[, validate])从字典表示形式构造类。
from_json
(json_string[, validate])从有效的 JSON 字符串实例化对象。
resolve_references
([schema])在此对象的 schema 或根 schema 的上下文中解析引用。
to_dict
([validate, ignore, context])返回对象的字典表示形式。
to_json
([validate, indent, sort_keys, ...])将此对象的 JSON 表示形式作为字符串输出。
validate
(instance[, schema])在 rootschema 的上下文中,根据类 schema 验证实例。
validate_property
(name, value[, schema])在 rootschema 的上下文中,根据属性 schema 验证属性。