-
Notifications
You must be signed in to change notification settings - Fork 394
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
arcgisimage - urllib2.HTTPError: HTTP Error 400: Bad Request #546
Comments
I'm getting a very similar error, too |
There seems to be some problem with this concrete ESRI REST API service Quoted from the link above:
The alternative service that they recommend is the This other service seems to work with an example link that I was trying directly on the browser:
But if I try with the link of your example and replace
|
I think that my |
If I try to use simple cylindrical coordinates (EPSG=4326), the code snippet works:
So there are at least two problems:
|
@matthew-william-lock I have found that the following block is causing the problems with the EPSG 5520 coordinates: basemap/packages/basemap/src/mpl_toolkits/basemap/__init__.py Lines 4287 to 4289 in f370fd3
I do not have any idea why this if-block is there (it looks like a radian-to-degree conversion), but this recalculation of the coordinates For the record, if I comment this if-block in my installed
then the verbose output that I get is the following link (note the change in the
and the following image (i.e. what you were expecting from the example): I would need to inspect why this if-block was added in the past, I have no idea. |
A good place to look to find out what exactly things are in which situation is the
|
@matthew-william-lock May I ask you to check if the patch works for you? You would need to install
After that, you can try the updated Python example snippet (note that I now use "World_Imagery" as service): from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt
bmap = Basemap(llcrnrlon=3.75, llcrnrlat=39.75, urcrnrlon=4.35, urcrnrlat=40.15, epsg=5520)
bmap.arcgisimage(service="World_Imagery", xpixels=1500, verbose= True)
plt.show() The default value for the service argument used to be "ESRI_Imagery_World_2D", so I also changed it to the new default value "World_Imagery" so that the default behaviour works again. |
I will close this issue as completed with PR #548. If you still experience problems, please feel free to reopen it. |
Using the provided example :
I get the following error:
The text was updated successfully, but these errors were encountered: