Skip to content

PointSet

Scattered samples: coordinates plus an attribute table.

bounds property

bounds

(min, max) corners, None when empty.

column_names property

column_names

Names of the attribute columns.

coords property

coords

(n, 3) coordinates.

length_unit property

length_unit

Unit of the coordinates, such as m or ft; None when not declared.

units property

units

Units of the attributes that have one; see Table.units.

x property

x

x of each row's coordinates.

y property

y

y of each row's coordinates.

z property

z

z of each row's coordinates.

convert_units method descriptor

convert_units(column, *, to)

New point set with column converted to unit to; see Table.convert_units.

drop_null

drop_null(*columns)

Rows with a value in every one of columns, all columns by default.

filter method descriptor

filter(mask)

Points where mask is true.

from_table staticmethod

from_table(
    table,
    *,
    x="X",
    y="Y",
    z=None,
    crs=None,
    length_unit=None,
)

Splits coordinate columns out of an Arrow-compatible table.

to_length_unit method descriptor

to_length_unit(unit, *, crs=None)

A copy with the coordinates converted to unit, the new length unit.

Parameters:

Name Type Description Default
unit str

A length unit, such as m or ft.

required
crs str

The CRS of the converted coordinates; required when the coordinates have a CRS, which a change of unit changes.

None

Raises:

Type Description
InvalidInput

Without a length unit to convert from, or with a CRS and no crs.

to_table method descriptor

to_table()

Attributes preceded by x, y, z.

with_attributes method descriptor

with_attributes(table)

New point set with table as the attributes, one row per point.

with_column method descriptor

with_column(name, values, *, unit=None)

New point set with the attribute name added or replaced: numbers (NaN is null) or text (None is null). The column takes unit, or else the unit values carries.

with_columns method descriptor

with_columns(data)

New point set with the columns of data, a dict or table, added or replaced.

with_units method descriptor

with_units(units)

New point set with the units of units, column name to unit; None removes one.

used in