spatialtis.wkt_points#

spatialtis.wkt_points(data, centroid_keys, export_key='centroid', write_config=True)[source]#

Transform normal coordination in AnnData.obs to wkt-format.

>>> import spatialtis as st
>>> st.wkt_points(data, ('x', 'y'), export_key="centroid_wkt")
Parameters
dataAnnData

The AnnData to work on.

centroid_keysstr or list of str

The key or a tuple of keys that store X, Y coordination.

export_keystr

The key to export.

write_configbool, default: True

Whether to update centroid key to global configuration.