#mapnik log: Friday 12, February 2010

2010 | 02

previous | next
00:00:55 <springmeyer> Ldp__: no, I didn't even think of that
00:01:13 <springmeyer> since its a feature to address limitations of AA
00:01:40 <springmeyer> but true, if anyone is using Cairo for PNG output that is AA is could also be useful
00:02:04 <Ldp__> springmeyer: I was mostly thinking of the OSM exporter
00:02:05 <springmeyer> I think maposmatic is doing this, but I can't think of any reason I'd use Cairo for PNG output
00:02:39 <springmeyer> right, we PDF and SVG (vector formats) don't need it...
00:03:05 <springmeyer> we/well
00:05:32 <cmarqu> springmeyer: Nothing apart from that Ideas page which has many of steve8's ideas in it
00:05:48 <cmarqu> http://trac.mapnik.org/wiki/Ideas
00:06:18 <springmeyer> okay. well if you like/support one in particular..
00:06:34 <springmeyer> what I need for the application is ideas listed here:
00:06:35 <springmeyer> http://trac.mapnik.org/wiki/GsocIdeas
00:07:01 <cmarqu> Yep.
00:07:29 <springmeyer> I might personally have to work on this one: when there is a very curvy road, place the name along a smoothed line (when the text is not centered to the line but with a dy)
00:07:32 <springmeyer> good idea... :)
00:07:45 <Ldp__> springmeyer: I have that already
00:07:45 <cmarqu> Ah :)
00:08:09 <springmeyer> Ldp__: sure, but you are a postgis guru. what about for use mere mortals? :)
00:08:11 <Ldp__> springmeyer: but I didn't like the result
00:08:16 * springmeyer chuckles
00:09:29 <springmeyer> I'd like to implement stream tapers - would be cool
00:09:41 <Ldp__> what I would most like to see is inline labeling support for polygons, where the text size and direction are based on the shape of the polygon
00:09:51 <cmarqu> Komzpa wanted to have text styling, that could be nice as well.
00:10:14 <springmeyer> Ldp__: going to propose that? :)
00:10:19 <Ldp__> might
00:10:45 <Ldp__> it will take the GSoC applicant well into Voronoi territory
00:12:22 <nikq> Mapnik Trac: GSOC2010 edited | http://trac.mapnik.org/wiki/GSOC2010?version=7
00:33:02 *** ajashton has quit (Ping timeout: 256 seconds)
00:50:18 *** HuskyRunner (~dkb@66-219-8-179.ip.gvtel.com) has joined #mapnik
00:50:50 *** HuskyRunner has quit (Client Quit)
01:01:54 *** cgs_bob_ has quit (Ping timeout: 248 seconds)
01:28:16 *** jfxberns (~jfxberns@ppp-58-8-129-173.revip2.asianet.co.th) has joined #mapnik
01:31:26 *** jfxberns has quit (Client Quit)
01:48:57 *** jctull has quit (Quit: jctull)
02:26:13 *** springmeyer has quit (Quit: springmeyer)
02:30:57 *** tcarobruce has quit (Quit: tcarobruce)
03:18:50 *** jburgess_ (~jburgess@15.92.187.81.in-addr.arpa) has joined #mapnik
03:18:54 *** jburgess has quit (Remote host closed the connection)
03:43:37 *** ajturner (~ajturner@pool-72-66-109-70.washdc.fios.verizon.net) has joined #mapnik
03:47:14 *** hobu has quit (Changing host)
03:47:14 *** hobu (~hobu@osgeo/member/hobu) has joined #mapnik
04:11:35 *** cgs_bob (~bob@9.sub-75-210-81.myvzw.com) has joined #mapnik
04:19:46 *** cgs_bob has quit (Ping timeout: 248 seconds)
04:44:52 *** ajturner has quit (Quit: ajturner)
04:52:22 *** HounD (~HounD@unics1.grfc.ru) has joined #mapnik
05:47:33 *** gavinf has quit (Quit: gavinf)
05:48:58 *** gavinf (~gavinf@41.5.227.137) has joined #mapnik
06:09:42 *** gavinf has quit (Remote host closed the connection)
06:47:31 *** jfreeman has quit (Read error: Connection reset by peer)
06:52:18 *** cgs_bob (~bob@122.135-78-65.ftth.swbr.surewest.net) has joined #mapnik
08:10:03 *** gavinf (~gavinf@41.5.227.137) has joined #mapnik
08:16:28 *** gavinf has quit (Remote host closed the connection)
10:15:04 *** gavinf (~gavinf@41.5.227.137) has joined #mapnik
10:17:24 *** Phurl__ has quit (Read error: Operation timed out)
10:18:47 *** Phurl__ (~mdupont@2001:0:53aa:64c:38de:21f2:ae2d:1b81) has joined #mapnik
10:21:21 *** Nicolas_ (~chatzilla@212-166-45-30.win.be) has joined #mapnik
10:21:35 *** Nicolas_ is now known as Nicolas_Gillet
11:10:15 *** gavinf has quit (Remote host closed the connection)
11:25:17 *** Phurl__ has quit (Read error: Operation timed out)
11:40:19 *** Phurl__ (~mdupont@cl-1773.dus-01.de.sixxs.net) has joined #mapnik
12:26:55 *** D3f0 (~D3f0@www.transpa-sa.com.ar) has joined #mapnik
12:28:14 *** D3f0 has quit (Client Quit)
12:51:48 *** ajturner (~ajturner@pool-72-66-109-70.washdc.fios.verizon.net) has joined #mapnik
13:09:20 *** gavinf (~gavinf@41.5.227.137) has joined #mapnik
13:11:16 *** gavinf has quit (Client Quit)
13:33:53 *** cgs_bob has quit (Remote host closed the connection)
13:34:21 *** cgs_bob (~bob@122.135-78-65.ftth.swbr.surewest.net) has joined #mapnik
13:37:55 *** hobu has quit (Excess Flood)
14:04:38 *** ajturner has quit (Quit: ajturner)
14:06:17 *** HounD has parted #mapnik (None)
14:17:49 *** ajturner (~ajturner@209.155.228.129) has joined #mapnik
14:19:05 *** chad_burt has quit (Quit: Leaving...)
14:19:13 *** chad_burt (~chad_burt@mm-01.msi.ucsb.edu) has joined #mapnik
14:39:00 *** ajashton (~aj@c-69-136-229-112.hsd1.dc.comcast.net) has joined #mapnik
14:45:31 *** hobu (~hobu@epimetheus.hobu.net) has joined #mapnik
15:57:02 *** springmeyer (~springmey@c-76-28-156-154.hsd1.wa.comcast.net) has joined #mapnik
16:14:45 *** mishok13 has quit (Quit: Leaving)
16:41:22 *** bcrosby (~bcrosby@shell.infiniteloop.ca) has joined #mapnik
16:43:23 *** bcrosby has parted #mapnik (None)
16:45:05 *** bcrosby (~bcrosby@shell.infiniteloop.ca) has joined #mapnik
16:45:09 <bcrosby> has anyone had a problem where mapnik was only rendering points where the lat and long were positive?
16:45:12 <bcrosby> ignoring negative ones
16:45:45 <springmeyer> bcrosby: what projection are you using?
16:46:07 <bcrosby> spherical mercator
16:46:13 <bcrosby>         <Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +no_defs">
16:47:21 <springmeyer> and for your <Layer>  ?
16:47:45 <bcrosby> srs="+init=epsg:4326"
16:47:52 <bcrosby> the source data is in 4326
16:48:41 <springmeyer> ah, okay
16:48:51 <springmeyer> yes, that is certainly a setup where points may be lost
16:49:15 <bcrosby> hmm ok
16:49:16 <springmeyer> not if they are negative, but if they fall outside the valid bounds of your spherical mercator map srs
16:49:28 <bcrosby> which could be the case here
16:49:38 <bcrosby> what do you suggest?
16:49:48 <springmeyer> bcrosby: do you have the gdal/ogr tools installed?
16:50:04 <bcrosby> yup
16:50:21 <DarcyB> springmeyer: in my XML I'm using srs="+proj=utm +zone=11N +datum=NAD83 +units=m +no_defs", and the .prj file has: PROJCS["NAD_1983_UTM_Zone_11N",GEOGCS["GCS_North_American_1983",DATUM["D_North_American_1983",SPHEROID["GRS_1980",6378137.0,298.257222101]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Transverse_Mercator"],PARAMETER["False_Easting",500000.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",-
16:50:21 <DarcyB> 0],PARAMETER["Scale_Factor",0.9996],PARAMETER["Latitude_Of_Origin",0.0],UNIT["Meter",1.0]]
16:50:29 <springmeyer> great. a good step is to use ogr2ogr to reprojected your points ahead of time...
16:50:59 <bcrosby> hmm
16:51:29 <bcrosby> ok, so if I do that, then I will need to change the layer srs?
16:51:41 <springmeyer> yes
16:52:19 <springmeyer> ogr2ogr -t_srs EPSG:900913 dest.shp source.shp
16:52:26 <bcrosby> yup
16:52:30 <bcrosby> let me see if that works :)
16:52:31 <springmeyer> then switch your layer srs to the map srs
16:52:33 <springmeyer> k
16:53:06 <springmeyer> DarcyB: okay, that looks fine
16:53:16 <springmeyer> DarcyB: how are you rendering your map?
16:53:41 <bcrosby> springmeyer: when I run tilecache to generate the tiles I get this: proj_init_error:failed to initialize projection with:+init=epsg:900913
16:54:14 <springmeyer> bcrosby: yes, 900913 is not "official" even though its literally the most commonly used for web mapping
16:54:18 <springmeyer> so you have to stick it into
16:54:30 <springmeyer> '/usr/share/proj/epsg'
16:54:34 <bcrosby> ahhh
16:54:37 <bcrosby> ok, I can do that
16:55:36 *** Nicolas_Gillet has quit (Quit: ChatZilla 0.9.86 [Firefox 3.5.7/20091221164558])
16:55:43 <DarcyB> springmeyer: basicly it's python tutorial #2
16:55:43 <nikq> Ticket #2: GetFeatureInfo() Support, http://trac.mapnik.org/ticket/2
16:56:00 <springmeyer> DarcyB: okay
16:56:11 <springmeyer> DarcyB: can you http://dpaste.com your whole XML?
16:56:50 <DarcyB> yes
16:59:07 <DarcyB> springmeyer: http://dpaste.com/157975/
16:59:53 <springmeyer> k, cool
17:00:04 * springmeyer looks back at the tutorial 2...
17:00:50 <springmeyer> okay, are you rendering that XML using the bit of python code here:
17:00:52 <springmeyer> http://trac.mapnik.org/wiki/XMLGettingStarted#HelloWorldXML ?
17:01:28 <springmeyer> if so...try changing:
17:01:31 <springmeyer> m.zoom_to_box(bbox)
17:01:48 <springmeyer> to...
17:01:52 <springmeyer> m.zoom_to_box(m.layers[0].envelope())
17:02:07 <DarcyB> springmeyer: http://dpaste.com/157978/  is shpinfo and python src
17:02:44 <springmeyer> right, your bounds that you are zooming to are not right...
17:02:50 <springmeyer> try the above line ^^
17:03:22 <DarcyB> That worked... thanks
17:03:25 <springmeyer> which essentially lets Mapnik read the bounds (aka envelope) of the shapefile automatically
17:03:28 <springmeyer> nice
17:03:42 <springmeyer> DarcyB: you may want to next install nik2img
17:04:05 <springmeyer> which is a tool that will handle that zoom-to automatically for you without coding python
17:04:26 <bcrosby> springmeyer: turns out I had a problem with one of my points
17:04:48 <springmeyer> bcrosby: did ogr2ogr report failures? how did you figure that out?
17:04:56 <bcrosby> yeah
17:04:58 <bcrosby> transform: couldn't project point (0 -90 0): tolerance condition error (-20)
17:05:11 * springmeyer nods
17:05:25 <springmeyer> -skipfailures is nice to blow past those
17:05:30 <bcrosby> yeah
17:05:34 <bcrosby> but it's a valid point though!
17:05:38 <bcrosby> its the south pole ;)
17:05:42 <springmeyer> ha, not in mercator!
17:05:50 <springmeyer> ya, exactly
17:05:54 <bcrosby> yeah
17:06:30 <springmeyer> bcrosby: you can try adding '+over' to your proj4 literal
17:07:05 <springmeyer> that helps with dateline issues, but likely not with invalid latitudinal measures
17:07:10 <springmeyer> but worth trying
17:08:34 <bcrosby> i'll try it
17:09:23 <bcrosby> thanks for your help
17:09:30 <springmeyer> bcrosby: np
17:09:47 <DarcyB> springmeyer: thanks alot  I "think" mapnik is goign to do what we need for producing printed maps.. (I hope)
17:10:02 <springmeyer> bcrosby: are you a polar explorer?
17:10:18 <bcrosby> springmeyer: I wish..
17:10:20 <bcrosby> I'm a pilot
17:10:31 <bcrosby> but i've never flown to the poles
17:10:33 <bcrosby> (yet)
17:10:33 <springmeyer> nice :)
17:10:53 <springmeyer> great, so you know all about the better map projections then!
17:11:12 <springmeyer> DarcyB: what are you trying to do?
17:11:17 <bcrosby> yup
17:12:31 *** Arc has parted #mapnik (None)
17:14:38 <DarcyB> springmeyer: this is for a local search and rescue group, I want to have a system that will provide for printed to scale maps across multiple "sheets" and the whole thing be scriptable..
17:14:48 <DarcyB> ie the users just choose their bounding box
17:15:03 <DarcyB> and the scape they want the maps at along with what layers
17:15:28 <DarcyB> and out will come a multipage PDF tat contains 8.5x11 covering the entire area
17:16:30 <springmeyer> nice, sounds interesting
17:16:57 <DarcyB> I hope it becomes doable...
17:17:02 <springmeyer> should be doable, yes
17:17:16 <DarcyB> That's what I thought :-)
17:17:42 <springmeyer> multipage PDF will require a few decisions
17:18:28 <DarcyB> I may just start with 1 PRD per page, and delived a zip file to the end user
17:18:34 <springmeyer> e.g there are a couple ways to handle that, the more powerful but complicated would be using mapnik + pycairo to generate a group of pdf's in one go
17:18:40 <springmeyer> yep,
17:18:44 <DarcyB> untill I figure out the multipage PDF part
17:19:06 <springmeyer> would be easier at first just to generate several separate files, the combine them somehow, zip being easiest
17:19:26 <springmeyer> but I bet you could use reportlab or something like that to combine after the fact
17:19:32 <DarcyB> that's what I'm thinking for now.. as well..
17:19:52 <springmeyer> cool
17:20:03 <springmeyer> this going to be a web application front end for users?
17:20:36 <DarcyB> Probabbly yes
17:21:07 <DarcyB> since that will be the easyest way to get interaction form the users
17:21:13 <springmeyer> yep
17:21:56 <springmeyer> are the maps intended to just be reference, or also annotated/marked up?
17:22:17 <springmeyer> e.g. will any info be drawn on them and later digitized?
17:22:18 <DarcyB> to start with, just reference
17:22:32 <DarcyB> with GPX data being overlayed
17:22:37 <springmeyer> k
17:22:58 <DarcyB> but down the road the ability to annotate would be heighly desirable
17:23:56 <springmeyer> k
17:24:19 <springmeyer> http://walking-papers.org/ addresses that issue in a nifty way
17:24:32 <DarcyB> Our experiance is that the #2 problem with SAR operations is poor quality maps
17:24:32 <nikq> Ticket #2: GetFeatureInfo() Support, http://trac.mapnik.org/ticket/2
17:24:42 <DarcyB> #1 is communications problems
17:24:43 <nikq> Ticket #1: no such ticket. (list index out of range)
17:25:43 <springmeyer> nikq: is a bot, just ignore it :)
17:25:54 <DarcyB> I figured that out pretty quick ;-)
17:27:04 <springmeyer> k, well stop using pound signs
17:27:08 <springmeyer> :)
17:27:24 <DarcyB> hehe
17:29:50 <DarcyB> So I'm hoping to address problem number 2 in a step by step bases.  the ability for team members to upload any of their own GPS tracks to overlay ontop of any other GIS data thast can be gotten for the area and then generate a printed map (complete with posistional grids and such) for the specific task
17:31:19 <springmeyer> yes, sounds good
17:31:32 <DarcyB> But one step at a time :-)
17:32:17 <DarcyB> Now I'd like to know what I managed to do wrong for my original bounding box
17:35:55 <springmeyer> degrees vs. meters
17:36:02 <springmeyer> just do
17:36:22 <springmeyer> print m.layers[0].envelope() to see the right one
17:39:55 *** rshortt (~quassel@24.222.57.182) has joined #mapnik
17:40:53 *** rshortt has quit (Remote host closed the connection)
17:43:14 *** tcarobruce (~tcarobruc@adsl-75-10-247-30.dsl.pltn13.sbcglobal.net) has joined #mapnik
17:48:17 <DarcyB> Ahh ok, I thought it was smart enough to do the conversion..
17:50:10 <DarcyB> so as long as I specify the bounding box in the correct units for layer[0] subsequent layers even if in a diffrent projection (properly specified via SRS) will project properly? or do I have to fisrt project all the layers into a common format?
17:50:45 <springmeyer> DarcyB: sure, the conversion of coords is handled automatically in many places
17:51:04 <springmeyer> but the map.zoom_to_box() method requires coordinates in the srs of the map
17:51:12 <DarcyB> also, can I specify a layer to have a sertin % transparancy ?
17:51:14 <springmeyer> in your case that is the same srs as your layer
17:51:25 <springmeyer> sure
17:51:45 <DarcyB> springmeyer: yes in this case it is, however i have several "layers" worth of data all in diffrent srs's
17:52:13 <springmeyer> sure, so all you have to do is provide the correct srs for all layers
17:52:27 <springmeyer> and they will be reprojected into the srs of the map
17:56:33 <DarcyB> ok, thanks...  (I guess I needs to spend soem more time reading up on the API)
17:56:56 <DarcyB> But this is looking promicing
17:57:00 <DarcyB> thanks alot
18:00:30 <DarcyB> (I'm sure I'll have a bunch more questions as this progresses)
18:06:16 *** ajturner_ (~ajturner@209.155.228.129) has joined #mapnik
18:07:36 *** Phurl__ has quit (Ping timeout: 256 seconds)
18:08:18 *** ajturner has quit (Ping timeout: 256 seconds)
18:08:18 *** ajturner_ is now known as ajturner
18:14:07 *** springmeyer has quit (Remote host closed the connection)
18:14:13 *** springmeyer (~springmey@c-76-28-156-154.hsd1.wa.comcast.net) has joined #mapnik
18:36:16 *** Phurl__ (~mdupont@ip-81-210-228-126.unitymediagroup.de) has joined #mapnik
19:00:25 *** jfreeman (~jfreeman@60-242-98-237.static.tpgi.com.au) has joined #mapnik
19:02:21 *** ajturner has quit (Ping timeout: 258 seconds)
19:03:43 *** ajturner (~ajturner@209.155.228.129) has joined #mapnik
19:13:35 *** aude_ (~chatzilla@20.sub-75-226-203.myvzw.com) has joined #mapnik
19:14:30 *** aude_ is now known as aude
19:33:01 *** jusfreeman (~jfreeman@webmail.acfid.asn.au) has joined #mapnik
19:33:40 *** jfreeman has quit (Ping timeout: 272 seconds)
19:37:16 *** justinfreeman (~jfreeman@60-242-98-237.static.tpgi.com.au) has joined #mapnik
19:39:25 *** justinfreeman has quit (Read error: Connection reset by peer)
19:41:16 *** jusfreeman has quit (Ping timeout: 272 seconds)
19:42:50 *** aude has quit (Ping timeout: 246 seconds)
20:03:33 *** aude (~chatzilla@20.sub-75-226-203.myvzw.com) has joined #mapnik
20:28:34 *** ajashton has quit (Remote host closed the connection)
20:29:23 *** ajashton (~aj@c-69-136-229-112.hsd1.dc.comcast.net) has joined #mapnik
20:30:57 *** ajashton has quit (Remote host closed the connection)
20:36:16 *** springmeyer has quit (Quit: springmeyer)
20:45:18 *** aude has quit (Ping timeout: 276 seconds)
20:45:46 *** springmeyer (~springmey@c-76-28-156-154.hsd1.wa.comcast.net) has joined #mapnik
20:58:46 *** hobu has quit (Changing host)
20:58:46 *** hobu (~hobu@osgeo/member/hobu) has joined #mapnik
21:55:13 *** springmeyer has quit (Quit: springmeyer)
22:56:20 *** ajashton (~aj@c-69-136-229-112.hsd1.dc.comcast.net) has joined #mapnik
23:08:48 *** Phurl__ is now known as Phurl
23:11:06 *** jfreeman (~jfreeman@60-242-98-237.static.tpgi.com.au) has joined #mapnik
23:22:35 *** jusfreeman (~jfreeman@webmail.acfid.asn.au) has joined #mapnik
23:23:13 *** jfreeman has quit (Ping timeout: 264 seconds)
23:26:58 *** jusfreeman has quit (Ping timeout: 240 seconds)
23:27:04 *** jusfreeman (~jfreeman@60-242-98-237.static.tpgi.com.au) has joined #mapnik
23:36:59 *** jusfreeman has quit (Ping timeout: 246 seconds)
23:52:25 *** jfreeman (~jfreeman@60-242-98-237.static.tpgi.com.au) has joined #mapnik