示例#1
0
    return gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))


@pytest.mark.mpl_image_compare
@pytest.mark.parametrize(
    "proj",
    [
        # TODO: Fix errors in the projections that do not currently work.
        gcrs.PlateCarree(),
        # gcrs.LambertCylindrical(),
        gcrs.Mercator(),
        gcrs.Miller(),
        gcrs.Mollweide(),
        gcrs.Robinson(),
        gcrs.Sinusoidal(),
        gcrs.InterruptedGoodeHomolosine(),
        gcrs.Geostationary(),
        gcrs.NorthPolarStereo(),
        gcrs.SouthPolarStereo(),
        gcrs.Gnomonic(),
        gcrs.AlbersEqualArea(),
        gcrs.AzimuthalEquidistant(),
        gcrs.LambertConformal(),
        gcrs.Orthographic(),
        gcrs.Stereographic(),
        gcrs.TransverseMercator(),
        gcrs.LambertAzimuthalEqualArea()
        # # TODO: Include other new ones.
    ])
def test_basic_global_projections(proj, countries):
    gplt.polyplot(countries, proj)
示例#2
0
@pytest.fixture(scope="module")
def countries():
    return gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))


@pytest.mark.mpl_image_compare
@pytest.mark.parametrize("proj", [
    gcrs.PlateCarree(),
    gcrs.LambertCylindrical(),
    gcrs.Mercator(),
    gcrs.Miller(),
    gcrs.Mollweide(),
    gcrs.Robinson(),
    gcrs.Sinusoidal(),
    pytest.param(gcrs.InterruptedGoodeHomolosine(), marks=pytest.mark.xfail),
    pytest.param(gcrs.Geostationary(), marks=pytest.mark.xfail),
    gcrs.NorthPolarStereo(),
    gcrs.SouthPolarStereo(),
    gcrs.Gnomonic(),
    gcrs.AlbersEqualArea(),
    gcrs.AzimuthalEquidistant(),
    gcrs.LambertConformal(),
    gcrs.Orthographic(),
    gcrs.Stereographic(),
    pytest.param(gcrs.TransverseMercator(), marks=pytest.mark.xfail),
    gcrs.LambertAzimuthalEqualArea(),
    gcrs.WebMercator()
])
def test_basic_global_projections(proj, countries):
    gplt.polyplot(countries, proj)
示例#3
0
    return gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))


@pytest.mark.mpl_image_compare
@pytest.mark.parametrize(
    "proj",
    [
        # TODO: Fix errors in the projections that do not currently work.
        gcrs.PlateCarree(),
        gcrs.LambertCylindrical(),
        gcrs.Mercator(),
        gcrs.Miller(),
        gcrs.Mollweide(),
        gcrs.Robinson(),
        gcrs.Sinusoidal(),
        pytest.param(gcrs.InterruptedGoodeHomolosine(),
                     marks=pytest.mark.xfail),
        pytest.param(gcrs.Geostationary(), marks=pytest.mark.xfail),
        gcrs.NorthPolarStereo(),
        gcrs.SouthPolarStereo(),
        gcrs.Gnomonic(),
        gcrs.AlbersEqualArea(),
        gcrs.AzimuthalEquidistant(),
        gcrs.LambertConformal(),
        gcrs.Orthographic(),
        gcrs.Stereographic(),
        pytest.param(gcrs.TransverseMercator(), marks=pytest.mark.xfail),
        gcrs.LambertAzimuthalEqualArea()
    ])
def test_basic_global_projections(proj, countries):
    gplt.polyplot(countries, proj)