geoviews icon indicating copy to clipboard operation
geoviews copied to clipboard

Features not working properly for NorthPolarStereo projection

Open hdsingh opened this issue 5 years ago • 2 comments

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: land_ocean

For features = gv.Overlay([gf.ocean, gf.land]), ocean is not displayed: oce_land

hdsingh avatar Jul 09 '19 04:07 hdsingh

I'm having this same issue.

rsignell-usgs avatar Jul 14 '19 12:07 rsignell-usgs

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])

ocean_land_projections

weirdly, SouthPolarStereo works (see land vs ocean contrasts in plots)

suvarchal avatar Aug 16 '20 06:08 suvarchal