17:44:15 *** mapniklog (n=mapniklo@li21-121.members.linode.com) has joined #mapnik 17:44:15 <kubrick.freenode.net> Topic for #mapnik is: Mapnik - C++/Python Mapping Toolkit | http://mapnik.org/ | http://trac.mapnik.org/ | http://code.google.com/p/mapnik-utils/ 17:44:15 <kubrick.freenode.net> Users on #mapnik: mapniklog twain47 xcacou @springmeyer jburgess CIA-59 Mrfo forrestv jlivni racicot dreamil jbglaw dodobas dukeku jbronn ser dthomas @ChanServ 18:12:37 <dodobas> yello 18:14:00 <springmeyer> hello dodobas 18:16:24 *** xcacou has quit (Remote closed the connection) 19:22:56 <dodobas> o springmeyer, are you working on any pre 0.6 issues 19:36:41 <springmeyer> dodobas: http://trac.mapnik.org/query?status=assigned&status=new&status=reopened&group=reporter&col=id&col=summary&col=status&col=owner&col=type&col=priority&col=milestone&col=component&order=priority&report=11 20:02:17 *** tmcw (n=tmcw@c-98-218-241-202.hsd1.dc.comcast.net) has joined #mapnik 20:02:31 <tmcw> So I've got a question! 20:03:05 <tmcw> Anyone around? 20:03:47 <tmcw> For posterity, it is: for rendering large amounts of data (for instance, the world in TIGER), could Mapnik run simplify() in Postgres so that huge amounts of information are not moved around? 20:06:48 <springmeyer> heya tmcw 20:07:03 <tmcw> How's it going? 20:07:15 <springmeyer> good good. you are in DC right? 20:07:43 <tmcw> Yep, at least for a few days 20:07:58 <springmeyer> ah, getting out before the chaos? 20:08:42 <tmcw> That's the plan, I did consider staying in the bars for 24 hours but that just didn't work out 20:08:47 <springmeyer> I was going to ask if you were doing anything related to inaug? not that you would want to - I'm just on the other side of the country 20:08:53 <springmeyer> :) 20:09:15 <springmeyer> anyway, you had a question: so are you using a PostGIS datasource and XML stylesheets, or what is your setup? 20:09:32 <tmcw> Yeah, that's the setup, running a WMS 20:09:47 <springmeyer> you can probably just do the simplify() call yourself in a subselect 20:10:33 <springmeyer> subselect as in Mapnik accepts a SQL select statement or a table name for the table parameter 20:10:52 <tmcw> Hmm, that's an interesting quirk 20:11:15 <springmeyer> have you seen the examples here: http://trac.mapnik.org/wiki/PostGIS ? 20:12:03 <tmcw> Yep - I didn't intially think that those would apply to this case 20:12:16 <tmcw> Since I'm trying to have the value in simply() vary based on zoom level 20:12:28 <springmeyer> <Parameter name="table">(select ST_Simplify(geometry from your_table) as some_variable_for_your_table</Parameter 20:13:01 <springmeyer> right, then that will work well, you'll just need to have different layers at different zoom levels 20:13:37 <tmcw> Cool, that sounds doable. 20:13:44 <springmeyer> but if you are truly serving dynamic content via a WMS then I bet you will want to pre-calculate your simplified geometries 20:14:07 <tmcw> The render times I've been getting have been pretty sad, ~15secs for a world map 20:14:29 <springmeyer> right, no need to add more for mapnik to do ever render 20:15:00 <springmeyer> tmcw: do you have a complex xml? 20:15:19 <tmcw> At this point, it's fairly simple, but the stylesheets aren't developed entirely 20:15:28 <tmcw> I've compiled with libxml for when they do grow 20:15:49 <springmeyer> okay. because that monkeypatch to get the OGCSERVER to load_xml() does not cache the map 20:16:29 <springmeyer> so it may be parsing the xml for each tile. 20:16:32 <tmcw> Hmm, good point - I'll add that to the list and see if that's fixable 20:17:42 <springmeyer> ya, should be super easy to code depending on your handler/class 20:18:43 <springmeyer> tmcw: by ~15 sec you mean for a bunch of tiles or one single tile of the world? 20:19:07 <tmcw> For a single image of the world - actually targeting static maps instead of tilecache or anything 20:19:45 <springmeyer> ouch. 20:20:20 <springmeyer> VACCUM ANALYZE your postgis db 20:20:45 <springmeyer> and hardcode your extents to speed up 20:20:50 <springmeyer> <Parameter name="estimate_extent">false</Parameter> 20:20:50 <springmeyer> <Parameter name="extent">-180,-90,180,89.99</Parameter> 20:21:06 <springmeyer> for lonlat projection 20:51:59 <jlivni> so still curious: does hardcoding extents really speed things up a lot even after the tables involved in the layer have been vacuumed? 20:52:20 * jlivni should probably just test it himself 20:55:02 <springmeyer> hardcoding extents should mean that mapnik does a no-op rather than calling ST_Estimate_Extent() 20:55:55 <springmeyer> should be faster- maybe not significantly to a well vaccummed db though - I'd have to test on a big dataset too 21:06:03 <tmcw> WHoah, sorry I spaced out there. 21:06:08 <tmcw> I'll test it and post the results 21:06:29 <tmcw> I've got a box just for testing now, so hopefully I can get some solid numbers 21:12:07 <springmeyer> tmcw: any testing you do make sure to isolate out the wms server 21:12:32 <springmeyer> but maybe you are already doing that since you said you were creating static images, but maybe I'm confused 21:13:02 <tmcw> I'm planning on going inside-out and tuning specific queries first 21:13:33 <springmeyer> okay. 21:13:57 <springmeyer> so you are generally after a speed up right? hence your simplfy() question? 21:14:35 <tmcw> Yeah, as far as rendering a lot of images, the numbers I've gotten for renders haven't been great 21:14:42 <tmcw> So trying to trim that down 21:14:49 <springmeyer> because depending on your goals pre-rendering tiles can't be beat 21:14:49 <tmcw> It'll be cached a whole lot 21:15:08 <tmcw> But that would restrict this to slippymaps, right? 21:15:25 <tmcw> Or possibly certain specific zoom levels, but never the wms spec? 21:16:15 <springmeyer> depends on the client of course 21:16:48 <springmeyer> so yes. why kind of wms clients do you want to support? 21:17:41 <tmcw> Well so far there's a client for Drupal, Wordpress, and python 21:17:50 <tmcw> Basically server-side web clients is the target 21:19:28 <springmeyer> huh. links? 21:20:15 <tmcw> Let's see - here's the drupal client, with some of the sites (i/we've) made with it: http://drupal.org/project/nicemap 21:22:09 <tmcw> aand the wordpress: http://wordpress.org/extend/plugins/nice-map/ 21:23:22 <springmeyer> interesting. sort of like gmaps static map api? 21:23:34 <tmcw> Yeah, pretty similar 21:23:47 <springmeyer> cept php calling mapnik, wo baby 21:23:50 <tmcw> The python module (owslib) does a pretty similar deal 21:24:09 <tmcw> gets getcapabilities, lets you select layers, etc. 21:25:17 <springmeyer> so you embed the dimensions and the config is pulled from some other part of the drupal/wordpress app? 21:26:03 <tmcw> Yeah - you set the default layers in the wordpress or drupal control panel, and then can throw down simple bits of code for the individual maps 21:26:14 <springmeyer> gocha. 21:27:09 <tmcw> It's not quite slippymaps, but there have been lots of cases where it has come in handy 21:27:10 <springmeyer> so ya, a bit of tile logic could sit in there, but I agree that just getting single tile response speeds quicker would be a good parallel approach 21:27:42 <springmeyer> since you are not having to worry about _lots_ of tile requests 21:28:05 <tmcw> Yeah 21:28:17 <tmcw> The performance hurdles are much more figured out with tilecache 21:28:23 <springmeyer> fun stuff 21:28:54 <springmeyer> well, sure they are side-stepped 23:01:46 *** tmcw has quit () 23:38:15 *** artem (n=artem@i-83-67-142-225.freedom2surf.net) has joined #mapnik 23:54:06 <artem> twain47: dane mentioned you were looking into #70 . My idea is to allow expressions (similar to filter expr) . Current filter expression parser can be re-used for this purpose. Then we can have something like [name] (evaluated at run time) or 'name' - static string. Or even more complex things like [name]+'something else' 23:55:36 <artem> or [name].capitalize [name].to_upper etc etc