|
24 | 24 | import ipywidgets
|
25 | 25 | import traitlets
|
26 | 26 | from arro3.core import Table
|
| 27 | +from arro3.core.types import ArrowStreamExportable |
27 | 28 |
|
28 | 29 | from lonboard._base import BaseExtension, BaseWidget
|
29 | 30 | from lonboard._constants import EXTENSION_NAME, OGC_84
|
|
38 | 39 | from lonboard._utils import auto_downcast as _auto_downcast
|
39 | 40 | from lonboard._utils import get_geometry_column_index, remove_extension_kwargs
|
40 | 41 | from lonboard.traits import (
|
| 42 | + ArrowTableTrait, |
41 | 43 | ColorAccessor,
|
42 | 44 | FloatAccessor,
|
43 | 45 | NormalAccessor,
|
44 |
| - PyarrowTableTrait, |
45 | 46 | )
|
46 |
| -from lonboard.types.arrow import ArrowStreamExportable |
47 | 47 |
|
48 | 48 | if TYPE_CHECKING:
|
49 | 49 | import geopandas as gpd
|
@@ -283,7 +283,7 @@ class BaseArrowLayer(BaseLayer):
|
283 | 283 |
|
284 | 284 | # The following traitlets **are** serialized to JS
|
285 | 285 |
|
286 |
| - table: traitlets.TraitType |
| 286 | + table: ArrowTableTrait |
287 | 287 |
|
288 | 288 | def __init__(
|
289 | 289 | self,
|
@@ -714,7 +714,7 @@ def from_duckdb(
|
714 | 714 |
|
715 | 715 | _layer_type = traitlets.Unicode("column").tag(sync=True)
|
716 | 716 |
|
717 |
| - table = PyarrowTableTrait(allowed_geometry_types={EXTENSION_NAME.POINT}) |
| 717 | + table = ArrowTableTrait(allowed_geometry_types={EXTENSION_NAME.POINT}) |
718 | 718 | """A GeoArrow table with a Point or MultiPoint column.
|
719 | 719 |
|
720 | 720 | This is the fastest way to plot data from an existing GeoArrow source, such as
|
@@ -1001,7 +1001,7 @@ def from_duckdb(
|
1001 | 1001 |
|
1002 | 1002 | _layer_type = traitlets.Unicode("polygon").tag(sync=True)
|
1003 | 1003 |
|
1004 |
| - table = PyarrowTableTrait( |
| 1004 | + table = ArrowTableTrait( |
1005 | 1005 | allowed_geometry_types={EXTENSION_NAME.POLYGON, EXTENSION_NAME.MULTIPOLYGON}
|
1006 | 1006 | )
|
1007 | 1007 | """A GeoArrow table with a Polygon or MultiPolygon column.
|
@@ -1246,7 +1246,7 @@ def from_duckdb(
|
1246 | 1246 |
|
1247 | 1247 | _layer_type = traitlets.Unicode("scatterplot").tag(sync=True)
|
1248 | 1248 |
|
1249 |
| - table = PyarrowTableTrait( |
| 1249 | + table = ArrowTableTrait( |
1250 | 1250 | allowed_geometry_types={EXTENSION_NAME.POINT, EXTENSION_NAME.MULTIPOINT}
|
1251 | 1251 | )
|
1252 | 1252 | """A GeoArrow table with a Point or MultiPoint column.
|
@@ -1488,7 +1488,7 @@ def from_duckdb(
|
1488 | 1488 |
|
1489 | 1489 | _layer_type = traitlets.Unicode("path").tag(sync=True)
|
1490 | 1490 |
|
1491 |
| - table = PyarrowTableTrait( |
| 1491 | + table = ArrowTableTrait( |
1492 | 1492 | allowed_geometry_types={
|
1493 | 1493 | EXTENSION_NAME.LINESTRING,
|
1494 | 1494 | EXTENSION_NAME.MULTILINESTRING,
|
@@ -1659,7 +1659,7 @@ def from_duckdb(
|
1659 | 1659 |
|
1660 | 1660 | _layer_type = traitlets.Unicode("point-cloud").tag(sync=True)
|
1661 | 1661 |
|
1662 |
| - table = PyarrowTableTrait( |
| 1662 | + table = ArrowTableTrait( |
1663 | 1663 | allowed_geometry_types={EXTENSION_NAME.POINT}, allowed_dimensions={3}
|
1664 | 1664 | )
|
1665 | 1665 | """A GeoArrow table with a Point column.
|
@@ -1792,7 +1792,7 @@ def from_duckdb(
|
1792 | 1792 |
|
1793 | 1793 | _layer_type = traitlets.Unicode("solid-polygon").tag(sync=True)
|
1794 | 1794 |
|
1795 |
| - table = PyarrowTableTrait( |
| 1795 | + table = ArrowTableTrait( |
1796 | 1796 | allowed_geometry_types={EXTENSION_NAME.POLYGON, EXTENSION_NAME.MULTIPOLYGON}
|
1797 | 1797 | )
|
1798 | 1798 | """A GeoArrow table with a Polygon or MultiPolygon column.
|
@@ -1971,7 +1971,7 @@ def from_duckdb(
|
1971 | 1971 |
|
1972 | 1972 | _layer_type = traitlets.Unicode("heatmap").tag(sync=True)
|
1973 | 1973 |
|
1974 |
| - table = PyarrowTableTrait(allowed_geometry_types={EXTENSION_NAME.POINT}) |
| 1974 | + table = ArrowTableTrait(allowed_geometry_types={EXTENSION_NAME.POINT}) |
1975 | 1975 | """A GeoArrow table with a Point column.
|
1976 | 1976 |
|
1977 | 1977 | This is the fastest way to plot data from an existing GeoArrow source, such as
|
|
0 commit comments