#mapnik log: Monday 16, February 2009

2009 | 02

previous | next
01:44:28 *** weizhuo has quit (Read error: 104 (Connection reset by peer))
01:44:57 *** ninja_ (n=pankur@nat/yahoo/x-c9769d16cdd83d34) has joined #mapnik
01:58:23 <CIA-23> mapnik: dane * r913 /trunk/bindings/python/ (mapnik_datasource.cpp mapnik_layer.cpp): + add pickling interface to layers and datasources (closes #205) - TODO support parameters
02:28:11 *** ninja_ has quit ()
03:16:55 *** ninja_ (n=pankur@nat/yahoo/x-86b2b708b2b0f745) has joined #mapnik
03:22:25 *** D3f0 has quit (Connection timed out)
03:26:13 *** cytrinox (n=cyx@Yb533.y.pppool.de) has joined #mapnik
03:38:06 *** cytrinox_ has quit (Read error: 110 (Connection timed out))
04:02:00 *** D3f0 (n=defo@190.176.207.174) has joined #mapnik
06:44:46 *** ninja_ has quit ()
07:26:34 <nikq> Mapnik Trac: MapnikOverview edited | http://trac.mapnik.org/wiki/MapnikOverview?version=6
08:20:32 *** xcacou (n=aga@AToulouse-157-1-16-163.w86-201.abo.wanadoo.fr) has joined #mapnik
08:32:38 *** TomH1 is now known as TomH
09:03:31 *** D3f0 has quit (Read error: 60 (Operation timed out))
09:55:36 *** matt_c (n=mcroydon@137.147.45.66.cm.sunflower.com) has joined #mapnik
10:20:05 *** ninja_ (n=pankur@cm122.psi133.maxonline.com.sg) has joined #mapnik
10:20:19 *** ninja_ has parted #mapnik ()
11:07:25 *** ninja (n=pankur@64.55.144.26) has joined #mapnik
11:32:49 *** ninja has quit ()
12:08:31 *** crschmidt (i=crschmid@59.176.232.72.static.reverse.ltdomains.com) has joined #mapnik
12:58:26 *** ninja_ (n=pankur@cm122.psi133.maxonline.com.sg) has joined #mapnik
13:03:55 *** darragh (n=darragh@83.70.173.25) has joined #mapnik
13:14:41 <darragh> How do I set the background of a layer to transparent?
13:20:23 *** KAeL has parted #mapnik ()
14:11:45 *** xcacou has quit (Remote closed the connection)
14:38:26 *** tmcw (n=tmcw@c-98-218-241-202.hsd1.dc.comcast.net) has joined #mapnik
14:39:48 <tmcw> Hey, is there any documentation for the wsgi server integration?
15:01:50 <darragh> According to the wiki, no, best to go look at the source code and try and figure it from there
15:03:18 <tmcw> Hmm, all right
15:03:49 <tmcw> If I figure it out I'll put some docs up
15:07:19 *** ninja_ has quit ()
15:35:04 *** artem (n=artem@i-83-67-142-225.freedom2surf.net) has joined #mapnik
15:39:56 <artem> springmeyer: ping
15:52:18 *** crschmidt has quit (Read error: 110 (Connection timed out))
16:06:42 *** building39 (n=mmartin@adsl-99-152-65-141.dsl.hstntx.sbcglobal.net) has joined #mapnik
16:07:14 <building39> hello!
16:07:41 *** building39 has quit (Remote closed the connection)
16:09:10 *** building39 (n=mmartin@adsl-99-152-65-141.dsl.hstntx.sbcglobal.net) has joined #mapnik
16:20:57 *** jbronn has quit (Read error: 60 (Operation timed out))
16:22:34 *** jbronn (n=jbronn@70-138-113-15.lightspeed.hstntx.sbcglobal.net) has joined #mapnik
16:30:02 *** xcacou (n=aga@154.35.86-79.rev.gaoland.net) has joined #mapnik
16:41:54 <darragh> Does Mapnik support transparent PNGs over WMS?
16:43:16 <artem> darragh : true colour PNGs support transparency, so yes.
16:43:48 <artem> palette based PNGs not yet
16:44:37 <darragh> artem: Ok, how do I serve a transparent PNG layer then, what parameters should there be on the layer?
16:45:13 <artem> darragh : I'm not sure. I never ever use WMS myself :)
16:45:59 <artem> darragh : springmeyer should be able to help you
16:47:41 <artem> just thinking, if you use 'png' for the output type you should get PNG with alpha channel
16:48:24 <artem> Also, you should probably set bgcolor to transparent in your *.xml
16:48:42 <artem> <Map bgcolor="transparent" .... >
16:48:50 <darragh> artem: Using the python bindings
16:49:04 <artem> m = Map(1000,1000)
16:49:18 <artem> m.background=Color("transparent")
16:51:37 *** tmcw has quit ()
17:00:03 <darragh> artem: That doesn't work for WMS, as there is no Map object, it has to be done on the Layer object but not sure if it support
17:01:54 <cytrinox> hi
17:02:04 <artem> hmm.. there must be a Map object somewhere .
17:02:35 <cytrinox> short question: what format types are supported by the ShieldSymbolizer?
17:03:06 <cytrinox> can in use a svg file with width/height?
17:04:02 <artem> cytrinox : nope, no SVG support sorry. There are plans to add support for SVG symbols but it'll be 1.0.0 at the earliest
17:04:17 <artem> you can use 32-bit PNG s
17:04:56 <cytrinox> ok, thanks :)
17:09:05 <cytrinox> ..but transparent pngs are supported?
17:10:19 <artem> yep
17:11:06 <darragh> Figured it out, need to pass transparent: 'TRUE' in the parameters of the layer from OL
17:11:15 <cytrinox> can I use an integer database-field as source for the shield-name?
17:11:44 <artem> darragh : great
17:12:41 <darragh> artem: The WMS defaults the background colour to white
17:13:03 <artem> cytrinox: not directly . but you can define filters for your integer values
17:18:02 *** darragh has quit (Remote closed the connection)
17:18:03 *** Mrfos (i=Mrfo@pool-96-231-166-17.washdc.fios.verizon.net) has joined #mapnik
17:25:10 <springmeyer> nikq: tell tmcw when he returns all he needs for the wsgi wrapper is to import the WSGIApp, associate the config and the point mod_wsgi or some wsgi compliant server at an 'applicaion' (like mod_python's handler)
17:25:11 <nikq> springmeyer: I'll pass that on when tmcw is around.
17:25:20 <springmeyer> ala: http://mapnik-utils.googlecode.com/svn/example_code/wms/localogc.py
17:25:43 <springmeyer> hey artem :)
17:25:59 * springmeyer was chasing the pickle yesterday
17:26:07 * springmeyer is off skiing today
17:26:22 <springmeyer> be well all
17:26:45 <artem> cool, have good time
17:36:13 *** Mrfo has quit (Read error: 110 (Connection timed out))
17:43:15 *** springmeyer has quit ()
17:53:54 *** matt_c has quit ()
18:14:31 <cytrinox> is it possible to render a shield multiple times on a way?
18:15:16 <cytrinox> I have set min_distance="1", but I get only one shield per way
18:16:48 *** racicot has quit ("ChatZilla 0.9.84 [Firefox 2.0.0.19/2008121623]")
18:18:47 *** matt_c (n=mcroydon@gateway.sunflowerbroadband.com) has joined #mapnik
19:31:28 <CIA-23> mapnik: artem * r914 /trunk/include/mapnik/value.hpp:
19:31:28 <CIA-23> mapnik: + add specialisations for bool
19:31:28 <CIA-23> mapnik: + small fix
20:01:37 *** matt_c_ (n=mcroydon@gateway.sunflowerbroadband.com) has joined #mapnik
20:09:21 *** racicot (n=chatzill@dsl-209-166-85-189.whidbey.net) has joined #mapnik
20:17:01 *** matt_c has quit (Read error: 110 (Connection timed out))
20:59:51 <cmarqu> cytrinox: I have the same problem with the ShieldSymbolizer.
21:00:33 <cmarqu> We should maybe prepare a testcase for artem, e.g. with http://trac.mapnik.org/wiki/ShieldSymbolizerTests
21:01:12 <artem> cytrinox: I'm sure it's possible. Have you tried using 'spacing' ?
21:01:52 <cytrinox> testcase: I don't want o----------|SHIELD|----------o, I want o----|SHIELD|------|SHIELD|-------|SHIELD|------o
21:01:56 <cytrinox> ;)
21:02:29 <cytrinox> artem: no, beacause it's not documented.. is this a ShieldSymbolizer param?
21:03:02 <artem> cytrinox : let me check
21:03:53 <cmarqu> I had added the docs to http://trac.mapnik.org/wiki/ShieldSymbolizer from what I read on the list, but it might be wrong or incomplete
21:05:03 <cytrinox> cmarqu: I don't see any changes?
21:05:46 <cmarqu> cytrinox: I mean these from a few days ago: http://trac.mapnik.org/wiki/ShieldSymbolizer?action=diff&version=9&old_version=7
21:06:05 <cytrinox> ahh okay :)
21:07:00 <cmarqu> That shield_symbolizer_test doesn't wotj with Mapnik SVN anymore
21:07:04 <cmarqu> NameError: name 'save_to_file' is not defined
21:07:41 <cmarqu> cytrinox: Are you also rendering a hiking map? ;)
21:08:29 <artem> cytrinox: in XML use spacing="100" in Python  sym.label_spacing=100
21:10:03 <cytrinox> artem: cool, thanks. I'll try it .oO(after data import has finished..)
21:10:29 <cytrinox> cmarqu: no, I just made some overlays
21:13:25 <cmarqu> artem: Great, I can confirm spacing works. min_distance also has an influence though.
21:13:44 <artem> great
21:14:14 <cmarqu> artem: Is there also a way to render a shield without *any* text? I need that for evenly spaced hiking symbols...
21:14:33 <cytrinox> dont supply name="...."?
21:14:49 <cmarqu> cytrinox: SVN trunk then complains.
21:15:19 <cmarqu> It apparently requires name, face_name, size, and maybe even fill.
21:15:33 <cytrinox> or workaround: on layer datasource select a additional column: '' as myemptyfield. now you can use this field das source for name
21:16:01 <cmarqu> cytrinox: Ah, that sounds like it could work.
21:16:41 <cytrinox> or NULL as myfield. but I don't know what happens if the source column is NULL
21:18:20 <nikq> Mapnik Trac: ShieldSymbolizer edited | http://trac.mapnik.org/wiki/ShieldSymbolizer?version=10
21:21:43 <nikq> Mapnik Trac: ShieldSymbolizerTests edited | http://trac.mapnik.org/wiki/ShieldSymbolizerTests?version=3
21:24:53 <cytrinox> cmarqu: did you know how to apply osm diffs to the postgis db?
21:26:05 <cmarqu> cytrinox: No, never tried that yet
21:26:24 <cmarqu> Would -a do that maybe?
21:27:00 <cytrinox> no, a extension is missed
21:27:32 <cmarqu> jburgess would know for sure
21:28:14 <jburgess> yes, you need to use -a but there are other things too
21:28:26 <jburgess> you need to import the original data with --slim mode
21:28:35 <cytrinox> aarggl
21:28:42 <jburgess> and have the relevant intaray support enabled in your DB
21:28:54 <cytrinox> why did you say that _after_ my data import has finished? :P
21:29:18 <jburgess> did you ask before you started ?
21:29:35 <cytrinox> ;)
21:30:00 <cytrinox> ..it was just a small import - takes only one hour :)
21:30:05 <cytrinox> what is intaray?
21:31:57 <cmarqu> http://www.mail-archive.com/talk@openstreetmap.org/msg07436.html might be interesting
21:32:14 <cmarqu> http://wiki.openstreetmap.org/wiki/Minutely_Mapnik - and this
21:32:21 <jburgess> cytrinox: it is a postgresql extension. On my system it is available from /usr/share/pgsql/contrib/_int.sql
21:32:43 <jburgess> it is "intarray", not intaray, I mistyped it earlier
21:34:04 <nikq> Mapnik Trac: ShieldSymbolizer edited | http://trac.mapnik.org/wiki/ShieldSymbolizer?version=11
21:34:09 <jburgess> About the "spacing" on the shield symbolizer. I was going to suggest that, but it looks like it may be missing from parse_shield_symbolizer in load_map.cpp
21:35:12 <cmarqu> jburgess: That would affect the C++ bindings only?
21:35:27 <jburgess> no, only if you load the style from an XML file
21:36:08 <cmarqu> Hmm, that worked for me with the example from  http://trac.mapnik.org/wiki/ShieldSymbolizerTests
21:36:35 <cmarqu> I added the spacing parameter to the XML file and removed min_distance.
21:37:27 <jburgess> try removing the spacing parameter and see if it makes a difference to the output
21:39:38 <jburgess> It works better for me with a few extra lines of code to parse the spacing parameter in load_map.cpp :)
21:39:41 <cmarqu> Oh. Right.
21:40:41 <cmarqu> I wonder why I did get such a wide spacing then... maybe collisions.
21:40:57 <cmarqu> They might have suppressed most of the symbols or something
21:41:09 <jburgess> by default you just get one symbol at the mid-point of each way/line
21:42:00 <cmarqu> Ok, then the example has lots of short ways, while I was rendering long relations.
21:42:01 <jburgess> so for detailed parts of the map with short ways between junctions you get many shields, but in open areas of the map you get very gew
21:42:11 <jburgess> s/gew/few/
21:42:34 * cmarqu awaits the commit to load_map.cpp then
21:42:37 <cmarqu> :)
21:45:36 <cytrinox> http://map.terminal.io/?zoom=13&lat=6356198.17798&lon=955514.20636&layers=BT
21:45:37 <nikq> Mapnik Trac: Changeset [915]: Read spacing parameter on ShieldSymbolizer from XML | http://trac.mapnik.org/changeset/915
21:45:47 <cytrinox> can anyone tell my why some shields are cutted off?
21:45:49 <jburgess> cmarqu: r915 it is.
21:45:50 <nikq> http://trac.mapnik.org/changeset/915, at , by jburgess777: Read spacing parameter on ShieldSymbolizer from XML
21:45:58 <cmarqu> jburgess: Thanks very much,
21:46:41 <Mrfos> cytrinox, i think those are boundaries between tiles it creates
21:46:49 <jburgess> cytrinox: looks like the effect of a tile boundary. What are you using to render & serve the tiles? generate_tiles.py, tilcache, mod_tile?
21:46:53 <Mrfos> needs more buffer with the metatiling
21:47:13 <cytrinox> jburgess: generate_tiles.py
21:47:15 * cmarqu added the buffer parameter to his generate_tiles.py
21:47:34 <cytrinox> cmarqu: what buffer parameter?
21:48:22 <jburgess> cytrinox: add: m.buffer_size = 128
21:48:34 <jburgess> after the line with load_map(m,mapfile)
21:48:46 <jburgess> that should be a reasonable place to put it.
21:48:46 <cmarqu> Right, exactly that :)
21:50:10 <cytrinox> hm.. can you explain why this fixes the output? :)
21:50:14 <jburgess> I guess we should commit that change into OSM svn too, but I suspect the buffer_size might not be in mapnik-0.5.1
21:50:40 <jburgess> cytrinox: Search for "gutter" on this page: http://mike.teczno.com/notes/mapnik.html
21:51:24 <cytrinox> ah thanks
21:51:33 <Mrfos> if you dont mind setting up tilecache, it will do it for you as well
21:52:35 <cytrinox> hmm 128 doesn't really fix the problem
21:53:38 <jburgess> cytrinox: are you using a recent SVN version?
21:54:09 <cytrinox> ..of the generate_tiles.py script or mapnik?
21:54:12 <jburgess> mapnik
21:54:43 <cytrinox> hmm.. mapnik from debian lenny
21:55:00 <jburgess> oh... almost certainly not up to date then :)
21:55:04 <cytrinox> hehe
21:55:14 <Mrfos> lenny is 0.5.1
21:55:20 *** Mrfos is now known as Mrfo
21:55:21 <jburgess> There was a bug in the buffer_size, #204 which was only fixed 2 weeks ago
21:55:21 <nikq> Ticket #204: map.buffer_size() does not seem to fetch data within buffer zone, http://trac.mapnik.org/ticket/204
21:55:47 <cytrinox> phuu..
21:56:17 <jburgess> actually, that should not matter, the generate_tiles.py script implements an older workaround for this problem already
21:56:40 <jburgess> it renders tiles of 512x512 and then throws away the outer 128 pixels around the edge
21:57:24 <cytrinox> hmm, not for me
21:57:55 <cytrinox> tha generate_tiles.py script is the latest from svn
21:58:01 <jburgess> I think I might see the problem, it looks like it only goes wrong when there is a shield it collides with on the neighbouring tile too
21:58:11 <Mrfo> you can't use the latest from svn
21:58:19 <Mrfo> because the fix doesn't exist anymore :
21:58:20 <Mrfo> :)
21:58:29 <Mrfo> gotta use the one back from 0.5.1
21:59:58 <Mrfo> i would assume so at least. anyone know more about that?
22:01:19 <cytrinox> jburgess: I don't think so. have a look at http://map.terminal.io/?zoom=13&lat=6280735.73816&lon=934150.06159&layers=BT
22:01:28 <jburgess> not really, personally I'd use the SVN code since it has many more of these sorts of issues fixed
22:01:33 <cytrinox> the 70 sign in the middle of the map is cutted-off
22:02:39 <cmarqu> http://opentiles.com/cmarqu/?zoom=12&lat=50.95509&lon=14.1664&layers=000000000000B00000 - awesome!
22:03:10 <jburgess> there may also be other bugs in this code. I know that I have seen some issues with cut-off motorway shields, but with meta-tiling the problems are rare anough not to really notice
22:03:11 <cmarqu> jburgess saves the day... again!
22:05:32 <jburgess> we need the spacing parameter for the OSM motorway shields too so I had already been looking at this a few days ago. I didn't realise that the code in load_map was all that was missing
22:06:50 <nikq> Mapnik Trac: Changeset [916]: + corrected SQL | http://trac.mapnik.org/changeset/916
22:07:02 <jburgess> as for 0.5.1, lots of these fixes could be backported, but then you would end up with something quite similar to the current SVN for the 0.6 release.
22:07:51 <jburgess> I don't think there is enough interest from users/developers to keep picking up and applying the fixes back to the 0.5 branch.
22:08:41 <Mrfo> hey artem, do you know if theres been talk of a point with label symbolizer? gonna take a go at implementing one, just wanted to make sure something like that hadn't been talked about
22:09:04 <cytrinox> Mrfo: where can I find the old generate_tiles.py script?
22:09:07 <Mrfo> springmeyer suggested it as a solution to a problem i was having a few days back
22:10:05 <artem> Mrfo: there is  PointSymbolizer which can have image label ??? Am I missing something ?
22:10:25 <Mrfo> cytrinox, i guess you'd have to grab an old svn revision
22:10:54 <Mrfo> artem, lemmie see if i can find the images i posted in the logs to explain the problem
22:11:22 <jburgess> Mrfo / cytrinox: the version I see still seems to include the view(128,128,256,256) workaround: http://svn.openstreetmap.org/applications/rendering/mapnik/generate_tiles.py
22:11:46 <Mrfo> ah, so it does. ignore my idea then :)
22:12:59 <cytrinox> jburgess: that is the version I already use
22:13:34 <Mrfo> artem, the problem was related to showing both a pointsymbolizer and a labelsymbolizer together
22:14:08 <artem> Mrfo: ok, you could use shield symbolizer with displacement (dx/dy) ?
22:15:36 <artem> Mrfo: shield symbolizer with 'point' placement and dx/dy
22:16:04 <artem> I need to see that image :0
22:16:21 <Mrfo> http://img15.imageshack.us/img15/1006/mapwithoutny7.png
22:16:38 <Mrfo> basically im trying to put points on a city
22:16:51 <Mrfo> so that shows the cities just with a label symbolizer
22:17:05 <Mrfo> http://img509.imageshack.us/img509/1199/mapwithpointsbj8.png
22:17:17 <artem> Mrfo: yes, the above should work then
22:17:44 <Mrfo> artem i tried that as well. the dx/dy moves the entire shield
22:18:50 <artem> right, looks like it needs some work then :)
22:19:39 <artem> perhaps, we should have displacements for label and text
22:21:14 <Mrfo> so an additional field for the shieldsymbolizer?
22:21:56 <artem> yep
22:22:44 <artem> this will cover all cases hopefully
22:53:09 *** matt_c_ has quit ()
22:56:24 *** matt_c (n=mcroydon@gateway.sunflowerbroadband.com) has joined #mapnik
23:02:51 *** aub has quit ()
23:03:00 *** xcacou has quit (Remote closed the connection)
23:04:16 *** aub (n=aubrey@cpe-72-227-134-148.nyc.res.rr.com) has joined #mapnik
23:05:26 *** TomH has quit (Read error: 101 (Network is unreachable))
23:10:59 <nikq> Mapnik Trac: Changeset [917]: OSM plugin: dataset_deliverer now re-fetches data if the URL has changed | http://trac.mapnik.org/changeset/917
23:22:28 *** matt_c has quit ()
23:26:45 *** ninja_ (n=pankur@cm122.psi133.maxonline.com.sg) has joined #mapnik
23:29:17 *** ninja__ (n=pankur@nat/yahoo/x-315134d74ec69f86) has joined #mapnik
23:31:49 <nikq> Mapnik Trac: Changeset [918]: + ignore unused variable warning | http://trac.mapnik.org/changeset/918
23:38:09 *** TomH (n=tom@gate.compton.nu) has joined #mapnik
23:42:37 <nikq> Mapnik Trac: Changeset [919]: added initial version of easymapnik: command line tool for generating  ... | http://trac.mapnik.org/changeset/919
23:49:00 *** ninja_ has quit (Read error: 110 (Connection timed out))
23:50:06 *** artem has quit ()
23:54:08 <nikq> Mapnik Trac: Changeset [920]: easymapnik: SRTM only if command line option given | http://trac.mapnik.org/changeset/920