Source code for visions.types.geometry

from typing import Any, Sequence

from multimethod import multimethod

from visions.relations import IdentityRelation, InferenceRelation, TypeRelation
from visions.types.object import Object
from visions.types.string import String
from visions.types.type import VisionsBaseType


[docs]class Geometry(VisionsBaseType): """**Geometry** implementation of :class:`visions.types.type.VisionsBaseType`. Examples: >>> from shapely import wkt >>> x = pd.Series([wkt.loads('POINT (-92 42)'), wkt.loads('POINT (-92 42.1)'), wkt.loads('POINT (-92 42.2)')] >>> x in visions.geometry True """ @staticmethod def get_relations() -> Sequence[TypeRelation]: relations = [ IdentityRelation(Object), InferenceRelation(String), ] return relations
[docs] @staticmethod @multimethod def contains_op(item: Any, state: dict) -> bool: pass