Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-28 Thread Jeff Whitaker
On 8/28/12 12:09 PM, klo uo wrote: > Jeff, I just thought to mention this: function name "wmsmap" maybe > should be changed to "restmap" as for WMS servers will need to do > another template. Here is example urllib call for sample WMS function > GetMap: Klo: Let's move this discussion over to the

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-28 Thread klo uo
Jeff, I just thought to mention this: function name "wmsmap" maybe should be changed to "restmap" as for WMS servers will need to do another template. Here is example urllib call for sample WMS function GetMap: basemap_url = "\ http://geonetwork3.fao.org/ow

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-28 Thread klo uo
>> Jeff it looks great, everything is parametrized including server name >> and map name, so it should work for any additional service. >> However on Windows with Python 2.7 and Basemap 1.0.5 I get an error >> while trying to run the script: > > > Klo: Just added a pull request for this > > https:

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-28 Thread Jeff Whitaker
On 8/28/12 9:56 AM, klo uo wrote: > On Mon, Aug 27, 2012 at 9:32 PM, Jeff Whitaker wrote: >> Klo: Yes. And vice versa, some of those 4500 projections aren't supported >> by Basemap. >> >> Anyway, I went ahead and created a prototype 'wmsmap' method. You can try it >> by cloning my fork (https://g

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-28 Thread klo uo
On Mon, Aug 27, 2012 at 9:32 PM, Jeff Whitaker wrote: > > Klo: Yes. And vice versa, some of those 4500 projections aren't supported > by Basemap. > > Anyway, I went ahead and created a prototype 'wmsmap' method. You can try it > by cloning my fork (https://github.com/jswhit/basemap) and running >

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-27 Thread Jeff Whitaker
On 8/27/12 11:24 AM, klo uo wrote: > On Mon, Aug 27, 2012 at 2:34 PM, Jeff Whitaker wrote: >> Klo: WMS servers use EPSG codes to define map projections - Basemap uses a >> set of kwargs. We need some way of inferring epsg codes from the Basemap >> kwargs. Alternatively, we could extend Basemap s

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-27 Thread Alexander Crosby
We have a WMS server that uses basemap to display unstructured ocean model data. We just limit the set of projections to a select few (just the most common ones), and have a mapping between EPSG and the required Basemap kwargs. It sometimes requires some implementation of proj4 prior to getting

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-27 Thread klo uo
On Mon, Aug 27, 2012 at 2:34 PM, Jeff Whitaker wrote: > Klo: WMS servers use EPSG codes to define map projections - Basemap uses a > set of kwargs. We need some way of inferring epsg codes from the Basemap > kwargs. Alternatively, we could extend Basemap so it can accept EPSG codes. > But, there

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-27 Thread Jeff Whitaker
On 8/26/12 9:07 PM, klo uo wrote: > On Sun, Aug 26, 2012 at 9:56 PM, Jeff Whitaker wrote: >> Klo: Since epsg codes comprise a very small subset of possible Basemap >> projections, it may be better to just allow Basemap to accept an epsg kwarg. >> That keyword would be required in order to use a WM

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-26 Thread klo uo
On Sun, Aug 26, 2012 at 9:56 PM, Jeff Whitaker wrote: > Klo: Since epsg codes comprise a very small subset of possible Basemap > projections, it may be better to just allow Basemap to accept an epsg kwarg. > That keyword would be required in order to use a WMS to display a map > background. This m

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-26 Thread Jeff Whitaker
On 8/26/12 5:44 AM, klo uo wrote: > On Sun, Aug 26, 2012 at 12:18 AM, Jeff Whitaker wrote: >> Klo: The image in interpolated to the Basemap projection region. This is >> slow - the main reason to use the WMS is to avoid this by having it done on >> the server side. > All right, that's the right w

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-26 Thread klo uo
> As said later today I'll look at Nokia maps and then will try to look > for WMS servers. Nokia map services are OK, and can be used even without applying for free account, but they brand every map with their logo even for professional licence. REST services (http://api.maps.nokia.com/en/restmaps

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-26 Thread klo uo
On Sun, Aug 26, 2012 at 12:18 AM, Jeff Whitaker wrote: > Klo: The image in interpolated to the Basemap projection region. This is > slow - the main reason to use the WMS is to avoid this by having it done on > the server side. All right, that's the right way anyway > The trick is to figure out

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread Jeff Whitaker
On 8/25/12 3:08 PM, klo uo wrote: > On Sat, Aug 25, 2012 at 10:19 PM, Jeff Whitaker wrote: >> Klo: For cylindrical equidistant maps (projection='cyl') it will be easy, >> since the corner lat/lon values are all that is needed. For other >> projections, we'll need a way to translate EPSG projecti

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread klo uo
Well it seems ArcGIS web-services can't be bitten in public place. Google and Bing static maps have many limitations: - require account for providing key - draw logos on image - limited size: Bing basic account can return max 900x834 and Google 1280x1280 (while ArcGIS 2048x2048) - Google stati

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread klo uo
>> Result with coastlines overlay attached! > > Here is attachment Hm, image needs to be approved by moderator... Here is a link to it: http://i.imgur.com/1ZMoU.png -- Live Security Virtual Conference Exclusive live even

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread klo uo
> Export Map (http://atlas.resources.ca.gov/arcgis/SDK/REST/export.html) > seems like only function needed, but more knowledge about Basemap is > needed, as my main problem with it is fitting projections right. I > tried to overlay arcgis map over some Basemap projections like: > > m=Basemap(...)

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread klo uo
On Sat, Aug 25, 2012 at 5:50 PM, Jeff Whitaker wrote: > > Maybe such a thing could be built using owslib? > > http://geopython.github.com/OWSLib/ This is interesting. I didn't know about this module Using either simple REST (urllib) to access webservices or depend on additional module which expos

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread klo uo
On Sat, Aug 25, 2012 at 5:57 PM, Jeff Whitaker wrote: > > tilecache.org looks relevant too. > This is like more advanced, on a higher level. I imagine if you plan to add some interaction to Basemap, it would be fantastic, to say at least. While reading Google patent you linked the other day, I ca

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread klo uo
On Sat, Aug 25, 2012 at 3:24 PM, Jeff Whitaker wrote: > It looks like you are fetching an image over a specified region and > displaying it with matplotlib. That's very useful, but it doesn't solve > the zooming problem you mentioned. Still, it's a good start and would > be nice to have in basema

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread Jeff Whitaker
On 8/25/12 9:50 AM, Jeff Whitaker wrote: On 8/25/12 7:53 AM, Benjamin Root wrote: On Saturday, August 25, 2012, Jeff Whitaker wrote: On 8/24/12 10:20 PM, klo uo wrote: > On Sat, Aug 25, 2012 at 1:26 AM, Jeff Whitaker wrote: >> Oh sure, it's simple! >> >> http://www.google.

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread Jeff Whitaker
On 8/25/12 7:53 AM, Benjamin Root wrote: On Saturday, August 25, 2012, Jeff Whitaker wrote: On 8/24/12 10:20 PM, klo uo wrote: > On Sat, Aug 25, 2012 at 1:26 AM, Jeff Whitaker wrote: >> Oh sure, it's simple! >> >> http://www.google.com/patents?id=J4YOEBAJ&dq=6618053

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread Benjamin Root
On Saturday, August 25, 2012, Jeff Whitaker wrote: > On 8/24/12 10:20 PM, klo uo wrote: > > On Sat, Aug 25, 2012 at 1:26 AM, Jeff Whitaker wrote: > >> Oh sure, it's simple! > >> > >> http://www.google.com/patents?id=J4YOEBAJ&dq=6618053 > > Hi Jeff, > > > > thanks for your reply. > > > > I was

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-25 Thread Jeff Whitaker
On 8/24/12 10:20 PM, klo uo wrote: > On Sat, Aug 25, 2012 at 1:26 AM, Jeff Whitaker wrote: >> Oh sure, it's simple! >> >> http://www.google.com/patents?id=J4YOEBAJ&dq=6618053 > Hi Jeff, > > thanks for your reply. > > I was hoping to get response if there are ideas how this unfortunate > perform

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-24 Thread klo uo
On Sat, Aug 25, 2012 at 1:26 AM, Jeff Whitaker wrote: > > Oh sure, it's simple! > > http://www.google.com/patents?id=J4YOEBAJ&dq=6618053 Hi Jeff, thanks for your reply. I was hoping to get response if there are ideas how this unfortunate performance can be avoided. If there are some thoughts

Re: [Matplotlib-users] Background basemaps in Basemap

2012-08-24 Thread Jeff Whitaker
On 8/24/12 3:37 PM, klo uo wrote: > I wanted to overlay some plot over map, and thought to use one of > provided background maps that come with Basemap > Result isn't that great as expected: loading bluemarble map took 1GB > memory, and zooming i.e. Europe region on 1920x1080 screen is too > blurre

[Matplotlib-users] Background basemaps in Basemap

2012-08-24 Thread klo uo
I wanted to overlay some plot over map, and thought to use one of provided background maps that come with Basemap Result isn't that great as expected: loading bluemarble map took 1GB memory, and zooming i.e. Europe region on 1920x1080 screen is too blurred w/o details. As a consequence, using custo