holoviz / geoviews

Simple, concise geographical visualization in Python
http://geoviews.org
BSD 3-Clause "New" or "Revised" License
577 stars 75 forks source link

Features not working properly for NorthPolarStereo projection #338

Open hdsingh opened 5 years ago

hdsingh commented 5 years ago

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

rsignell-usgs commented 4 years ago

I'm having this same issue.

suvarchal commented 3 years ago

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)