The meters system is not scale, it is Web Mercator which is in common use by all major map tile systems, AFAIK. The immediate solution is for you to convert your lat/lon coordinates to Web Mercator (meters) before passing them to Bokeh plotting functions. There is nothing built in to Bokeh to do this, so yes you will need to do it explicitly yourself. There are various libraries (pyproj, cartopy, etc.) that should be helpful with this. Alternatively, this seems to be a relevant SO answer:
A separate question is what can/should be done to make things simpler or easier for Bokeh users. I'm happy to have a discussion about it, but realistically what is needed is a new contributor with a specific interest in improving Bokeh for GIS plotting to join and help support this part of Bokeh.
On Feb 23, 2018, at 07:23, Artur Scholz <[email protected]> wrote:
- I want to display a world map on a bokeh plot, on which I use lat/lon coordinates (i.e. -90 to +90, and -180 to +180) to display various points over the map.
- Using the predefined 3rd party tiles (Stamen, CartoDB) does not seem to work with this approach, as they work in meters. Hence, the plot y range for example is interpreted as -90 to +90 meters on the earth map, hence the tile is basically showing the area of 180mx360m at location 0,0.
- On the other hand, zooming out (a lot) will show the map but then my lat/lon points are obviously condensed into the map center.
- Only BBoxTileSource has a flag 'use_latlon', to choose between meters or lat/lon. Where is this conversion done? Do I need to provide this logic on my own?
- Where to find a tile provider (e.g. OSM) that accepts BBOX as argument and returns an appropriate tile?
- Should it not be THE most basic use case to work with lat/lon on a world map? At least that is what I see on EVERY world map. Meters are used only for scale.
- Am I completely on a lost track?
You received this message because you are subscribed to the Google Groups "Bokeh Discussion - Public" group.
To unsubscribe from this group and stop receiving emails from it, send an email to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit https://groups.google.com/a/continuum.io/d/msgid/bokeh/CALqfExaOAXQt5yZUwSSVhF%2BkW%2B1vzwHPgFUMpMXuaDpwKD9gUw%40mail.gmail.com.
For more options, visit https://groups.google.com/a/continuum.io/d/optout.