pythonprojectionmatplotlib-basemap

Matplotlib Basemap: Map Coordinates


I am looking for easy way to determine the how to extract lon lat coordinates for 'lcc' projection. I am trying to isolate Arabian Sea as shown in the following code but somehow what i get is zoomed out view.

m = Basemap(projection='lcc', width=12000000, height=9000000,
resolution='c', lat_1=47.536042,lat_2=23.878382,lat_0=56.362771,lon_0=30.517389)

This is what I get: enter image description here

This is what I want (area in red box) enter image description here


From the answer, I get the following graph which I want but now however the continents are pixalated. Is there any way to resolve this?

m = Basemap(projection='lcc', width=1200000, height=900000,
resolution='c', lat_1=47.536042,lat_2=23.878382,lat_0=26.8,lon_0=51.3)
m.drawlsmask(land_color='grey', ocean_color='none', lakes=True, zorder=26)
m.drawcoastlines(linewidth=0.3, color='gray', zorder=25)

enter image description here


Solution

  • Not a direct answer to your question, but possibly to your problem:

    The lat_0 and lon_0 parameters give the center of the map. Your current values should be somewhere in the Baltic region, which matches your output. Also, the width and height values are in meters and, again, seem to match the map you get. Eyeballing coordinates off a map, the Arabian sea seems to be roughly at lat=26.8 lon=51.3 and be about 400 km across, so if you plug in those values, you might get what you want.