-
Notifications
You must be signed in to change notification settings - Fork 397
add wmsimage method #73
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
Conversation
@@ -3985,6 +4089,73 @@ def warpimage(self,image="bluemarble",scale=None,**kwargs): | |||
if self.round: im,c = self._clipcircle(ax,im) | |||
return im | |||
|
|||
def wmsimage(self,server='http://server.arcgisonline.com/ArcGIS',\ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This function should be perhaps named as "restmap" or "arcgismap" as it should be able to process any valid ArcGIS Mapserver with REST protocol. For WMS servers we'll need to do another template and maybe call it wmsmap or wmsimage. Here is example urllib call for sample WMS function GetMap:
basemap_url = "\
http://geonetwork3.fao.org/ows/14097?\
request=GetMap&\
service=WMS&\
version=1.1.1&\
layers=country_bnd&\
format=image/svg%2Bxml&\
bgcolor=0xFFFFFF&\
transparent=TRUE&\
srs=EPSG:4326&\
bbox=-180,-137.464503042596,180,137.464503042596&\
width=986&\
height=753\
"
It's very similar to already implemented, only that some parameters are differently named.
Additionally SRS is acceptable in WMS 1.1.1, and CRS in WMS 1.3.0 which should be deduced from WMS server version. Both default to EPSG:4326
OK, renamed it 'arcgisimage'. |
for retrieving and displaying background images from web map servers. Requires that projection be defined using the new 'epsg' keyword, except for projection='cyl', which is automatically assumed to be epsg=4326. Run testwms.py to exercise this new feature.