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_crs method descriptor

to_crs(target)

A copy in the CRS target, an EPSG code such as EPSG:4326.

Geographic and UTM CRSs on WGS 84, SIRGAS 2000, SAD69, NAD83, ETRS89 and GDA2020 are supported, with datum changes by the published EPSG 7-parameter Helmert transformations. Geographic coordinates are longitude and latitude in degrees, projected ones are in metres; heights are kept.

Parameters:

Name Type Description Default
target str

The CRS to convert to, EPSG:n.

required

Returns:

Type Description
PointSet

The points in target.

Raises:

Type Description
InvalidInput

Without a CRS, or with a CRS outside the supported set.

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