geopandas to_crs epsg:3347

99 Views Asked by At
import geopandas as gpd
import matplotlib.pyplot as plt
world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
world.to_crs('epsg:3035').plot()
plt.show()

enter image description here

changing to epsg:3347 gives wrong projection.

import geopandas as gpd
import matplotlib.pyplot as plt
world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
world.to_crs('epsg:3347').plot()
plt.show()

enter image description here

it should be centered over North America, see here

package version are

pyproj.__version__ = 3.3.1
gpd.__version__    = 0.12.2
1

There are 1 best solutions below

0
paugam On

the solution is to keep only North America

import geopandas as gpd
import matplotlib.pyplot as plt
world = gpd.read_file(gpd.datasets.get_path('naturalearth_lowres'))
world[world['continent'].str.contains('North America')].to_crs('epsg:3347').plot()
plt.show()

enter image description here