Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-17 Thread Jeff Whitaker
On 10/16/12 12:29 PM, Jeff Whitaker wrote: > On 10/16/12 11:20 AM, Rich Signell wrote: >> Jeff, >> Yep, that worked! So here is a working example of OWSlib with >> Basemap: http://nbviewer.ipython.org/3900648/ >> >> I switched the Basemap projection to 'cyl' because we need to ensure >> that Base

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-16 Thread Jeff Whitaker
On 10/16/12 11:20 AM, Rich Signell wrote: > Jeff, > Yep, that worked! So here is a working example of OWSlib with > Basemap: http://nbviewer.ipython.org/3900648/ > > I switched the Basemap projection to 'cyl' because we need to ensure > that Basemap and WMS are using the same projection, right?

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-16 Thread Jeff Whitaker
On 10/16/12 11:20 AM, Rich Signell wrote: > Jeff, > Yep, that worked! So here is a working example of OWSlib with > Basemap: http://nbviewer.ipython.org/3900648/ > > I switched the Basemap projection to 'cyl' because we need to ensure > that Basemap and WMS are using the same projection, right?

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-16 Thread Rich Signell
Jeff, Yep, that worked! So here is a working example of OWSlib with Basemap: http://nbviewer.ipython.org/3900648/ I switched the Basemap projection to 'cyl' because we need to ensure that Basemap and WMS are using the same projection, right? (and since I had requested EPSG:4326 from WMS, that's

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-16 Thread Jeff Whitaker
On 10/16/12 8:48 AM, Rich Signell wrote: > Klo & Jeff, > > I tried making a concrete example of using OWSlib with Basemap, but > althought the WMS image looks good, the warpimage does not. > > http://nbviewer.ipython.org/3899690/ > > Do you see where I went wrong? > > Thanks, > Rich Rich: warpima

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-16 Thread Rich Signell
Klo & Jeff, I tried making a concrete example of using OWSlib with Basemap, but althought the WMS image looks good, the warpimage does not. http://nbviewer.ipython.org/3899690/ Do you see where I went wrong? Thanks, Rich On Sat, Oct 13, 2012 at 7:26 PM, klo uo wrote: > That's also what that s

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-13 Thread klo uo
That's also what that snippet I linked does. You can add it to to Basemap and it should work. However Jeff suggested we use this tiny package OWSlib and handle WMS that way, which is better IMHO, but for some reason we did not got further reply. On Fri, Oct 12, 2012 at 1:31 PM, Rich Signell wro

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-12 Thread Rich Signell
WMS services are required to respond to "GetCapabiltiies" request, reporting what layers, styles, times, elevations, and projections they have available. So for example, using the Unidata WMS example below, if we do: http://motherlode.ucar.edu:8080/thredds/wms/fmrc/NCEP/NAM/CONUS_12km/NCEP-NAM

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-10 Thread klo uo
I guess that's it? warpimage() as it is now, checks if passed image is url, so we can add additional check if image is url, with urlparse to deduce image coordinates and projection if present, then overlay it over already created Basemap object.

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-10 Thread klo uo
On Thu, Oct 11, 2012 at 4:40 AM, klo uo wrote: > Not sure, but as in example posted, 'img' is HTTPmessage pointing to > server, and I can't see how we can deduce georeference as 'wms' object is > named arbitrary, it could have been named to anything: > What am I talking about? We can deduce from

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-10 Thread klo uo
On Thu, Oct 11, 2012 at 3:31 AM, Jeff Whitaker wrote: > But warpimage assumes the image is of global extent - perhaps we could > make warpimage smart enough to get the georeferencing from the wms > instance but that would require some work. There must be some way to > let the WMS server do the ima

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-10 Thread Jeff Whitaker
On 10/10/12 7:16 PM, klo uo wrote: > On Wed, Oct 10, 2012 at 11:28 PM, Jeff Whitaker wrote: >> I wonder whether it would be better to use OWSlib >> (http://geopython.github.com/OWSLib/) for OGS/WMS support, instead of trying >> to roll our own solution. It only has ElementTree as a dependency.

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-10 Thread klo uo
On Wed, Oct 10, 2012 at 11:28 PM, Jeff Whitaker wrote: > > I wonder whether it would be better to use OWSlib > (http://geopython.github.com/OWSLib/) for OGS/WMS support, instead of trying > to roll our own solution. It only has ElementTree as a dependency. Klo - > would you be interested in re

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-10 Thread Jeff Whitaker
On 10/10/12 2:38 PM, klo uo wrote: Hi Rich, On Tue, Oct 9, 2012 at 10:38 PM, Rich Signell wrote: It look like there was a "wmsimage" method in Basemap that was folded into a "arcgisimage" method? IIRC, it was named like that in the test cycle, then renamed correctly to arcgis I made

Re: [Matplotlib-users] Accessing WMS and ESRI REST services in Matplotlib

2012-10-10 Thread klo uo
Hi Rich, On Tue, Oct 9, 2012 at 10:38 PM, Rich Signell wrote: > It look like there was a "wmsimage" method in Basemap that was folded > into a "arcgisimage" method? > > IIRC, it was named like that in the test cycle, then renamed correctly to arcgis I made my first step in adding WMS method: htt