Skip to content

[EPIC] Support for ColumnLayer (extruded point values) #543

Closed
@cboettig

Description

@cboettig

Context

I'd like to be able to use lonboard to create 3d mapping of data that include extruded column layers, like this (pure pydeck code below).

image

Issue

I'd like to be able to translate this pure-pydeck example into lonboard (i.e. as proof-of-principle for support for this layer).

import geopandas as gpd
import pydeck as pdk

DATA_URL = 'https://data.source.coop/cboettig/conservation-policy/Inflation_Reduction_Act_Projects.geojson'
df = gpd.read_file(DATA_URL)

column_layer = pdk.Layer(
    "ColumnLayer",
    data=df,
    get_position=["LONGITUDE", "LATITUDE"],
    get_elevation="FUNDING_NUMERIC",
    get_fill_color = [256,256,0, 140],
    elevation_scale=.01,
    radius=10000,
    pickable=True,
    auto_highlight=True,
)

INITIAL_VIEW_STATE = pdk.ViewState(latitude=35, longitude=-100, zoom=4, max_zoom=16, pitch=45, bearing=0)

r = pdk.Deck(
    column_layer,
    initial_view_state = INITIAL_VIEW_STATE,
    map_style=pdk.map_styles.CARTO_ROAD,
)
r

I think the key piece here is just adding support for "ColumnLayer", but not sure. Ideally I'd like to be able to layer this kind of rendering with other layers also generated in lonboard.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions