Skip to content
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

epsg:4326 #75

Closed
klonuo opened this issue Aug 31, 2012 · 3 comments
Closed

epsg:4326 #75

klonuo opened this issue Aug 31, 2012 · 3 comments

Comments

@klonuo
Copy link

klonuo commented Aug 31, 2012

Jeff, I'm finishing wmsimage() function to Basemap class similar to arcgisimage() function and now testing.

Most WMS servers accept just epsg:4326 reference, but I can't figure how to reference coordinates. I would have expected that entering lat/lot pairs should do it, but I guess not. For example:

from mpl_toolkits.basemap import Basemap
import matplotlib.pyplot as plt

plt.figure(figsize=(6,8))
epsg = 4326; lon1 = -85; lat1 = 24; lon2 = -79; lat2 =32
m=Basemap(epsg=epsg,resolution='i',llcrnrlon=lon1,llcrnrlat=lat1,\
           urcrnrlon=lon2,urcrnrlat=lat2)
m.arcgisimage(service='NatGeo_World_Map',verbose=True,xpixels=600)

returns this: bbox=-1,0,-1,0

or here is verbose url: http://server.arcgisonline.com/ArcGIS/rest/services/NatGeo_World_Map/MapServer/export?bbox=-1,0,-1,0&bboxSR=4326&imageSR=4326&size=600,800&dpi=96&format=png32&f=image

Why?
Or how can I use this projection in defined lat/lon pairs?

@klonuo
Copy link
Author

klonuo commented Aug 31, 2012

epsg = 4326; lon1 = -85; lat1 = 24; lon2 = -79; lat2 =32

Hm, in original test code, from where this snippet is copied, you use epsg:3086, and above lat/lon values define exact bounds for that projection.

It must be that I don't understand how this projection schemes works, but I would expect to be able to define region with lat/lon pairs

@jswhit
Copy link
Contributor

jswhit commented Sep 4, 2012

I've fixed some problems with epsg=4326 in arcgisimage, so give it a try now.

What is the purpose of the wmsimage class (what does it do different than arcgisimage)? I'd like to avoid a proliferation of methods with similar names - so if we could the needed functionality with an extra keyword to arcgisimage I think that would be preferable.

@klonuo
Copy link
Author

klonuo commented Sep 5, 2012

Thanks Jeff, I'll give it a try

What is the purpose of the wmsimage class (what does it do different than arcgisimage)? I'd like to avoid a proliferation of methods with similar names - so if we could the needed functionality with an extra keyword to arcgisimage I think that would be preferable.

It's just a function as arcgisimage()
I was looking also for a way to use same function for both services, but it doesn't look like good idea.
Because of different parameters, and WMS versions check, then capabilities validation upon parameters provided. And then yet because urllib module can't transparently handle chunked transfer encoding, which WMS servers use.
Have a look at this draft

If you have any suggestions do tell

@jswhit jswhit closed this as completed Feb 24, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants