Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[WIP] Bitmap and Bitmap Tile Layers #285

Closed

Conversation

jtmiclat
Copy link
Contributor

@jtmiclat jtmiclat commented Dec 2, 2023

Addresses #206
Example usage:

import geopandas as gpd
from lonboard import Map
from lonboard._layer import  BitmapLayer, BitmapTileLayer


layer = BitmapLayer(bounds=[-122.5190, 37.7045, -122.355, 37.829],image='https://raw.githubusercontent.com/visgl/deck.gl-data/master/website/sf-districts.png')
map_ = Map(layers=[layer])
map_
Screenshot 2023-12-03 at 5 23 37 AM

and

layer = BitmapTileLayer(data='https://c.tile.openstreetmap.org/{z}/{x}/{y}.png')
map_ = Map(layers=[layer], _initial_view_state={'longitude': -122.42060000000001, 'latitude': 37.7543, 'zoom': 11})
map_
Screenshot 2023-12-03 at 5 23 26 AM

Decision Points

  1. Best way to handle non arrow layers. Should we have new classes for non arrow layers that dont include fields like table or should we be extending existing classes and setting table to null/None
  2. What parameters should we include for both layers?

@kylebarron
Copy link
Member

kylebarron commented Dec 2, 2023

This looks awesome! Thanks!

  1. Best way to handle non arrow layers. Should we have new classes for non arrow layers that dont include fields like table or should we be extending existing classes and setting table to null/None

I'm not 100% sure yet, but at first glance I'd think to have another class BaseArrowLayer (or maybe an ArrowMixin?) that's a subclass of BaseLayer and adds the table, from_geopandas, and _rows_per_chunk traits/methods. Because everything other than those is defined on deck's base Layer class, and should be common for all deck layers

kylebarron added a commit that referenced this pull request Dec 4, 2023
Continuation of #285,
closes #206

---------

Co-authored-by: Jt Miclat <jtmiclat@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants