geoviews
geoviews copied to clipboard
Features not working properly for NorthPolarStereo projection
The following example demonstrates the issue:
import geoviews as gv
import geoviews.feature as gf
from geoviews import opts
from cartopy import crs
gv.extension('bokeh')
nyc, beijing = (-74.0, 40.7, 'NYC'), (116.4, 39.9, 'Beijing')
london = (14471.53, 6712008., 'London')
cities_lonlat = gv.Points([nyc, beijing], vdims='City')
cities_mercator = gv.Points([london], crs=crs.GOOGLE_MERCATOR, vdims='City')
features = gv.Overlay([gf.land, gf.ocean])
(features * cities_lonlat * cities_mercator).options(
opts.Points(projection=crs.NorthPolarStereo(), width=800, height=400, size=12,
color='black', global_extent=True))
For features = gv.Overlay([gf.land, gf.ocean])
, some of land is covered blue and ocean is not displayed:
For features = gv.Overlay([gf.ocean, gf.land])
, ocean is not displayed:
I'm having this same issue.
to simplify the issue, it is gv.feature.ocean
that is not projected properly.
import geoviews as gv
import bokeh
import cartopy, cartopy.crs as crs
projections = [crs.SouthPolarStereo, crs.NorthPolarStereo]
gv.Layout([gv.feature.ocean.relabel(group=f"Ocean: {p.__name__}").opts(projection=p()) for p in projections])
gv.Layout([gv.feature.ocean.relabel(group=f"Ocean: {p.__name__}").opts(projection=p()) for p in projections])
weirdly, SouthPolarStereo works (see land vs ocean contrasts in plots)