Summary
There is a problem when using the pydeck_chart function in the library to load 3D point cloud information. Maybe it is because the amount of information is too large, resulting in no display in the streamlit window
Steps to reproduce
Code snippet:
DATA_URL = "https://raw.githubusercontent.com/ajduberstein/geo_datasets/master/small_waterfall.csv"
df = pd.read_csv(DATA_URL)
target = [df.x.mean(), df.y.mean(), df.z.mean()]
point_cloud_layer = pdk.Layer(
"PointCloudLayer",
data=DATA_URL,
get_position=["x", "y", "z"],
get_color=["r", "g", "b"],
get_normal=[0, 0, 15],
auto_highlight=True,
pickable=True,
point_size=3,
)
view_state = pdk.ViewState(target=target, controller=True, rotation_x=15, rotation_orbit=30, zoom=5.3)
view = pdk.View(type="OrbitView", controller=True)
r = pdk.Deck(point_cloud_layer, initial_view_state=view_state, views=[view])
st.pydeck_chart(r)
Expected behavior:
Expected output is like this picture:
Actual behavior:
Actual output is like this picture:
Debug info
- OS version: window 10
- Browser version: google chrome
Links
- pydeck: PointcloudLayers PointCloudLayer — pydeck 0.8.0b4 documentation