Discussion:
[Matplotlib-users] Basemap Problems
Ronquillo, Edgar Nahum
2015-06-08 17:49:23 UTC
Permalink
Hello,
I am currently working with Basemap to plot a shapefile on the map. However, I am confused on how to initialize llcrnrx and llcrnry and same for the upper corner. I currently have both latitudes and longitudes for lower and upper corners in degrees. Does this mean I have to convert from degrees to x,y coordinates? I tried using llcrnrlon and llcrnrlat but it doesn't seem to like this. Please help me clarify this, any help would be great.

Thank You
Paul Hobson
2015-06-08 19:29:03 UTC
Permalink
Edgar,

You feed lat/lon (float) values. See this example here:
http://matplotlib.org/basemap/users/cea.html

And a whole collection of setting up maps in other projection here:
http://matplotlib.org/basemap/users/mapsetup.html

You also need to make sure that all of inputs make sense together (e.g.,
you're not specifying any corners beyond the range of your specific
projection)
-p
Post by Ronquillo, Edgar Nahum
Hello,
I am currently working with Basemap to plot a shapefile on the map.
However, I am confused on how to initialize llcrnrx and llcrnry and same
for the upper corner. I currently have both latitudes and longitudes for
lower and upper corners in degrees. Does this mean I have to convert from
degrees to x,y coordinates? I tried using llcrnrlon and llcrnrlat but it
doesn't seem to like this. Please help me clarify this, any help would be
great.
Thank You
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Benjamin Root
2015-06-08 20:32:23 UTC
Permalink
By the way, if you want quick-n-easy plotting of shapefiles, I suggest
using GeoPandas, which makes it dead simple.
Post by Ronquillo, Edgar Nahum
Hello,
I am currently working with Basemap to plot a shapefile on the map.
However, I am confused on how to initialize llcrnrx and llcrnry and same
for the upper corner. I currently have both latitudes and longitudes for
lower and upper corners in degrees. Does this mean I have to convert from
degrees to x,y coordinates? I tried using llcrnrlon and llcrnrlat but it
doesn't seem to like this. Please help me clarify this, any help would be
great.
Thank You
------------------------------------------------------------------------------
_______________________________________________
Matplotlib-users mailing list
https://lists.sourceforge.net/lists/listinfo/matplotlib-users
Loading...