|
7 | 7 | from pyogrio.raw import read_arrow |
8 | 8 | from traitlets import TraitError |
9 | 9 |
|
10 | | -from lonboard import BitmapLayer, Map, ScatterplotLayer, SolidPolygonLayer |
| 10 | +from lonboard import BitmapLayer, Map, ScatterplotLayer, SolidPolygonLayer, viz |
| 11 | +from lonboard._geoarrow.geopandas_interop import geopandas_to_geoarrow |
11 | 12 | from lonboard.layer_extension import DataFilterExtension |
12 | 13 |
|
13 | 14 |
|
@@ -93,6 +94,27 @@ def test_layer_wkb_geoarrow_wrong_geom_type(): |
93 | 94 | _layer = ScatterplotLayer(table=table) |
94 | 95 |
|
95 | 96 |
|
| 97 | +def test_warning_no_crs_shapely(): |
| 98 | + points = shapely.points([0, 1, 2], [2, 3, 4]) |
| 99 | + with pytest.warns(match="No CRS exists on data"): |
| 100 | + _ = viz(points) |
| 101 | + |
| 102 | + |
| 103 | +def test_warning_no_crs_geopandas(): |
| 104 | + points = shapely.points([0, 1, 2], [2, 3, 4]) |
| 105 | + gdf = gpd.GeoDataFrame(geometry=points) |
| 106 | + with pytest.warns(match="No CRS exists on data"): |
| 107 | + _ = viz(gdf) |
| 108 | + |
| 109 | + |
| 110 | +def test_warning_no_crs_arrow(): |
| 111 | + points = shapely.points([0, 1, 2], [2, 3, 4]) |
| 112 | + gdf = gpd.GeoDataFrame(geometry=points) |
| 113 | + table = geopandas_to_geoarrow(gdf) |
| 114 | + with pytest.warns(match="No CRS exists on data"): |
| 115 | + _ = viz(table) |
| 116 | + |
| 117 | + |
96 | 118 | # Test layer types |
97 | 119 | def test_bitmap_layer(): |
98 | 120 | layer = BitmapLayer( |
|
0 commit comments