#mapnik log: Tuesday 26, January 2010

2010 | 01

previous | next
00:13:02 *** ajturner (n=ajturner@pool-72-66-109-70.washdc.fios.verizon.net) has joined #mapnik
00:24:08 *** ser has quit (calvino.freenode.net irc.freenode.net)
00:24:09 *** mapnikbuild has quit (calvino.freenode.net irc.freenode.net)
00:24:09 *** avar has quit (calvino.freenode.net irc.freenode.net)
00:24:09 *** mapnikbuild_ (n=mapnikbu@miranda.nwcr.net) has joined #mapnik
00:24:10 *** avarab (i=avar@v.nix.is) has joined #mapnik
00:24:31 *** avarab is now known as avar
00:32:22 *** ser (n=ser@sergiusz.pawlowicz.name) has joined #mapnik
00:33:51 *** ldjcmu (n=ljesper@66.201.44.122) has joined #mapnik
00:36:12 <ldjcmu> Hi guys, I'm having some problems adding CJK functionality to my Open Street Map server. I've modified the osm.xml file with the fallback font sets and added the unifont ttf file to my fonts directory, but it doesn't seem able to find the file. Is there some specific naming convention for the file or any other issue you're aware of?
00:37:09 <ldjcmu> Currently hte place names appear as boxes with the english in parentheses rendering correctly
00:37:24 <springmeyer> ldjcmu: when did you you last update your osm.xml ?
00:37:52 <ldjcmu> probably August, but I modified it with the fontset lines
00:38:10 <ldjcmu> <FontSet name="DejaVu Sans Book">
00:38:10 <ldjcmu>    <!--Font face_name="DejaVu Sans Book"/-->
00:38:10 <ldjcmu>    <Font face_name="unifont Medium"/>
00:38:10 <ldjcmu> </FontSet>
00:38:10 <ldjcmu> <FontSet name="DejaVu Sans Oblique">
00:38:11 <ldjcmu>    <!--Font face_name="DejaVu Sans Oblique"/-->
00:38:13 <ldjcmu>    <Font face_name="unifont Medium"/>
00:38:15 <ldjcmu> </FontSet>
00:38:17 <ldjcmu> <FontSet name="DejaVu Sans Bold">
00:38:19 <ldjcmu>    <!--Font face_name="DejaVu Sans Bold"/-->
00:38:21 <ldjcmu>    <Font face_name="unifont Medium"/>
00:38:23 <ldjcmu> </FontSet>
00:38:25 <Ldp__> you have to add the font to the mapnik fonts directory, not your system font dir
00:38:53 <ldjcmu> I added it to the Mapnik fonts directory with the DejaVu fonts
00:39:02 <springmeyer> ldjcmu: next time: http://dpaste.com
00:39:03 <Ldp__> and august is really old. We've moved on since then, major changes, dead easy enabling of CJK now
00:40:05 <ldjcmu> Ok, so your best recommendation is jsut to update the osm.xml file again. The font file doesn't need a spcific name does it, right now it's unifont-5932...ttf
00:40:30 <Ldp__> update to current svn, unless you have your reasons to stay behind
00:40:32 <ldjcmu> Will I also need to update default.style
00:40:50 <Ldp__> yes, new columns have been added since then
00:40:57 <ldjcmu> ok, thanks
00:41:18 <Ldp__> but again: the unifont file needs to be in the *mapnik* fonts directory
00:41:45 <Ldp__> use step 2 in http://trac.mapnik.org/wiki/UsingCustomFonts to see which fonts mapnik knows about
00:43:01 <Ldp__> ldjcmu: when you update osm.xml, please see the README and generate_xml.py
00:45:57 <ldjcmu> I'm actually trying to do this without python (which is what makes this difficult) so some of that isn't as straightforward
00:47:42 <springmeyer> ldjcmu: well all python does is automatically register fonts in that known directory
00:47:52 <springmeyer> in C++ you have to register them yourself
00:48:21 <ldjcmu> oh I think I know where to look now
00:49:20 <ldjcmu> ok, I think I see the issue in my C code where I need to add them
00:49:27 <ldjcmu> thanks for the help, I'll let you know if that was it
01:22:00 <ldjcmu> yep all that was missing was registering the fonts in the cpp file
01:22:04 <ldjcmu> Thanks very much for the help
01:24:22 *** cgs_bob has quit (Remote closed the connection)
01:26:10 <springmeyer> ldjcmu: can you add add a C++ example to  http://trac.mapnik.org/wiki/UsingCustomFonts ?
01:36:45 <ldjcmu> sure, I can paste the additional stuff
01:38:38 <matth_> ]
01:42:21 *** Ldp__ has quit ()
02:10:01 <nikq> Mapnik Trac: UsingCustomFonts edited | http://trac.mapnik.org/wiki/UsingCustomFonts?version=4
02:12:02 <nikq> Mapnik Trac: UsingCustomFonts edited | http://trac.mapnik.org/wiki/UsingCustomFonts?version=5
02:18:34 *** tcb has quit ()
02:18:45 <springmeyer> cheers ldjcmu :)
03:02:56 <ldjcmu> no problem, happy to help
03:38:27 *** blarney (n=blarney@pool-173-48-97-156.bstnma.fios.verizon.net) has joined #mapnik
03:40:19 *** cgs_bob (n=bob@122.135-78-65.ftth.swbr.surewest.net) has joined #mapnik
04:51:22 *** ldjcmu has parted #mapnik ()
05:06:42 *** springmeyer has quit ()
05:16:37 *** matth_ has quit ()
05:43:30 *** tcarobruce (n=tim@c-98-210-194-147.hsd1.ca.comcast.net) has joined #mapnik
05:43:40 *** HounD (n=HounD@unics1.grfc.ru) has joined #mapnik
06:02:40 *** ajturner has quit ()
06:27:23 *** mishok13 has quit (Read error: 110 (Connection timed out))
06:53:25 *** tcarobruce has quit ()
07:23:47 *** mishok13 (n=gdmfsob@dm.sonopia.com) has joined #mapnik
12:10:49 *** D3f0 (n=D3f0@www.transpa-sa.com.ar) has joined #mapnik
12:22:44 *** Ldp__ (n=thid@osm.xs4all.nl) has joined #mapnik
12:53:19 *** matth_ (n=matth@141.217.227.138) has joined #mapnik
13:01:18 *** hansdampf (i=d5d172d3@gateway/web/freenode/x-cylqjebmrjpohgtu) has joined #mapnik
13:01:29 <hansdampf> hi
13:01:42 <hansdampf> which version of mapnik would you recommend for using with mod_tile / renderd atm ?
13:01:50 <hansdampf> 0.7.0 or trunk?
13:05:11 <hansdampf> Ldp__: r u around?
13:15:59 <dodobas> 0.7.0
13:16:43 <Ldp__> 0.7.0
13:22:38 <Ldp__> although I just recalled you can build it with 0.8.0 too (http://trac.openstreetmap.org/changeset/19529)
13:23:47 *** myselfhimself (n=chatzill@91.199.6.245) has joined #mapnik
13:24:21 <hansdampf> 0.8.0 ?
13:24:25 <hansdampf> ist that the same as trunk?
13:24:29 <myselfhimself> hi !
13:24:33 <myselfhimself> hansdampf: yes
13:24:40 <hansdampf> ok thanks a lot Ldp__
13:25:03 <hansdampf> and dodobas and myselfhimself of course :)
13:25:07 *** Jakobus (i=d5d172d3@gateway/web/freenode/x-uhowndtlsdxjcfvd) has joined #mapnik
13:25:29 <myselfhimself> : )
13:25:41 <myselfhimself> hey Ldp__ !!
13:25:48 <myselfhimself> I have questions for you on mod_tile
13:26:15 <myselfhimself> I've just made the link that you coded mod_tile and replied to my emails on dev@osm
13:26:49 <myselfhimself> I'd like to patch renderd or have a mapnik plugin
13:26:57 <Ldp__> I did not code mod_tile
13:27:01 <myselfhimself> ok
13:27:54 <myselfhimself> I'd like to write a mapnik plugin or modify renderd so that osm.xml files's pgsql code can get into a string filter first
13:28:34 <myselfhimself> ie. mytilesetosm.xml => some software layer that transforms psgql fields of <layer> tags => renderd => mapnik
13:28:57 <myselfhimself> or.. have that software layer / plugin between renderd and mapnik instead
13:29:11 <myselfhimself> I'm thinking..
13:29:21 <myselfhimself> maybe I should touch mapnik's osm-mapnik plugin ?
13:29:36 <Ldp__> what are you actually trying to achieve?
13:29:39 <myselfhimself> that's what renderd uses to setup mapnik ?
13:30:18 <Ldp__> no
13:30:48 <myselfhimself> in osm_outdoor.xml, I want to have my building's indoor objects tagged with name=<not null> to not show up at all, and namely not have their name be drawn at all
13:31:12 <myselfhimself> the way to change that is to take osm_outdoor.xml's pgsql queries and rewrite them a little :
13:31:56 <myselfhimself> 1) ( select way,name,.... from planet_osm_polygon(line...) where (.. things ...) ) as things
13:32:22 <myselfhimself> 2) ( select way,name,.... from planet_osm_polygon(line...) where (.. things ...) and ==>>bname is not null<<== (added) ) as things
13:32:27 <myselfhimself> 1) should be come 2)
13:32:42 <Ldp__> why don't you just directly modify osm_outdoor.xml ?
13:32:51 <myselfhimself> because it's so big
13:32:56 <myselfhimself> I could write a script for this...
13:33:18 <Ldp__> you only have to change the <Layer> sections that use a name column
13:33:36 <myselfhimself> osm_outdoor.xml is juste the same as the original openstreetmap project's osm.xml file except that I want to filter ou tags with bname not null, so that those objects never show up
13:34:02 <myselfhimself> well many Layers make selection on name
13:34:19 <Ldp__> there are some 30-odd layers, it's not an impossible task
13:34:56 <Ldp__> and sounds so much simpler than what you are proposing
13:35:10 <myselfhimself> typically, I think that when anything has a name="..." tag, then there's some textsymbolizer associated.. I just don't want textsymbolizer, nor any drawing to exist for my indoor objects which also have name tag
13:35:54 <Ldp__> where do you generate bname?
13:36:01 *** ajturner (n=ajturner@209.155.228.129) has joined #mapnik
13:36:26 <myselfhimself> well I'm ready to write a small plugin that's would encompass some getLayerSQL function if mapnik has that, and allow any one to rewrite the sql string in here
13:36:36 <myselfhimself> bname is added on JOSM
13:36:46 <myselfhimself> bname stands for building name
13:36:57 <Ldp__> are you adding these tags to OSM itself?
13:37:07 <myselfhimself> every object in a building has level=INTEGER and bname=UNIQUEBUILDINGNAMETOWHICHIBELONG
13:37:52 <Ldp__> sounds like a *much* simpler solution is to modify your copy of osm2pgsql to not write a name when a bname is present
13:38:08 <Ldp__> which is a 2-liner (excluding bracketing)
13:39:43 <Ldp__> and be prepared that your bname objects *will* render on the main map, given space
13:40:44 <myselfhimself> Ldp__: ok
13:42:34 <myselfhimself> well
13:43:22 <myselfhimself> my friend uses the postgis db to generate kml files and an sqlite db which both must contain the name tag
13:43:33 <myselfhimself> especially for kml
13:44:09 <myselfhimself> so likely, I'll add something in default.style or what to rename name tag (if bname is found) as indoorname for example
13:44:21 <myselfhimself> and a row indoorname
13:44:37 <Ldp__> then rename name to another_name in osm2pgsql, and have him rewrite another_name to name in his ST_AsKML query?
13:45:36 <myselfhimself> Ldp__: yes that's it : )
13:45:55 <myselfhimself> you know ST Kml function as well it's cool : )
13:46:10 <myselfhimself> we've hacked the query on map php script for that : )
13:46:36 <myselfhimself> I mean, to generate specific kml files
13:46:53 <Ldp__> select case where bname is not null then another_name else name end as name
13:47:44 <myselfhimself> should that happen in default.style (for osm2pgsql) ?
13:47:52 <myselfhimself> sorry for that lazy question
13:48:00 <myselfhimself> default.style doesn't have such queries
13:48:08 <myselfhimself> .. lines
13:48:48 <Ldp__> then add another_name (or outdoor_name, or however you want to call it)
13:49:45 <myselfhimself> ok
13:52:11 <myselfhimself> Ldp__: thank you so much
13:52:18 <Ldp__> now go try stuff
13:52:42 <Ldp__> and: "Mangle the data, not the tools"
13:58:02 *** hansdampf has quit ("Page closed")
13:59:44 *** matth_ has quit ()
14:42:25 *** Jakobus has quit ("Page closed")
14:50:52 <nikq> Mapnik Trac: Ticket #502 (Finasterid Rezeptfrei) created | http://trac.mapnik.org/ticket/502
14:51:27 *** drewby (n=dfaubion@128-8-138-156.umd.edu) has joined #mapnik
14:51:31 *** drewby has parted #mapnik ()
14:51:33 <nikq> Mapnik Trac: Ticket #502 (Finasterid Rezeptfrei) closed | http://trac.mapnik.org/ticket/502#comment:1
14:51:46 <myselfhimself> Ldp__: ok about mangling data not the tools
14:53:11 <myselfhimself> Ldp__: I have thought for hours now
14:54:06 <myselfhimself> and I have decided to create some plugin or at least a script for now, that allows to rewrite/modify an map .xml file's string online before creating a map out of it with load_map()
14:54:28 <myselfhimself> I want to make this for several reasons :
14:55:21 <myselfhimself> 1) instead of having N xml map files for N indoor levels, I want only one that is modified online for each level's Mapnik map object loading
14:56:56 <myselfhimself> 2) I want to be nice with the community and allow people in the long term to transform the xml relax NG file with an intermediate script before loading that file as a map
14:57:04 <myselfhimself> I'm ok to consecrate into this work
14:57:14 <myselfhimself> and I believe it will be helpful for others
14:59:06 <myselfhimself> this would allow for example for the http://trac.mapnik.org/wiki/Mapnik2#buildingsource 's stylesheet script to be run online (although this conversino should be done once for all...)
14:59:29 <myselfhimself> but in my case, for indoor map xml generation, I would really be glad having online conversion
14:59:34 <myselfhimself> so I will implement a script for that
15:02:33 <myselfhimself> I propose having implementing new functions to complement : load_map_from_string(...) and load_map(...)
15:04:23 *** springmeyer (n=springme@c-76-28-156-154.hsd1.wa.comcast.net) has joined #mapnik
15:06:21 <myselfhimself> such as load_map_after_xml_filter(Map,xmlfilterscriptfilename,....)
15:06:44 <myselfhimself> load_map_from_string(Map,xmlfilterscripfilename,str1,str2..)
15:06:56 <myselfhimself> sorry load_map_from_string_after_xml_filter
15:07:15 *** HounD has parted #mapnik ()
15:07:17 <myselfhimself> xmlfileterscriptfilename would be run in a popen/system process
15:08:30 *** ajturner has quit ()
15:28:49 <nikq> Mapnik Trac: UsingCustomFonts edited | http://trac.mapnik.org/wiki/UsingCustomFonts?version=5
15:44:53 <nikq> Mapnik Trac: UsingCustomFonts edited | http://trac.mapnik.org/wiki/UsingCustomFonts?version=6
15:48:26 <nikq> Mapnik Trac: UsingCustomFonts edited | http://trac.mapnik.org/wiki/UsingCustomFonts?version=7
15:54:33 <nikq> Mapnik Trac: UsingCustomFonts edited | http://trac.mapnik.org/wiki/UsingCustomFonts?version=8
16:11:07 *** twain47_ (n=twain47@82.47.179.86) has joined #mapnik
16:14:13 *** mperry has parted #mapnik ()
16:15:53 <nikq> Mapnik Trac: Ticket #502 (Map buffer_size not accounted for within GDAL plugin scaling logic) created | http://trac.mapnik.org/ticket/502
16:17:51 *** mperry (n=mperry@c-67-164-175-65.hsd1.co.comcast.net) has joined #mapnik
16:23:05 *** chad_burt (n=chad_bur@mm-01.msi.ucsb.edu) has joined #mapnik
16:23:25 *** matth (n=matth@141.217.227.138) has joined #mapnik
16:25:22 *** twain47 has quit (Read error: 110 (Connection timed out))
17:15:12 <myselfhimself> what's the difference between load_map(Map,someXmlFilename) and the osm plugin ?
17:15:19 *** D3f0 has quit (Remote closed the connection)
17:17:25 <springmeyer> myselfhimself: no relation
17:19:01 *** jctull (n=jctull@75.0.10.64) has joined #mapnik
17:20:35 <jctull> springmeyer: hi
17:21:32 <myselfhimself> springmeyer: ok I understand what is does
17:21:33 <myselfhimself> hi
17:30:58 *** Genscher (n=Richard@dslb-094-217-200-201.pools.arcor-ip.net) has joined #mapnik
17:32:16 <Genscher> i this question is totally mapnik unrelated but I hope to find some map geeks in here :) How would you calculate something like "get all stuff in a radius of 300 meters, center point given in lon/lat"? :)
17:32:22 <Genscher> *i know
17:32:41 <Genscher> problem here is lon/lat (degree) vs 300meters
17:33:19 <Genscher> and i try to live without proj/geos ;)
17:35:01 <myselfhimself> ah
17:35:10 <myselfhimself> in postgis query you should be able to do this
17:35:28 <myselfhimself> do you want to run postgis queries ?
17:35:50 <myselfhimself> or you don't use a postgis database ?
17:35:55 <myselfhimself> Genscher:
17:36:18 <springmeyer> hey jctull
17:36:53 <Genscher> myselfhimself, how would such a query look like in postgis? using "distance()" keyword?
17:36:55 <jctull> hey, looks like martin's code improvements on qgis might bring some interesting stuff from mapserver and qnik
17:37:19 <jctull> looking forward to seeing how well that will play with the composer, etc.
17:37:21 <springmeyer> yes, a plugin layer is a grand idea
17:37:29 <springmeyer> ah, interesting point
17:37:47 <springmeyer> ya, that *should* make it easy to have custom layers in the composer...
17:37:53 <jctull> that might be too much of a stretch, but ideally we get qnik layers that are accessible for the print system
17:38:11 <Genscher> myselfhimself, link is also fine. I just couldn't find results on the local google :/
17:38:11 <springmeyer> jctull:  certainly
17:38:39 <springmeyer> jctull: does the composer support higher resolution output?
17:38:43 <myselfhimself> Genscher: where does the data you want to render come from ?
17:38:44 <jctull> anyway, back to your regularly scheduled programming
17:38:55 <springmeyer> :) good one
17:39:03 <myselfhimself> Genscher: from a .osm file ? a postgis db ?
17:39:55 *** cgs_bob has quit (Read error: 110 (Connection timed out))
17:40:29 <Genscher> myselfhimself, postgis db (imported from osm file)
17:42:01 <myselfhimself> Genscher: ok
17:42:24 <Genscher> ah found a webpage, thanks for the keywords myselfhimself !
17:43:00 <springmeyer> Genscher: wild guess: Select * from mytable where ST_Intersects(ST_Buffer(ST_Point(lat,lon),radius),way);
17:43:21 <Genscher> st_intersects, now that is quite interesting approach :)
17:43:29 <springmeyer> but you'll need to also wrap the point in ST_Transform(point,900913)
17:44:10 <myselfhimself> Genscher: see query on map wiki project
17:44:32 <Genscher> will do, thank you for your help :) (even if it was off topic) :)
17:44:35 <springmeyer> Select * from mytable where ST_Intersects(ST_Buffer(ST_Transform(ST_GeomFromText('Point(lat,lon)',4326),900913),radius),way);
17:44:48 * Genscher notes all queries
17:44:53 *** matth has quit ()
17:45:00 <springmeyer> ask in #postgis for expert help
17:45:17 * Genscher didn't know that channel exists
17:45:31 <myselfhimself> Genscher: http://wiki.openstreetmap.org/wiki/Query-to-map =>  Source code
17:45:32 <myselfhimself>     * http://cassini.toolserver.org/~kolossos/qtm2/osm-to-kml-source.php
17:45:58 *** tcb (n=tcarobru@adsl-75-10-247-30.dsl.pltn13.sbcglobal.net) has joined #mapnik
17:52:43 *** D3f0 (n=D3f0@190.177.67.83) has joined #mapnik
17:52:52 *** D3f0 has quit (Read error: 54 (Connection reset by peer))
17:53:08 *** D3f0 (n=D3f0@190.177.67.83) has joined #mapnik
17:53:20 *** D3f0 has quit (Read error: 54 (Connection reset by peer))
17:53:34 *** D3f0 (n=D3f0@190.177.67.83) has joined #mapnik
17:57:19 *** D3f0 has quit (Client Quit)
17:57:22 <myselfhimself> springmeyer: I'd like to create a plugin / wrapper function that encompasses load_map() and load_map_from_string() and precedes either function calls by the execution of a one time callback
17:57:45 <myselfhimself> this one time call back would take the file's string and change it however
18:00:57 <myselfhimself> here's my idea : my_loader_plugin_function (Map m,xmlfilename, string *fileContentOnlineChangerCallback(string) ) { string a = *fileContentOnlineChangerCallback(xmlfilename); load_map_from_string(m,a); }
18:01:26 <myselfhimself> I have tried to understand http://trac.mapnik.org/wiki/DevelopingPlugins
18:03:56 <springmeyer> myselfhimself: plugins are only used to read spatial data
18:04:58 <springmeyer> myselfhimself: if you want to manipulate XML I recommend doing that OUTSIDE of Mapnik
18:05:38 <springmeyer> only after you have the code to do what you want to the XML then consider how you might wrap that into an application that calls load_map()
18:13:50 <myselfhimself> springmeyer: ok thanks
18:14:46 <myselfhimself> springmeyer: I want to hack renderd and make it change a map xml file online before it is fed into load_map or load_map_string
18:15:18 <myselfhimself> this would help having only one osm.xml file instead of N osmlevelN.xml files for each level I get to know of (N is variable depending on what JOSM sends)
18:15:41 <springmeyer> myselfhimself: are you thinking out-loud or are you asking a question?
18:15:51 <myselfhimself> I'm thinking out loud : )
18:15:59 <myselfhimself> springmeyer: thanks for your advices above
18:16:10 <myselfhimself> I really was hanging around trying to think of a design
18:16:36 <myselfhimself> I'll come back with my code once I feel confortable with it and it can make up a true plugin
18:16:44 <springmeyer> okay
18:17:49 <springmeyer> myselfhimself: but again, Mapnik's XML format has specific features that allow easy customization
18:18:01 <springmeyer> like <Layer status=on/off>
18:18:13 <myselfhimself> springmeyer: yes
18:18:17 <springmeyer> and named styles, ability to add or remove a style on a layer
18:18:44 <springmeyer> these features, of XML, can allow for easy customization without hacking C++ code
18:19:27 <springmeyer> I do believe that more functions that extend load_map() would be interesting to look at
18:20:05 <springmeyer> to start, something like layer.load_styles() that only loads style objects and auto-attached to a given layer
18:20:46 <springmeyer> but myselfhimself, for now if you want to contribute to the community I would recommend looking, again, into modifying the XML outside of mapnik
18:20:54 <myselfhimself> ok
18:21:03 <springmeyer> using XSLT, this would be a useful thing to document an example of
18:21:13 <springmeyer> a schema was started by one user here: http://www.mail-archive.com/mapnik-users@lists.berlios.de/msg00313.html
18:21:22 <myselfhimself> what I want to do is to rewrite the code of many pgsql queries online
18:21:39 <myselfhimself> online = before feeding the xml into mapnik
18:22:06 <myselfhimself> for now in cpp, there's no way to get that pgsql string using mapnik's libs right ?
18:22:13 <springmeyer> sure. so you want to modify the postgis plugins 'table' parameter them
18:22:21 <springmeyer> of course there is
18:22:37 <springmeyer> you can modify it in XML, C++, or python
18:27:26 <myselfhimself> ok thank you
18:27:32 <myselfhimself> thank you very much
18:27:40 <myselfhimself> this is what you meant lyr.datasource = PostGIS(host='localhost',user='postgres',password='',dbname='your_postgis_database',table=BUFFERED_TABLE) I see
18:27:42 <myselfhimself> thanks
18:28:00 <springmeyer> exactly
18:28:35 <springmeyer> layer.datasource is the object you care about to change the input data
18:29:08 <springmeyer> pulling that object out of a mapnik Map is possible in either Python or C++, but it is a whole lot easier to simply change the XML before calling load_map()
18:29:49 <myselfhimself> ok thanks
18:30:38 <myselfhimself> ok this is all very interesting springmeyer
18:30:40 <myselfhimself> thanks
18:30:47 <myselfhimself> I'll dig into that further these days
18:31:31 <springmeyer> myselfhimself: have you looked at either the python or c++ examples in http://trac.mapnik.org/browser/tags/release-0.7.0/demo ?
18:36:52 <nikq> Mapnik Trac: OsmPlugin edited | http://trac.mapnik.org/wiki/OsmPlugin?version=25
18:37:45 <dodobas> o springmeyer
18:37:57 <dodobas> do you have any Django experience?
18:39:40 <springmeyer> yes, most of my work is in Django
18:40:24 <dodobas> i probably need to extend ForeignKeyField
18:40:31 <dodobas> here's my problem
18:40:50 <dodobas> i have most of the data in Postgres
18:41:06 <dodobas> contact data is in LDAP
18:41:20 <dodobas> i can access data in LDAP using ldapdb
18:42:06 <dodobas> so a 'project' can have contact....
18:42:38 <dodobas> that means create a foreignkey to contact model
18:43:38 <springmeyer> I've not worked with LDAP yet in django, but aren't there some example solutions already?
18:43:43 <springmeyer> on the wiki I think...
18:44:06 <dodobas> but as contact model is not a table in the database, when i try to access contact details...i get db error
18:44:18 <dodobas> which is fin,e as tables dont exist
18:44:49 <dodobas> springmeyer: only for auth....
18:45:03 <springmeyer> ah, not contacts, gocha
18:45:25 <dodobas> or any ldapdb data...
18:45:41 <dodobas> ldapdb is nice because it returns a queryset
18:45:46 <springmeyer> so why not have the connection to the LDAP contacts be through a model class method?
18:45:52 <dodobas> same as django orm
18:45:56 <springmeyer> rather than a model field...
18:46:25 <springmeyer> ah, you need to query a group of contacts, I see...
18:46:34 <dodobas> hmm, i still need to store data about the contact...
18:46:40 <springmeyer> well then you likely need to write a custom 'manager'
18:47:00 <springmeyer> ah, read/write huh?
18:47:10 <springmeyer> ya, then custom field for sure
18:47:12 <dodobas> yeah, but this manager shoud have 'magic' like foreign key manager
18:47:33 <springmeyer> yup, okay
18:47:40 <dodobas> so i can access contact.project_set....
18:51:25 <springmeyer> yes. sure. well I've not played around with extending the ForeignKey field. good luck hacking :)
18:51:41 <springmeyer> you should be able to subclass it
18:51:50 <dodobas> basicly im st(f)ucked
18:52:56 <dodobas> yes, but i need to rewrite part that gets resultset....
18:55:19 <dodobas> other solution would be to access project details from the contact class method
18:56:13 <dodobas> but...as project imports contact...contact can't import project (at least i dont know how (cannot import name Project)
18:57:31 <dodobas> a circular import...
19:04:58 <springmeyer> dodobas: I am headed out to a meeting soon
19:05:14 <springmeyer> but it would help if you could paste your models (or email them)
19:12:08 *** RichardsDesk_ (n=Richard@188.105.226.12) has joined #mapnik
19:24:13 <nikq> Mapnik Trac: InstallationTroubleshooting edited | http://trac.mapnik.org/wiki/InstallationTroubleshooting?version=35
19:30:29 *** Genscher has quit (Read error: 110 (Connection timed out))
19:43:11 *** springmeyer has quit ()
19:58:55 *** gdmfsob (n=mishok@194.33.189.19) has joined #mapnik
20:43:45 <myselfhimself> thanks for all
20:43:47 <myselfhimself> see you
20:44:01 *** myselfhimself has quit ("ChatZilla 0.9.86 [Firefox 3.0.13/2009080315]")
21:16:40 *** matth (n=matth@141.217.227.138) has joined #mapnik
21:58:00 *** jctull has quit (Read error: 104 (Connection reset by peer))
21:58:58 *** springmeyer (n=springme@c-76-28-156-154.hsd1.wa.comcast.net) has joined #mapnik
22:07:22 <Ldp__> springmeyer: is there any reason why cc1 for filter_factory.cpp would blow up to such a huge memory footprint?
22:07:41 *** jctull (n=jctull@adsl-75-0-7-127.dsl.renocs.sbcglobal.net) has joined #mapnik
22:09:59 *** CIA-6 has quit (Read error: 110 (Connection timed out))
22:12:12 <springmeyer> hey Ldp__
22:12:13 <springmeyer> yes
22:12:29 <springmeyer> the new expressions stuff uses boost spirit
22:12:55 <springmeyer> which is all about fancy templatess/compile time logic
22:13:29 <Ldp__> the file itself is *tiny* :/
22:13:50 <springmeyer> when artem is around we should prod him to see if there are any tricks to reduce memory consumption
22:14:17 <Ldp__> on my machine, it starts hitting swap, which will really slow it down
22:14:25 <springmeyer> but my sense is that the "idea" is the harder work done during compiling the faster the code at runtime..
22:14:27 <springmeyer> yep
22:15:32 <Ldp__> ok
22:15:41 <Ldp__> the reasoning is solid, of course
22:16:58 <springmeyer> Ldp__: regarding #501
22:16:59 <nikq> Ticket #501: Ability to read pre-0.8.0 stylesheets, http://trac.mapnik.org/ticket/501
22:17:08 <Ldp__> I was working on that right now
22:17:12 <Ldp__> that's why I'm compiling trunk
22:17:24 <springmeyer> ah, nice
22:17:35 <springmeyer> I think I have another idea that will work
22:18:10 <springmeyer> it should be pretty failsafe to detect the pre 0.8.0 syntax automatically
22:18:30 <springmeyer> and we can perhaps just do that and print a deprecation warning
22:18:48 <Ldp__> as far as I can tell, the name vs [name] is the only thing that will break. The rest of the old filter syntax is recognised just fine, right?
22:19:17 <springmeyer> yes, exactly
22:20:57 <nikq> Mapnik Trac: Ticket #501 (Ability to read pre-0.8.0 stylesheets) updated | http://trac.mapnik.org/ticket/501#comment:1
22:22:28 <Ldp__> ah yeah, that's a bit more involved than the hacky thing I had in mind
22:22:34 <springmeyer> your idea is cleaner, but I worry about it being confusing
22:23:08 <springmeyer> cleaner in the sense that throwing a deprecation warning is a bit blunt
22:25:25 <Ldp__> I don't mind deprecation warnings in this case
22:26:07 <springmeyer> okay
22:27:03 <springmeyer> I will need to check with Artem about edge cases, or if this might conflict with further syntax enhancements
22:27:11 <springmeyer> but I don't think it will
22:27:36 <Ldp__> it's easy to fix the stylesheet to get rid of the warning, and when you're using a supplied stylesheet (like osm.xml) it will still work without you changing it
22:27:41 <springmeyer> right now if you want a manual label you double quote, eg. name='"value"'
22:27:56 <springmeyer> exactly
22:29:13 <springmeyer> as long as we are okay with double quoting to represent string literals then the pre 0.8.0 syntax will be easily understood as just that and not conflicting with anything new...
22:29:30 *** D3f0 (n=D3f0@190.177.67.83) has joined #mapnik
22:31:19 <Ldp__> 'right now' = right now in trunk, or with your patch?
22:32:19 <springmeyer> right now, with or without patch
22:33:24 <springmeyer> I think artem hesitated, thinking that it might be cleaner to have what is pre 0.8.0 syntax (name='value') be interpreted as a literal string
22:33:55 <springmeyer> but that would make the upgrade process much more forceful
22:34:16 <Ldp__> then you'd need my idea
22:34:25 <springmeyer> yes
22:34:51 <Ldp__> quoting to get a literal label sounds natural
22:35:56 <springmeyer> Yes, I think once people start using the expressions more the (double) quoting will feel okay
22:36:50 <springmeyer> eg. name=' 'State: ' + [STATE_NAME] "
22:37:02 <springmeyer> er.... eg. name=" 'State: ' + [STATE_NAME] "
22:37:22 <Ldp__> also no issues with determining whether whitespace is part of the literal or part of the filter syntax
22:37:42 <springmeyer> yes
22:38:07 <Ldp__> and how else would you get filter operators in the literal label? :)
22:38:28 <springmeyer> I'm convinced then :)
22:39:27 <Ldp__> name=" 'Capital+State: ' + [CAPITAL_NAME] + ' (' + [STATE_ABBR] + ')' "
22:40:16 <springmeyer> nice
22:44:23 *** CIA-24 (n=CIA@208.69.182.149) has joined #mapnik
22:45:35 *** gdmfsob has quit (Read error: 110 (Connection timed out))
22:52:55 *** mperry has quit ()
22:53:06 *** mperry (n=mperry@c-67-164-175-65.hsd1.co.comcast.net) has joined #mapnik
22:54:10 <nikq> Mapnik Trac: Changeset [1590]: restore reading of paths relative to xml as default=true, print xml  ... | http://trac.mapnik.org/changeset/1590
22:57:43 <nikq> Mapnik Trac: Changeset [1591]: shape plugin: be more explicit about the shapefile name if the file is not  ... | http://trac.mapnik.org/changeset/1591
23:03:49 <nikq> Mapnik Trac: Changeset [1592]: add backwards compatibility support to the expressions parser so that the  ... | http://trac.mapnik.org/changeset/1592
23:11:26 <nikq> Mapnik Trac: Changeset [1593]: upgrade python api tests to use new mapnik.Expression and  ... | http://trac.mapnik.org/changeset/1593
23:46:09 *** jctull has quit ()
23:51:08 <CIA-24> mapnik-utils: dane.springmeyer * r898 /trunk/nik2img/mapnik_utils/mapfile.py: enhance method of loading Cascadenik MML
23:56:17 <CIA-24> mapnik-utils: dane.springmeyer * r899 /trunk/nik2img/tests/ (6 files): fix up tests to work with both 0.7.x and 0.8.x and require at least 0.6.1 for relative paths support
23:59:04 *** RichardsDesk_ has quit ("Leaving")