#QGIS IRC Log - 2009-05-12

For logs after Feb 3, 2007, all times are GMT-8. Prior logs are GMT-9.
Back to Logs
00:07:59 CIA-70: wonder * r10769 /branches/symbology-ng-branch/: Created a branch for new symbology implementation.
00:08:00 sigq: tracfeed: Changeset [10769]: Created a branch for new symbology implementation. <https://trac.osgeo.org/qgis/changeset/10769>
00:36:33 macho: mrng
00:39:15 aghisla: hi macho
00:43:00 CIA-70: wonder * r10770 /branches/symbology-ng-branch/src/core/ ( 24 files in 2 dirs ): Added a bunch of core symbology classes.
00:44:31 sigq: tracfeed: Changeset [10770]: Added a bunch of core symbology classes. <https://trac.osgeo.org/qgis/changeset/10770>
01:12:38 sigq: tracfeed: Ticket #1521 ( enhancement closed ): add column function misses an option to define the length for string type columns <https://trac.osgeo.org/qgis/ticket/1521#comment:1>
01:33:32 CIA-70: wonder * r10771 /branches/symbology-ng-branch/src/ui/ ( 13 files in 2 dirs ): Added a bunch of UI files for new symbology.
01:34:44 sigq: tracfeed: Changeset [10771]: Added a bunch of UI files for new symbology. <https://trac.osgeo.org/qgis/changeset/10771>
01:40:07 CIA-70: wonder * r10772 /branches/symbology-ng-branch/src/gui/ ( 18 files in 2 dirs ): Added a bunch of widgets and dialogs for new symbology.
01:40:09 sigq: tracfeed: Changeset [10772]: Added a bunch of widgets and dialogs for new symbology. <https://trac.osgeo.org/qgis/changeset/10772>
01:42:55 CIA-70: wonder * r10773 /branches/symbology-ng-branch/images/themes/default/ ( 6 files ): Added icons necessary for symbology dialogs
01:44:47 sigq: tracfeed: Changeset [10773]: Added icons necessary for symbology dialogs <https://trac.osgeo.org/qgis/changeset/10773>
02:55:05 sigq: tracfeed: Ticket #1686 ( bug created ): QGis crashes if in "printout composer" when I'm trying put scale gadget <https://trac.osgeo.org/qgis/ticket/1686>
03:08:42 dassouki: in the python console i've done ... x = QgsVectorLayer( "transit_2006" )
03:08:50 dassouki: x.startEditing returns false
03:08:58 dassouki: how can i enable/toggle editing ?
03:54:23 CIA-70: jef * r10774 /trunk/qgis/i18n/qgis_de.ts: german translation fix
03:54:24 sigq: tracfeed: Changeset [10774]: german translation fix <https://trac.osgeo.org/qgis/changeset/10774>
05:28:21 strk: oops, pan crashed on activating labels
05:29:30 strk: 0x00007f71e85efe50 in sincos ( ) from /usr/lib/libgdal1.5.0.so.1
05:29:40 strk: and keeps there....
05:29:40 strk: #155 0x00007f71e85efe73 in sincos ( ) from /usr/lib/libgdal1.5.0.so.1
05:29:47 strk: #545 0x00007f71e85efe73 in sincos ( ) from /usr/lib/libgdal1.5.0.so.1
05:29:49 strk: and so on
05:30:22 strk: death call in gdal1.5.0 looks like
05:32:14 jef: strk: broken gdal package.
05:34:29 CIA-70: mhugent * r10775 /trunk/qgis/ ( 6 files in 3 dirs ): Possibility to lock/unlock composer item position by right mouse click
05:34:57 strk: is gdal trunk good ?
05:35:07 strk: or, which would you reccomend ?
05:35:55 sigq: tracfeed: Changeset [10775]: Possibility to lock/unlock composer item position by right mouse click <https://trac.osgeo.org/qgis/changeset/10775>
05:41:09 cfarmer: dassouki: looking over the logs, you need to define: x = QgsVectorLayer( "transit_2006", "/path/to/transit/layer.shp", "ogr" ) or something else if it's not a shapefile
05:41:36 jef: strk: I think that bug was in intrepid only - some compiler issue that caused sincos to call itself in an endless recursion. our repository has a fixed gdal package.
05:42:27 jef: strk: #1536
05:42:33 jef: @ticket 1536
05:42:33 sigq: jef: http://trac.osgeo.org/qgis/ticket/1536
05:43:12 cfarmer: dassouki: nope I lied, it's: x = QgsVectorLayer( "/path/to/transit/layer.shp", "transit_2006", "ogr" )
05:44:53 strk: jef: annoyance ??
05:47:02 dassouki: let me try it one sec
05:47:29 dassouki: cfarmer: the lauyer is alreay loaded in the legend
05:47:40 dassouki: layer*
05:48:30 jef: strk: annoyance ???
05:48:33 cfarmer: then you can use: mc = iface.mapCanvas( ) \n layer = mc.layer( 0 ) #assumes layer is at the top of the list
05:50:43 dassouki: cfarmer: thank you, now a second question, is it possible to load a column into a python list? so in transit_layer, there is a column average_passengers, can i load that column into a list py_average_passengers for example ?
05:51:58 cfarmer: yeh, you just have to loop through the features to populate the list
05:52:11 dassouki: shouldn't be too bad then
05:52:38 cfarmer: for each feature grab the attributeMap( ), and then fectch the column based on id
05:52:54 cfarmer: attributeMap( ) is a dict
05:53:18 dassouki: that's even better, i'll just attributeMap directly
05:56:43 strk: jef: @ticket 1536 wasn't it : )
05:57:18 strk: never mind, I'm reuilding gdal from trunk, will let you know if still crashes
06:00:09 strk: ehm..
06:00:10 strk: -- Found GDAL: /usr/lib/libgdal1.5.0.so
06:00:12 strk: ( it's not there )
06:00:16 strk: where's the ccmake cache ?
06:00:35 strk: CMakeCache.txt ?
06:00:46 strk: yep, was easy : )
06:02:31 cfarmer: dassouki: keep in mind attributeMap only contains the attributes of one feature at a time...so you will still have to loop thru the features to get the whole column
06:04:21 dassouki: i have an equation in numpy in the following form: newColumn = ( ColA * ColB )/( sum of items in colA ** colD )
06:05:00 dassouki: so i'd like to load each column into a numpy vector or just a python list. if that makes any sense
06:08:40 dassouki: and then i'd like to add newColumn to my vector layer and save it
06:14:41 cfarmer: yup, you'll have to loop though the features and populate the list, then do your calculations, then loop through the features and write to the layer ( each feature at a time ).
06:16:25 cfarmer: attributeMap( ) and setAttributeMap( ) will be your friends... you can probably also use changeAttributeValue( ) see http://doc.qgis.org/head/classQgsVectorLayer.html for the available VectorLayer functions
06:16:26 sigq: Title: Quantum GIS API Documentation: QgsVectorLayer Class Reference ( at doc.qgis.org )
06:16:35 cfarmer: they are pretty much the same in python as they are in c++
06:17:48 spacedman: we need some python utils for this kind of thing
06:18:53 spacedman: i'd like to do: vList = attributes( layer,['age','distance'] ) and then have vList['age'] and vList['distance'] as vectors
06:19:30 spacedman: its probably code i've written five times for five plugins : )
06:19:34 dassouki: cfarmer: thank you for the help. I guess it's me being a noob in the QGIS api :D
06:20:10 spacedman: dassouki: i found that with the qgis api its a fairly short journey from noob to pro : )
06:20:11 dassouki: i always thought a good idea would be to write a blog/documentation of best of practice codes from different qgis plugins
06:20:57 spacedman: dassouki: there is documentation - it's called Carson Farmer's plugins : )
06:22:00 dassouki: spacedman: I agree, i learnt a lot from his code. Although i still don't quiet understand the dataprovider
06:23:11 dassouki: in the doGeoprocessing
06:32:49 cfarmer: spacedman is giving me too much credit! check out his ransterlang stuff... very nice ;- )
06:33:11 spacedman: wait for rastergraph : )
06:33:49 cfarmer: I'm intrigued....
06:33:50 spacedman: rasterlang doesn't have to worry about providers and looping over features anyway, just get a raster and turn it into a numpy array, then mash it : )
06:34:14 spacedman: rastergraph prototyping is in my googlecode svn
06:36:08 cfarmer: dassouki: the dataprovider is basically how you talk to your layer... there is some pretty good 'how-to' python stuff here: http://wiki.qgis.org/qgiswiki/PythonBindings
06:36:10 sigq: Title: PythonBindings - Quantum GIS Wiki ( at wiki.qgis.org )
06:36:42 : * cfarmer has to get back to the seminar...
06:36:50 dassouki: have fun and thanks a lot for your help
06:37:07 cfarmer: np
06:37:36 dassouki: spacedman: i think i might turn my little cute plugin for transit analysis into an equation editor, any suggestions ?
06:45:43 strk: labels are fine with gdal trunk
06:46:48 spacedman: equation editor? like a spreadsheet for attributes?
06:54:35 dassouki: spacedman: more like create layer.new_attribute = 'speed' * 'distance' / exp( 'time' ** 'income' )
06:55:14 spacedman: that would be interesting...
06:56:23 spacedman: but probably better to use python, then you dont need to write a parser.
07:05:46 dassouki: spacedman: http://imgur.com/2Fc is a screenshot
07:05:53 sigq: Title: imgur : the simple image sharer ( at imgur.com )
07:05:55 dassouki: it's done using pyqt and minimal python code
07:15:10 spacedman: neat
07:17:10 dassouki: so it just loads your layers and attributes, you create a new one or used a nexisting one ( saved in a text file ). Each equation is saved when you press OK.
07:17:23 dassouki: All i have to do now is figure out how to link my numpy to QGis and it'll be finito
07:23:40 dassouki: i was going off an equation editor in TransCAD
07:24:20 dassouki: and if anyone ha any suggesions i'm more than happy to take them
10:34:30 FrankW: jef: You didn't package GEOS 3.0.3 last fall did you? It is broken, and I'm just trying to confirm I produced the package.
10:45:40 dassouki: yay! just got offered a new job
11:14:47 timlinux: hi all
11:27:54 sigq: tracfeed: Ticket #1687 ( bug created ): Measure tool is very wrong <https://trac.osgeo.org/qgis/ticket/1687>
11:57:16 springmeyer: hey guys
11:57:59 springmeyer: so I'm noticing that when I open a shapefile qgis can successfully read the projection, but the map srs stays in WGS84
11:58:39 springmeyer: why would that be, shouldn't the map projection inherit from the single shapefile that is opened, or do users always need to manually specify the map projection?
11:58:48 racicot: springmeyer: go to project properties under settings and change the srs
11:59:28 racicot: do you have "enable on the fly crs transformation" checked?
11:59:45 springmeyer: nope
12:00:13 springmeyer: I turn it on frequently but am always opening fresh shapefiles...
12:00:28 springmeyer: so that setting being project based must be what is throwing me
12:00:51 racicot: yeh, I think that you have to manually change it... since it is a project based setting
12:01:36 springmeyer: oh dear
12:01:49 racicot: but I can see the issue that if you dont hvae on the fly reprojection enabled and you load something not in WGS84 you get a funky state... Project in WGS84 and your file in something else...
12:01:57 springmeyer: so changing it forces reprojection of the shapefile into wgs84
12:02:36 racicot: well, you can change the project srs to something that matches your shapefile and it wont reproject... right?
12:02:49 jayd--: yes
12:02:59 springmeyer: no, I'm not that smart
12:03:05 jayd--: if you manually change it everything is ok
12:03:18 FrankW: I'm with springmeyer thinking that the project SRS should default to undefined, and then be establish based on the first file loaded.
12:03:19 jayd--: ( i've just proved that I wasn't that smart either )
12:03:47 : * racicot is just pointing out how it works... not that it is correct ;- )
12:04:03 racicot: I also agree that defaulting to the first layer loaded would be nice...
12:04:15 : * springmeyer is thankful for that and of course tongue-in-cheek
12:04:28 racicot: springmeyer: if you remember, in openoceanmap that is what we do...
12:04:44 springmeyer: but I figure I might be faster writing a patch than looking up the epsg code for the wkt every time
12:04:48 racicot: anyway, look to see if there is already a ticket for that. should be simple to fix...
12:04:53 springmeyer: racicot: ah, certainly forgot that
12:04:58 springmeyer: k,
12:05:02 : * springmeyer heads to trac
12:05:05 springmeyer: thx!
12:05:26 jayd--: thanks dane!
12:05:40 springmeyer: thanks jayd-- for pointing it out
12:06:09 springmeyer: jayd-- I actually realized some crazy demos I had in bonne projection were actually rendering in wgs84!
12:06:20 springmeyer: but somehow they were working so I never noticed this behavior : )
12:06:44 jayd--: ha!
12:06:53 springmeyer: seriously ha!
12:07:34 springmeyer: FrankW: confirmed with artem this morning that the boost memory mapping is likely getting us in trouble
12:07:42 springmeyer: thanks again for your help sussing that out
12:07:55 springmeyer: solution is going to be to use ogr : )
12:07:56 FrankW: Ah, makes sense.
12:08:18 springmeyer: so, again, __thank you__
12:09:04 springmeyer: jayd-- this relates to Quantumnik, essentially a bug in the mapnik shapefile driver makes the plugin useless on windows
12:10:48 : * jayd-- is using quantumnik ....This is great!
12:11:11 racicot: it is pretty cool...
12:11:45 jayd--: a nice print preview before I render large tilesets
12:12:05 wildintellect: how about allowing users to set a default of whether they want on-the-fly or not
12:13:13 wildintellect: I'm actually more concerned that 1/2 my proj files never read correctly
12:13:27 racicot: wildintellect: it isnt so much about on the fly I dont think, but instead if the project projection is automagically picked up when you load the first layer...
12:13:29 springmeyer: wildintellect: I feel like I've been noticing that as well
12:14:07 : * springmeyer finds somewhat related: http://trac.osgeo.org/qgis/changeset/6363
12:14:10 sigq: Title: Changeset 10775 - Quantum GIS - Trac ( at trac.osgeo.org )
12:14:11 wildintellect: racicot, I don't always want the 1st layer I load to set it
12:14:55 racicot: the projection parsing and compare is done at the proj string level as a true string compare... so it is very prone to misses. i.e. if all the parameters are there but in differing orders it will miss
12:14:55 wildintellect: springmeyer, I recall discussing recently that proj files from ESRI are missing a line or 2 sometimes
12:15:15 racicot: wildintellect: well, to have the option to have it set automatically or not from the first file...
12:15:26 wildintellect: yes I agree
12:15:28 springmeyer: ah, that makes sense, QGIS may not know when to 'MorphFromEsri'...
12:15:44 racicot: wildintellect: what do you want to happen if you dont have on the fly reprojection and you load a non wgs84 file?
12:15:45 springmeyer: wildintellect: if not the first layer loaded into a new project, then what?
12:16:18 wildintellect: I'm just saying let the user set a setting as to whether they want it to behave like that
12:16:35 wildintellect: it can be on by default
12:17:19 racicot: well a setting makes sense in most cases... but if you get the user into a bad state ( like project wgs84, layer epsg:2285, and on the fly reprojection off ) that seems bad...
12:17:59 wildintellect: when they don't line up at all I know it's a projection issue
12:18:25 wildintellect: that's usually how I can tell that QGIS failed to read the proj file
12:18:34 racicot: OK, that makes sense...
12:19:29 wildintellect: hmm, we should have it say what projection is in use in the status bar
12:21:16 : * timlinux tries to return
12:21:46 wildintellect: I do think init the proj on 1st layer is fine, I just want to be able to disable that when I like as a program setting
12:22:41 wildintellect: and if I can see the proj name in the status bar - there wont be any confusion as to what I'm looking at
12:22:42 racicot: timlinux: when you get a chance read back the logs and weigh in on the projection talk that just happened
12:23:10 timlinux: racicot, hi will do
12:23:27 timlinux: racicot, need to get some stuff done for release right now first
12:23:57 racicot: timlinux: no rush, just thought you might be interested at some point...
12:25:53 jayd--: springmeyer: is there a way to control render order when loading a xml file with quantumnik?
12:26:03 springmeyer: how can I figure out if 'on-the_fly' projection is checked via python?
12:26:39 racicot: springmeyer: I have never looked... not sure you can
12:26:46 springmeyer: jayd-- you mean within the xml layers or between the mapnik render and other qgis layers?
12:26:48 : * cgs_bob wonders if numeric precision in the proj string can affect the srs lookup?
12:27:03 jayd--: between qgis layers and mapnik layers
12:27:05 springmeyer: k, thx racicot
12:27:21 springmeyer: jayd-- no
12:27:33 racicot: cgs_bob: last time I had looked ( and submitted a patch in that code ) it would make a difference... again it was just a straight string compare
12:27:40 racicot: but that was a while back...
12:27:53 springmeyer: really all that does right now is offer browsing of a mapnik xml in qgis, rather than any level of interaction
12:28:20 jayd--: would be nice to be able to layer two xml layers
12:28:30 springmeyer: parsing of the mapnik xml into qgis layers is a wholly different funtion that might be what you are after?
12:28:39 springmeyer: oh ya that 'two'
12:29:11 cgs_bob: racicot: wouldn't you avoid that problem if decimal degrees were replaced with degree minute and sec. I believe proj supports it
12:29:13 springmeyer: hmm, that could be possible but a bit of workd
12:30:00 racicot: cgs_bob: well, most projections are going to have feet and meters in many of the params...
12:30:56 jayd--: I noticed that the loaded xml "layer" is not in the legend
12:31:21 springmeyer: ya, no way its just a mapnik map in memory living outside of qgis
12:31:31 jayd--: ahhh
12:31:40 springmeyer: but qgis sends a single to re-render and paint the map on the canvas each time you pan/zoom
12:32:02 springmeyer: so when you load an xml there's only that single thin relationship between qgis and mapnik
12:33:11 jayd--: I assume making the in memory mapnik "layer" a real layer is no trival task
12:35:20 timlinux: jef you about?
12:35:30 springmeyer: well, it would be trivial to parse the XML and actually load the datasources as real QGIS layers, but it would be non-trivial to write the logic to parse the styles into QGIS symbology
12:35:31 timlinux: I cant seem to get into launchpad is it working for you?
12:36:09 springmeyer: better effort would be spend building SLD support directly in QGIS i bet
12:38:29 wildintellect: springmeyer, on-the-fly http://doc.qgis.org/head/classQgsMapRenderer.html#9b13436da0a9dd045753f24df1d33ea9
12:38:30 sigq: Title: Quantum GIS API Documentation: QgsMapRenderer Class Reference ( at doc.qgis.org )
12:40:00 racicot: wildintellect: that is a protected function and I bet not exposed into the python API... but that is just my guess
12:40:07 wildintellect: springmeyer, more specifically you might get it from http://doc.qgis.org/head/classQgsMapRenderer.html#e53931870a9b3f25f1bef82e52fa1a2b
12:40:08 sigq: Title: Quantum GIS API Documentation: QgsMapRenderer Class Reference ( at doc.qgis.org )
12:40:23 wildintellect: racicot, I know it was a start to find the real answer
12:40:34 racicot: cool
12:41:16 wildintellect: I think that second link is the answer
12:42:40 jayd--: springmeyer: I'm not wishing to see qgis rendering, but rather two mapnik renderings on top of each other, and the ability to treat a mapnik rendering as a layer in the legend
12:42:41 : * springmeyer starts planning a round for wildintellect next week
12:44:33 springmeyer: jayd--: ah ha, so actually having a legend entry equate to a loaded mapnik xml ( might have N numbers of layers ) and being able to load multiple
12:44:41 springmeyer: then drag/drop to re-order...
12:44:49 jayd--: exactly!
12:45:12 wildintellect: springmeyer, don't look at me I'm just good at reading - I have no idea how to use the info I've found
12:45:32 jayd--: the same way it would handle a wms layer
12:45:36 springmeyer: ya, that sound do-able, but kinda begs the question of why that needs to bother/hijak QGIS? why not custom OL app?
12:45:51 springmeyer: wildintellect: nope, works perfect ; )
12:45:56 jayd--: true true.
12:46:23 wildintellect: springmeyer, really what does the line of code look like?
12:46:45 jayd--: quantumnik seems like a nice platform to set up stuff and play around.
12:47:28 jayd--: though it is easy enough to do it in openlayers ( which is what I currently do )
12:48:16 springmeyer: wildintellect: http://dpaste.de/qk2W/
12:48:17 sigq: Title: dpaste.de: Snippet #1169 ( at dpaste.de )
12:54:17 sigq: tracfeed: Milestone Branch - Diagram Branch completed <https://trac.osgeo.org/qgis/milestone/Branch%20-%20Diagram%20Branch>
12:58:00 wildintellect: ah, I think I finally get the python console
12:58:51 wildintellect: ( ) in the middle of an object seems to odd to me, but that's the way it works iface.mapCanvas( ).mapRenderer( ).hasCrsTransformEnabled( )
12:59:08 springmeyer: heh : )
12:59:26 springmeyer: ya, pretty much writing C in python ; )
12:59:54 jayd--: @springmeyer when qgis is set to "no pen" the xml still creates a <LineSymbolizer>
12:59:55 timlinux: cfarmer, you there?
12:59:56 springmeyer: in mapnik we wrap the python bindings a good bit to be more pythonic
13:00:05 springmeyer: such that the map srs in mapnik is:
13:00:09 springmeyer: >>> map.srs
13:00:10 wildintellect: my C was never unrusty so it explains the confusion
13:00:11 springmeyer: : )
13:00:19 jayd--: @springmeyer when qgis is set to "no pen" the xml still creates a <LineSymbolizer>
13:00:50 springmeyer: jayd--: okay, ya that's a tricky one
13:01:08 springmeyer: QGIS lets you keep a line width value but set as "no pen"
13:01:14 jayd--: yeah
13:01:27 springmeyer: I thought I was honoring either line width of 0.0 or no pen...
13:01:36 springmeyer: oh wait...
13:01:48 springmeyer: right, so thats intentional
13:02:29 springmeyer: so Mapnik has what i think is a bug such that when you render adjacent polygons with only a PolygonSymbolizer
13:03:10 springmeyer: and no LineSymbolizer, you get atrifacts ( ie you see the lack of lines as if there were gaps )
13:03:27 springmeyer: so I hack in a small line width in the same color as the polygon fill
13:03:49 springmeyer: heh, I should probably take that out
13:04:10 jayd--: I've never noticed that bug
13:05:10 springmeyer: you'll only see it with adjacent polygons with the same fill color, so a good chloropleth map ( like you do : ) ) won't show it
13:08:32 sigq: tracfeed: Ticket #1687 ( bug closed ): Measure tool is very wrong <https://trac.osgeo.org/qgis/ticket/1687#comment:2>
13:15:30 springmeyer: jayd-- http://bitbucket.org/springmeyer/quantumnik/changeset/aff7938da297/
13:15:31 sigq: Title: springmeyer / Quantumnik / changeset / aff7938da297 bitbucket.org ( at bitbucket.org )
13:25:31 springmeyer: http://trac.osgeo.org/qgis/ticket/1688
13:25:31 sigq: tracfeed: Ticket #1688 ( enhancement created ): Map srs should inherit from first layer added to new project <https://trac.osgeo.org/qgis/ticket/1688>
13:30:33 jayd--: springmeyer a warning message is a good call
13:51:26 timlinux: gah
13:51:39 : * timlinux returns from yet another system lock up
13:51:45 timlinux: cfarmer, you there?
13:52:49 cfarmer: hey timlinux! Yup!
13:53:20 cfarmer: connection problems?
13:53:25 timlinux: cfarmer, have you made a pdf of the new manual?
13:53:32 timlinux: cfarmer, stability problems with jaunty
13:53:39 cfarmer: yes I have, found some mistakes?
13:53:45 timlinux: ( besides the usual connection problems )
13:53:59 timlinux: cfarmer, no I want to put it on the download site for the release
13:54:07 timlinux: are you ready for me to do that?
14:01:15 cfarmer: timlinux: I already put it on the documentation site if that's what you mean?
14:03:27 timlinux: cfarmer, thats what I mean - where did you put it on the qgis.org site?
14:04:33 cfarmer: timlinux: http://www.qgis.org/en/documentation/manuals.html Sorry I didn't wait, but I figured no one would really notice it there until you announced the new version of the software ;- )
14:04:34 sigq: Title: Manuals ( at www.qgis.org )
14:06:49 timlinux: cfarmer, its no problem at all
14:07:02 cfarmer: great, so you're announcing the new version today?
14:07:17 timlinux: cfarmer, I just want to include a reference to the latest one in the release announcement so people *do* actually know :- )
14:07:23 timlinux: cfarmer, Im trying to
14:07:47 cfarmer: nice! I have many colleagues looking forward to it!
14:08:12 timlinux: cfarmer, just busy sorting out the download table and moving it into qgis.org so we can remove duplication that exists between that and download.qgis.org
14:08:29 timlinux: and doing a bit of jquery table magic in the process
14:16:50 cfarmer: nice!
14:17:12 cfarmer: I'm trying to put a python course together, and figuring out the budget is the hard part!
14:24:21 timlinux: cfarmer, make it free :- )
14:26:56 cfarmer: i'll make it cheap... but my time is not 'free as in freedom' ;-p
14:27:23 cfarmer: though that certainly would be nice ;- )
14:28:01 cfarmer: ... hmm, nor is it 'free as in free beer'
14:28:07 cfarmer: ;- )
14:29:27 timlinux: cfarmer, heh
15:31:37 : * timlinux will continue preparing the release tomorrow night...time for bed
15:31:40 timlinux: cheers all
15:50:46 dassouki: cfarmer: how in doGeoprocessing, how's the layer selected ( id ) from the combobox ( line 234 ) is returned to do the buffer. I'm sorry about my noobiness, but i can't figure out how to relate the layer selected by the user to the id in the canvas
15:53:00 cfarmer: ah, yes well the way I do it isn't really the best way...
15:53:56 cfarmer: basically, it populates the combo box in the plugin, and then when the user selects a layer there, it loops through the layer registry in QGIS, and finds the layer who's name matches the name in the combo box
15:55:29 dassouki: what's a better way of doing it, extending the get layer names to a dict or something with specfic ID ? and the npopulating the combobox from that
15:58:00 cfarmer: yeh probably that would be better... each QgsMapLayer ( QgsVectorLayer inherits from this ) has a unique id which you can retrieve with getLayerId( ), so you could use this value in your dict
15:59:34 cfarmer: the only problem is that dicts don't preserve order, so the other way to do this would be to display the layer name in the combo box, and the id as data associated with each item in the combo box... I think you can do this in Qt
16:00:59 cfarmer: QComboBox.addItem( text = QString, userData = QVariant )
16:01:34 cfarmer: note: the last post isn't syntactically correct, it just gives you an idea of the data types to use...
16:01:56 dassouki: cfarmer: i see sounds interesting
16:04:41 cfarmer: yeh, then you just grab the data ( which is the layer id ) from the user selected combo box item, and directly fetch the layer from the registry using: mapLayer( layer id ) from QgsMapLayerRegistry
16:05:45 cfarmer: In fact, I think I'm going to change fTools to do just that in the future!
16:06:08 cfarmer: ok, I'm going to call it a night... but let me know how that works for you...
16:06:20 dassouki: before you go
16:06:27 cfarmer: ok, one more quick one;- )
16:07:24 dassouki: why can't a normal dict work if it's { 0:layer_1, 2:layer_2
16:07:55 cfarmer: yeh, that would work perfectly well actually
16:08:47 dassouki: i'm not sure if it's better practice but i think it's faster.
16:09:10 dassouki: or simpler
16:09:59 dassouki: now setting up the signal would be intersting
16:10:45 dassouki: thanks for the help
16:11:24 cfarmer: might be... naw the signal is the easy part... just connect to currentIndexChanged on the combo box, and each time this happens update your field names by grabbing the fields( ) from the layer's data provider
16:11:26 cfarmer: no
16:11:28 cfarmer: problem
16:12:14 dassouki: : )
16:12:41 cfarmer: cheers all!
16:12:51 dassouki: cheers
16:43:08 wildintellect: now you make me wonder what I did in the metaedit plugin
16:46:15 dassouki: ??
16:47:16 dassouki: is it called meta edit
16:47:18 dassouki: i'll look at it
16:49:08 wildintellect: it looks like I just use the layer number
16:50:17 dassouki: wildintellect: in the opentemplate, the ok cancel seem reversed ?
16:50:34 wildintellect: lol, I'll look into that
16:50:42 dassouki: i mean just the position
16:50:51 dassouki: kind of counter intuitive for linux at least
16:50:59 wildintellect: oh I think that is auto dictated by Qt
16:51:10 wildintellect: those are premade Qt buttons
16:51:25 dassouki: oooh k