developmentseed / lonboard

A Python library for fast, interactive geospatial vector data visualization in Jupyter.
https://developmentseed.org/lonboard/latest/
MIT License
654 stars 33 forks source link

Add support for OrthographicView #375

Open cornhundred opened 9 months ago

cornhundred commented 9 months ago

Context

I would like to visualize non geographic data (e.g., spatial multi-omic biological data) using lonboard. I belive that we would have the add the option for the OrthographicView class in deck.gl.

Issue

I think that we just need to expose the view classes to lonboard to allow users to use the OrthograhicView.

Acceptance-Criteria

I'm not sure what these would be.

kylebarron commented 9 months ago

This is related to https://github.com/developmentseed/lonboard/issues/322.

I think that View is always passed in to Deck directly, not the Layer class, right? In that case it should be relatively simple.

As a general statement, much of lonboard so far has geospatial assumptions baked in, but I think nothing should preclude using non-geospatial data

cornhundred commented 9 months ago

Thanks, that is my understanding too that it is passed into Deck directly.

Here's how I'm setting the view on an ObservableHQ notebook

const view = new deck.OrthographicView({id: 'ortho'})

deck.DeckGL({
    container,
    views:[view],
    initialViewState:INITIAL_VIEW_STATE,
    controller: true,
  });

I can have a look at lonboard to see if I can figure out how to make a pull request.

kylebarron commented 9 months ago

A PR would be great. In general, models are defined first in TS https://github.com/developmentseed/lonboard/blob/main/src/model/layer.ts (maybe create a new file for view.ts?), then create wrapper classes (subclassing from ipywidgets.Widget) that map to the deck.gl api: https://github.com/developmentseed/lonboard/blob/4daca9bb36013a56a998dc1507d03058f582b141/lonboard/_layer.py#L288-L357