From bernhard at intevation.de Mon Nov 6 11:19:04 2006 From: bernhard at intevation.de (Bernhard Reiter) Date: Mon, 6 Nov 2006 11:19:04 +0100 Subject: postgis tests on Debian Etch (5 errors 1 failure left) Message-ID: <200611061119.11526.bernhard@intevation.de> Got around to look at [#173] postgis testcase not usable with recent debian systems Since Revision 2714 if you set the direct path to pg_ctl in test/postgissupport.py you can run the tests. (#173 still needs some work.) Now I get 5 Errors and one failure: ====================================================================== ERROR: test_postgis_db.TestPostGISShapestorePointOIDAsGIDColumn.test_all_shapes ---------------------------------------------------------------------- Traceback (most recent call last): File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/test/test_postgis_db.py", line 760, in test_all_shapes self.assertEquals(len(list(self.store.AllShapes())), 34) File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/Thuban/Model/postgisdb.py", line 670, in AllShapes cursor.execute("SELECT %s, AsText(%s) FROM %s ORDER BY %s" ProgrammingError: ERROR: column "oid" does not exist SELECT "oid", AsText("the_geom") FROM "landmarks_point_id" ORDER BY "oid" ====================================================================== ERROR: test_postgis_db.TestPostGISShapestorePointOIDAsGIDColumn.test_shape_points ---------------------------------------------------------------------- Traceback (most recent call last): File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/test/test_postgis_db.py", line 743, in test_shape_points gid = self.find_test_shape_id() File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/test/test_postgis_db.py", line 730, in find_test_shape_id return list(shapes)[0].ShapeID() File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/Thuban/Model/postgisdb.py", line 688, in ShapesInRegion cursor.execute("SELECT %(gid)s, AsText(%(geom)s) FROM %(table)s" ProgrammingError: ERROR: column "oid" does not exist SELECT "oid", AsText("the_geom") FROM "landmarks_point_id" WHERE "the_geom" && GeometryFromText('POLYGON((-20.000000 64.000000, -20.000000 67.000000, -24.000000 67.000000, -24.000000 64.000000, -20.000000 64.000000))', 1) ORDER BY "oid" ====================================================================== ERROR: test_postgis_db.TestPostGISShapestorePointOIDAsGIDColumn.test_shape_raw_data ---------------------------------------------------------------------- Traceback (most recent call last): File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/test/test_postgis_db.py", line 749, in test_shape_raw_data gid = self.find_test_shape_id() File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/test/test_postgis_db.py", line 730, in find_test_shape_id return list(shapes)[0].ShapeID() File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/Thuban/Model/postgisdb.py", line 688, in ShapesInRegion cursor.execute("SELECT %(gid)s, AsText(%(geom)s) FROM %(table)s" ProgrammingError: ERROR: column "oid" does not exist SELECT "oid", AsText("the_geom") FROM "landmarks_point_id" WHERE "the_geom" && GeometryFromText('POLYGON((-20.000000 64.000000, -20.000000 67.000000, -24.000000 67.000000, -24.000000 64.000000, -20.000000 64.000000))', 1) ORDER BY "oid" ====================================================================== ERROR: test_postgis_db.TestPostGISShapestorePointOIDAsGIDColumn.test_shape_shapeid ---------------------------------------------------------------------- Traceback (most recent call last): File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/test/test_postgis_db.py", line 738, in test_shape_shapeid gid = self.find_test_shape_id() File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/test/test_postgis_db.py", line 730, in find_test_shape_id return list(shapes)[0].ShapeID() File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/Thuban/Model/postgisdb.py", line 688, in ShapesInRegion cursor.execute("SELECT %(gid)s, AsText(%(geom)s) FROM %(table)s" ProgrammingError: ERROR: column "oid" does not exist SELECT "oid", AsText("the_geom") FROM "landmarks_point_id" WHERE "the_geom" && GeometryFromText('POLYGON((-20.000000 64.000000, -20.000000 67.000000, -24.000000 67.000000, -24.000000 64.000000, -20.000000 64.000000))', 1) ORDER BY "oid" ====================================================================== ERROR: test_postgis_db.TestPostGISShapestorePointOIDAsGIDColumn.test_shapes_in_region ---------------------------------------------------------------------- Traceback (most recent call last): File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/test/test_postgis_db.py", line 756, in test_shapes_in_region self.assertEquals(len(list(shapes)), 7) File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/Thuban/Model/postgisdb.py", line 688, in ShapesInRegion cursor.execute("SELECT %(gid)s, AsText(%(geom)s) FROM %(table)s" ProgrammingError: ERROR: column "oid" does not exist SELECT "oid", AsText("the_geom") FROM "landmarks_point_id" WHERE "the_geom" && GeometryFromText('POLYGON((-20.000000 64.000000, -20.000000 67.000000, -24.000000 67.000000, -24.000000 64.000000, -20.000000 64.000000))', 1) ORDER BY "oid" ====================================================================== FAIL: test_postgis_db.TestPostGISConnection.test_gis_tables_with_views_and_tables ---------------------------------------------------------------------- Traceback (most recent call last): File "/mobilehome/bernhard/hacking/thuban/root/trunk/thuban-on-sid/test/test_postgis_db.py", line 127, in test_gis_tables_with_views_and_tables [("oid", FIELDTYPE_INT), ("a", FIELDTYPE_INT), AssertionError: [('a', 'int'), ('the_geom', 'geometry')] != [('oid', 'int'), ('a', 'int'), ('the_geom', 'geometry')] ====================================================================== FAIL: Extensions.ogr.test.test_OGRShapestore.TestOGRTable.test_Column ====================================================================== FAIL: Extensions.ogr.test.test_OGRShapestore.TestOGRTable.test_Columns ---------------------------------------------------------------------- Ran 578 tests in 144.505s FAILED (failures=3, errors=5) skipped = 0 -- Managing Director - Owner, www.intevation.net (Free Software Company) Germany Coordinator, fsfeurope.org (Non-Profit Org for Free Software) www.kolab-konsortium.com (Email/Groupware Solution, Professional Service) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20061106/898cbb94/attachment.bin From bh at intevation.de Mon Nov 6 11:29:09 2006 From: bh at intevation.de (Bernhard Herzog) Date: Mon, 06 Nov 2006 11:29:09 +0100 Subject: [Thuban-commits] r2714 - in trunk/thuban: . test In-Reply-To: <20061106100915.C624D18017E6@pyrosoma.intevation.org> (scm-commit@wald.intevation.org's message of "Mon\, 6 Nov 2006 11\:09\:15 +0100 \(CET\)") References: <20061106100915.C624D18017E6@pyrosoma.intevation.org> Message-ID: scm-commit at wald.intevation.org writes: > =================================================================== > --- trunk/thuban/test/postgissupport.py 2006-10-26 16:37:42 UTC (rev 2713) > +++ trunk/thuban/test/postgissupport.py 2006-11-06 10:09:14 UTC (rev 2714) [...] > +_pg_ctl_command = "pg_ctl" > +_initdb_command = "initdb" > +# Example Values for Debian (upcomind Etch) postgresql-8.1 > +# TODO: detect which values to use here. > +#_pg_ctl_command = "/usr/lib/postgresql/8.1/bin/pg_ctl" > +#_initdb_command = "/usr/lib/postgresql/8.1/bin/initdb" Wouldn't it be easier to simply add /usr/lib/postgresql/8.1/bin/ to PATH when running the testsuite on etch? The testsuite could perhaps detect that initdb or pg_ctl are not in PATH and then skip the tests. Bernhard -- Intevation GmbH http://intevation.de/ Skencil http://skencil.org/ Thuban http://thuban.intevation.org/ From bernhard at intevation.de Mon Nov 6 11:31:28 2006 From: bernhard at intevation.de (Bernhard Reiter) Date: Mon, 6 Nov 2006 11:31:28 +0100 Subject: Planning for 1.2.0 release. Message-ID: <200611061131.32035.bernhard@intevation.de> So what do you we need to do to get 1.2.0 out of the door? Browsing our problem tracker at wald, here are the issues that I think we should address before releasing 1.2.0: 97 problem accessing database tables with 1.1.0 version : wx 2.6 problem 98 problem accessing database tables with 1.1.0 version : point layers 118 problem with utf8 systems trying to see non utf8 table We must look into the postgis failures I had on Debian Etch (see my post a few minutes ago). In addition I think we should fix the packaging for Debian Etch as well. Anything that I have missed? Barry, I have not heard much from your in the last days, so I am assuming that your changes should go in for 1.2.1 or a development release 1.3.0, so people can test your stuff. There is no timeframe for the 1.2.0 release, but because the last release was so long ago, I want only critical problems to delay it and it will be published when it is ready. Bernhard -- Managing Director - Owner, www.intevation.net (Free Software Company) Germany Coordinator, fsfeurope.org (Non-Profit Org for Free Software) www.kolab-konsortium.com (Email/Groupware Solution, Professional Service) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20061106/f47fe414/attachment.bin From thuban-bugs at wald.intevation.org Mon Nov 6 14:33:45 2006 From: thuban-bugs at wald.intevation.org (thuban-bugs@wald.intevation.org) Date: Mon, 6 Nov 2006 14:33:45 +0100 (CET) Subject: =?UTF-8?B?W3RodWJhbi1CdWdzXVsyMjRdIHBvc3RnaXMgdGFibGVzIG9uIHV0Zjggc3lzdGVtcyBtdXN0IHVzZSBwc3ljb3BnMiAuLi4=?= Message-ID: <20061106133345.22B8C18017E6@pyrosoma.intevation.org> Bugs item #224, was opened at 2006-11-06 14:33 You can respond by visiting: http://wald.intevation.org/tracker/?func=detail&atid=105&aid=224&group_id=6 Or by replying to this e-mail entering your response between the following markers: #+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ (enter your response here) #+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ Status: Open Priority: 3 Submitted By: Didrik Pinte (dpinte) Assigned to: Nobody (None) Summary: postgis tables on utf8 systems must use psycopg2 ... Resolution: None Version: None Category: None Initial Comment: The psycopg 1 module does not support utf-8 locales. In order to correct the problem, I've written a little path to support psycopg2. The technical migration from psycopg1 to psycopg2 is described here : http://initd.org/tracker/psycopg/wiki/Migration The only things to patch are in the Thuban/Model/postgisdb.py file : [1] the import must manage the version 1 and version 2 [2] %d formatting is not supported anymore with psycopg2 [3] psycopg.INTEGER is not defined anymore by psycopg.NUMBER exists in the two version. [4] There seem to be a little problem with line 538 of the file: cursor.execute("SELECT srid, type FROM geometry_columns" " WHERE f_table_name = %s AND f_geometry_column=%s", (self.tablename, self.geometry_column)) With psycopg 1, this line produces the following non authorized sql statement : SELECT srid, type FROM geometry_columns WHERE f_table_name = 'europe' AND f_geometry_column=the_geom With psycopg 2,it works fine ... Can someone with a working psycopg1 environment test the patch ? ---------------------------------------------------------------------- You can respond by visiting: http://wald.intevation.org/tracker/?func=detail&atid=105&aid=224&group_id=6 From thuban-featurerequests at wald.intevation.org Mon Nov 6 15:25:06 2006 From: thuban-featurerequests at wald.intevation.org (thuban-featurerequests@wald.intevation.org) Date: Mon, 6 Nov 2006 15:25:06 +0100 (CET) Subject: =?UTF-8?B?W3RodWJhbi1GZWF0dXJlIFJlcXVlc3RzXVsyMjVdIHRodWJhbiBzb3VsZCBiZSBhYmxlIHRvIHVzZSBhIGRhdGFiYXNlIHRhYmxlIGFzIHRhYmxlIGlucHV0?= Message-ID: <20061106142506.5263518017E6@pyrosoma.intevation.org> Feature Requests item #225, was opened at 2006-11-06 15:25 You can respond by visiting: http://wald.intevation.org/tracker/?func=detail&atid=108&aid=225&group_id=6 Or by replying to this e-mail entering your response between the following markers: #+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ (enter your response here) #+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+#+ Status: Open Priority: 3 Submitted By: Didrik Pinte (dpinte) Assigned to: Nobody (None) Summary: thuban sould be able to use a database table as table input Version: None Category: None Initial Comment: At the moment, it is possible to load a dbf table in order to use it in Thuban (for join, etc.). It should be interesting to extend the capabilities of Thuban so that it can load a database table to it the same way. Most of the code should already be there. ---------------------------------------------------------------------- You can respond by visiting: http://wald.intevation.org/tracker/?func=detail&atid=108&aid=225&group_id=6 From bernhard at intevation.de Mon Nov 6 16:56:40 2006 From: bernhard at intevation.de (Bernhard Reiter) Date: Mon, 6 Nov 2006 16:56:40 +0100 Subject: [Thuban-commits] r2716 - in trunk/thuban: . libraries/thuban In-Reply-To: <20061106120013.A1DA218017E6@pyrosoma.intevation.org> References: <20061106120013.A1DA218017E6@pyrosoma.intevation.org> Message-ID: <200611061656.48397.bernhard@intevation.de> Hi Didrik, On Monday 06 November 2006 13:00, scm-commit at wald.intevation.org wrote: > Author: dpinte > Date: 2006-11-06 13:00:12 +0100 (Mon, 06 Nov 2006) > New Revision: 2716 > > Modified: > trunk/thuban/ChangeLog > trunk/thuban/libraries/thuban/wxproj.cpp > Log: > 2006-11-06 Didrik Pinte > > * libraries/thuban/wxproj.cpp: bugfix - allow compilation with > msvc++ toolkit 2003 thanks for fixing this. I have a suggestion for improvement: List the issue tickes that is closed by this. E.g. (closing [#206] wxproj.cpp call to sqrt method is buggy with msvc++ toolkit 2003) Bernhard -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20061106/6e2b3a76/attachment.bin From frank.koormann at intevation.de Tue Nov 7 15:27:40 2006 From: frank.koormann at intevation.de (Frank Koormann) Date: Tue, 7 Nov 2006 15:27:40 +0100 Subject: postgis tests on Debian Etch (5 errors 1 failure left) In-Reply-To: <200611061119.11526.bernhard@intevation.de> References: <200611061119.11526.bernhard@intevation.de> Message-ID: <200611071527.40550.frank.koormann@intevation.de> Am Montag 06 November 2006 11:19 schrieb Bernhard Reiter: > Got around to look at > [#173] postgis testcase not usable with recent debian systems > > Since Revision 2714 if you set the direct path to pg_ctl in > test/postgissupport.py you can run the tests. > (#173 still needs some work.) > > Now I get 5 Errors and one failure: > ====================================================================== > ProgrammingError: ERROR: column "oid" does not exist Modern PostgreSQL Systems (>=8.0) by default use OIDs only for system tables. Either create the tables for testing with an explict "WITH OIDS" or set "default_with_oids = on" in your cluster's postgresql.conf file. -- Frank Koormann Professional Service around Free Software (http://intevation.net/) FreeGIS Project (http://freegis.org/) From bernhard at intevation.de Thu Nov 9 11:25:11 2006 From: bernhard at intevation.de (Bernhard Reiter) Date: Thu, 9 Nov 2006 11:25:11 +0100 Subject: [Thuban-commits] r2714 - in trunk/thuban: . test In-Reply-To: References: <20061106100915.C624D18017E6@pyrosoma.intevation.org> Message-ID: <200611091125.14853.bernhard@intevation.de> On Monday 06 November 2006 11:29, Bernhard Herzog wrote: > > +_pg_ctl_command = "pg_ctl" > > +_initdb_command = "initdb" > > +# Example Values for Debian (upcomind Etch) postgresql-8.1 > > +# TODO: detect which values to use here. > > +#_pg_ctl_command = "/usr/lib/postgresql/8.1/bin/pg_ctl" > > +#_initdb_command = "/usr/lib/postgresql/8.1/bin/initdb" > > Wouldn't it be easier to simply add /usr/lib/postgresql/8.1/bin/ to PATH > when running the testsuite on etch? ?The testsuite could perhaps detect > that initdb or pg_ctl are not in PATH and then skip the tests. I like the idea, one drawback that came into my mind is that we need to find the corresponding lwpostgis.sql file. In the case of several installed postgresql and possibly postgis versions, we would need to find the corresponding one. Given those values on the command line misses some comfort. A command line would look like: E.g. python runtests.py --pgpath=/usr/lib/postgresql/8.1/bin/ --postgissql=/usr/share/postgresql-8.1-postgis/lwpostgis.sq Would work. Hmm I two possible ideas: a) add a configuration files for test b) additionally print out the parameters for the testrun in the results. This is also the place we could add the used seek, if we do pseudo random processes, like shuffling the tests. Bernhard -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20061109/93dce885/attachment.bin From thuban-bugs at wald.intevation.org Mon Nov 13 09:37:22 2006 From: thuban-bugs at wald.intevation.org (thuban-bugs@wald.intevation.org) Date: Mon, 13 Nov 2006 09:37:22 +0100 (CET) Subject: =?UTF-8?B?W3RodWJhbi1CdWdzXVsyMzNdIGVtcHR5IHNoYXBlZmlsZSBwcm9kdWNlcyBhbiBlcnJvcg==?= Message-ID: <20061113083722.0C35318017E6@pyrosoma.intevation.org> Bugs item #233, was opened at 2006-11-13 09:37 Status: Open Priority: 1 Submitted By: Didrik Pinte (dpinte) Assigned to: Nobody (None) Summary: empty shapefile produces an error Resolution: None Version: None Category: None Initial Comment: Opening an empty shapefile works fine, but when you try to move on the map, you get the following error : Traceback (most recent call last): File "/home/did/projets/python/thuban/current/thuban/Thuban/UI/view.py", line 202, in _do_redraw if self.render_iter.next(): File "/home/did/projets/python/thuban/current/thuban/Thuban/UI/view.py", line 251, in _render_iterator for cont in renderer.RenderMapIncrementally(): File "/home/did/projets/python/thuban/current/thuban/Thuban/UI/baserenderer.py ", line 191, in render_map_incrementally for i in self.draw_shape_layer_incrementally(layer): File "/home/did/projets/python/thuban/current/thuban/Thuban/UI/baserenderer.py ", line 257, in draw_shape_layer_incrementally for shape in self.layer_shapes(layer): File "/home/did/projets/python/thuban/current/thuban/Thuban/UI/renderer.py", l ine 320, in layer_shapes return layer.ShapesInRegion((left, bottom, right, top)) File "/home/did/projets/python/thuban/current/thuban/test/../Thuban/Model/laye r.py", line 244, in ShapesInRegion clipbbox = self.__mangle_bounding_box(bbox) File "/home/did/projets/python/thuban/current/thuban/test/../Thuban/Model/laye r.py", line 336, in __mangle_bounding_box lminx, lminy, lmaxx, lmaxy = self.LatLongBoundingBox() TypeError: unpack non-sequence I have to admit that it's not really smart to open empty shapefiles, but ... it happens sometimes ;-) ---------------------------------------------------------------------- You can respond by visiting: http://wald.intevation.org/tracker/?func=detail&atid=105&aid=233&group_id=6 From thubandevel at mendez.org.uk Sun Nov 19 11:24:12 2006 From: thubandevel at mendez.org.uk (George) Date: Sun, 19 Nov 2006 10:24:12 +0000 Subject: Starting an Extension on Startup Message-ID: <456030CC.8030301@mendez.org.uk> I'm writing an extension to Thuban, and what I want to be able to do is have the extension start working as soon as Thuban is loaded - similar to what I would have done with a startup script in Arcview 3. To do this I need a copy of the context object but there doesn't seem to be a way of getting this other than wait until it's passed as a result of the menu item being clicked. Am I correct in thinking this? Regards, George From bernhard at intevation.de Sun Nov 19 14:04:19 2006 From: bernhard at intevation.de (Bernhard Reiter) Date: Sun, 19 Nov 2006 14:04:19 +0100 Subject: os.path.exists() strangeness with pytest.py (Re: swig expert) In-Reply-To: <200610142315.42573.bernhard@intevation.de> References: <1159971504.22406.54.camel@geru-itae> <1160150783.3360.25.camel@geru-itae> <200610142315.42573.bernhard@intevation.de> Message-ID: <200611191404.20701.bernhard@intevation.de> So Didrik, any progress on your swig experiments? :) Bernhard On Saturday 14 October 2006 23:15, Bernhard Reiter wrote: > On Friday 06 October 2006 18:06, Didrik Pinte wrote: > > [2] The second problem is really strange : > > > > When calling the original libraries/pyshapelib/pytest.py, everything > > works fine BUT if you do the following, you get an error : > > > > Original code : > > -------------------------------------------------------------------- > > make_shapefile("testfile") > > read_shapefile("testfile") > > -------------------------------------------------------------------- > > > > Modified code causing the bug : > > -------------------------------------------------------------------- > > make_shapefile("testfile") > > import os > > os.path.exists("testfile.shp") > > read_shapefile("testfile") > > -------------------------------------------------------------------- -- Managing Director - Owner, www.intevation.net (Free Software Company) Germany Coordinator, fsfeurope.org (Non-Profit Org for Free Software) www.kolab-konsortium.com (Email/Groupware Solution, Professional Service) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20061119/884f8953/attachment.bin From bernhard at intevation.de Sun Nov 19 14:07:05 2006 From: bernhard at intevation.de (Bernhard Reiter) Date: Sun, 19 Nov 2006 14:07:05 +0100 Subject: Contributing code (was: Spatial selection Tools and Table Enhancements) In-Reply-To: <200610032253.09029.bernhard@intevation.de> References: <200610032253.09029.bernhard@intevation.de> Message-ID: <200611191407.07023.bernhard@intevation.de> Hi Barry, how is it going. Haven't heard from you in a while, I hope my feedback for your fine Thuban contributions has not been too repelling. While I am very slowly trying to get a new stable Thuban release out, which will the the first in a long time, I want your contributions in Thuban soon of course. Let me know what you are up to! Best Regards, Bernhard On Tuesday 03 October 2006 22:53, Bernhard Reiter wrote: > For the time being it would be fine to have a signed email > saying that you transfer the copyright (or exclusive exploitation rights) > of your Thuban contributions > to Intevation for the purpose that we publish it as Free Software. > Intevation will grant you a single usage right back so you can do > with the code whatever you like. -- Managing Director - Owner, www.intevation.net (Free Software Company) Germany Coordinator, fsfeurope.org (Non-Profit Org for Free Software) www.kolab-konsortium.com (Email/Groupware Solution, Professional Service) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20061119/b267dac6/attachment.bin From bernhard at intevation.de Mon Nov 20 16:39:13 2006 From: bernhard at intevation.de (Bernhard Reiter) Date: Mon, 20 Nov 2006 16:39:13 +0100 Subject: Starting an Extension on Startup In-Reply-To: <456030CC.8030301@mendez.org.uk> References: <456030CC.8030301@mendez.org.uk> Message-ID: <200611201639.17858.bernhard@intevation.de> On Sunday 19 November 2006 11:24, George wrote: > I'm writing an extension to Thuban, and what I want to be able to do is > have the extension start working as soon as Thuban is loaded - similar > to what I would have done with a startup script in Arcview 3. To do this > I need a copy of the context object but there doesn't seem to be a way > of getting this other than wait until it's passed as a result of the > menu item being clicked. > > Am I correct in thinking this? Currently an extension needs to be imported from ~/.thuban/thubanstart.py anyway. During this import __init__.py is executed where you can do as much as you want. Thuban in itself is event driven, so nothing happens unless the user does something (e.g. like click on a menu button or so). We discussed plans a while ago where extensions should just be loaded, if they are in a special path, because the importing from thubanstart.py is not the maximum of comforts. Right now this is not implemented. What do you want to archieve, maybe this makes it easier to give you some hints. :) Best, Bernhard -- Managing Director - Owner, www.intevation.net (Free Software Company) Germany Coordinator, fsfeurope.org (Non-Profit Org for Free Software) www.kolab-konsortium.com (Email/Groupware Solution, Professional Service) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20061120/45fbeb6a/attachment.bin From thubandevel at mendez.org.uk Mon Nov 20 22:52:26 2006 From: thubandevel at mendez.org.uk (George) Date: Mon, 20 Nov 2006 21:52:26 +0000 Subject: Starting an Extension on Startup In-Reply-To: <200611201639.17858.bernhard@intevation.de> References: <456030CC.8030301@mendez.org.uk> <200611201639.17858.bernhard@intevation.de> Message-ID: <4562239A.4060108@mendez.org.uk> Bernhard Reiter wrote: > What do you want to archieve, maybe this makes it easier to give > you some hints. :) What I'm hoping to achieve is that as soon as Thuban is opened a dialog box will be raised by the extension prompting the user to "login". The extension will then be used to do populate a database with information about existing features and (probably) do some digitisation. I understand that extensions get executed when they're imported and that I can initialise things in there however I'm not sure how I can start displaying dialogs unless I know what the parent window is, which would come from the context object which isn't present when the extension is imported? Regards, George From bernhard at intevation.de Tue Nov 21 09:11:19 2006 From: bernhard at intevation.de (Bernhard Reiter) Date: Tue, 21 Nov 2006 09:11:19 +0100 Subject: Starting an Extension on Startup In-Reply-To: <4562239A.4060108@mendez.org.uk> References: <456030CC.8030301@mendez.org.uk> <200611201639.17858.bernhard@intevation.de> <4562239A.4060108@mendez.org.uk> Message-ID: <200611210911.19915.bernhard@intevation.de> On Monday 20 November 2006 22:52, George wrote: > What I'm hoping to achieve is that as soon as Thuban is opened a dialog > box will be raised by the extension prompting the user to "login". With an event driven application like Thuban, are you sure that this is the right behaviour? I mean, what if the user this time wanted to do something else with Thuban, like open a simple shapefile or another Thuban session? A dialog box that always comes up might block other tasks. > The extension will then be used to do populate a database with information > about existing features and (probably) do some digitisation. > > I understand that extensions get executed when they're imported and that > I can initialise things in there however I'm not sure how I can start > displaying dialogs unless I know what the parent window is, which would > come from the context object which isn't present when the extension is > imported? If you require this, we could add a hook for extentions to get called at a place when the windows are open and before we go into the main event loop. Then your extension can hook in there and pop up a dialog. So where would you open a dialog box, if you could directly do it in Thuban's main code? :) Bernhard -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20061121/5c60f9dd/attachment.bin From bernhard at intevation.de Tue Nov 28 13:01:53 2006 From: bernhard at intevation.de (Bernhard Reiter) Date: Tue, 28 Nov 2006 13:01:53 +0100 Subject: 3D modifications to pyshapelib In-Reply-To: <1d5b08270611270554q2b3ea75ub55031e95b59026f@mail.gmail.com> References: <1d5b08270611270554q2b3ea75ub55031e95b59026f@mail.gmail.com> Message-ID: <200611281301.55154.bernhard@intevation.de> Hi Bram, On Monday 27 November 2006 14:54, Bram de Greve wrote: > Recently, we had to deal with shapefiles containing Z information, and > since pyshapelib doesn't really know how to deal with that (we're big fans > of Python and thus also of pyshapelib ;), I had to mod pyshapelib a bit. > As attachment, you will find the results. thanks in sending the patches. > As a side effect, I had to convert the SWIG stuff to 1.3.3, since I wasn't > unable to get 1.3.1.a5 working. It was my first encounter with SWIG, so > perhaps I did a terrible job, but it kind of works anyhow. > > If you're interested in incorporating any of the changes to the "main > branch" of pyshapelib, I'd be glad to see so =) Cool. As we currently maintain pyshapelib within the Thuban project, I have created an entry in our patch tracker for your contribution: https://wald.intevation.org/tracker/index.php?func=detail&aid=241&group_id=6&atid=107 Note that we already got another contribution for pyshapelib by Didrik Pinte: https://wald.intevation.org/tracker/index.php?func=detail&aid=191&group_id=6&atid=107 [#191] pyshapelib update to swig 1.3.29 and unicode support Best Regards, Bernhard -- Managing Director - Owner, www.intevation.net (Free Software Company) Germany Coordinator, fsfeurope.org (Non-Profit Org for Free Software) www.kolab-konsortium.com (Email/Groupware Solution, Professional Service) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20061128/ea77c71e/attachment.bin From dpinte at itae.be Tue Nov 28 13:19:06 2006 From: dpinte at itae.be (Didrik Pinte) Date: Tue, 28 Nov 2006 13:19:06 +0100 Subject: 3D modifications to pyshapelib In-Reply-To: <200611281301.55154.bernhard@intevation.de> References: <1d5b08270611270554q2b3ea75ub55031e95b59026f@mail.gmail.com> <200611281301.55154.bernhard@intevation.de> Message-ID: <1164716346.2413.4.camel@geru-itae> Le mardi 28 novembre 2006 ? 13:01 +0100, Bernhard Reiter a ?crit : > Hi Bram, > > On Monday 27 November 2006 14:54, Bram de Greve wrote: > > Recently, we had to deal with shapefiles containing Z information, and > > since pyshapelib doesn't really know how to deal with that (we're big fans > > of Python and thus also of pyshapelib ;), I had to mod pyshapelib a bit. > > As attachment, you will find the results. > > thanks in sending the patches. > > > As a side effect, I had to convert the SWIG stuff to 1.3.3, since I wasn't > > unable to get 1.3.1.a5 working. It was my first encounter with SWIG, so > > perhaps I did a terrible job, but it kind of works anyhow. > > > > If you're interested in incorporating any of the changes to the "main > > branch" of pyshapelib, I'd be glad to see so =) > > Cool. > As we currently maintain pyshapelib within the Thuban project, > I have created an entry in our patch tracker for your contribution: > https://wald.intevation.org/tracker/index.php?func=detail&aid=241&group_id=6&atid=107 > > Note that we already got another contribution for pyshapelib by > Didrik Pinte: > https://wald.intevation.org/tracker/index.php?func=detail&aid=191&group_id=6&atid=107 > [#191] pyshapelib update to swig 1.3.29 and unicode support Hi all, If Bram's version works, I guess it's better than my update that still does not pass the tests ... Didrik -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: Ceci est une partie de message =?ISO-8859-1?Q?num=E9riquement?= =?ISO-8859-1?Q?_sign=E9e?= Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20061128/a3a02950/attachment.bin From bernhard at intevation.de Wed Nov 29 10:25:03 2006 From: bernhard at intevation.de (Bernhard Reiter) Date: Wed, 29 Nov 2006 10:25:03 +0100 Subject: 3D modifications to pyshapelib In-Reply-To: <1d5b08270611280636o2a2c039axb5dba66e957411f9@mail.gmail.com> References: <1d5b08270611270554q2b3ea75ub55031e95b59026f@mail.gmail.com> <200611281301.55154.bernhard@intevation.de> <1d5b08270611280636o2a2c039axb5dba66e957411f9@mail.gmail.com> Message-ID: <200611291025.04289.bernhard@intevation.de> On Tuesday 28 November 2006 15:36, Bram de Greve wrote: > That's great! > I don't want to be pushing you, but any idea when pyshapelib 0.4 would be > released? =) I cannot say yet. Currently Thuban development is a bit slow. What we need to do is to integrate your patches and see if everything is fine with the funcationality we use and then make a release. In SVN there is already one improvement for locales with LC_NUMERIC decimal_comma != ".". If you want to help with any of these tasks, feel free to join as on the thuban-devel list. Best, Bernhard -- Managing Director - Owner, www.intevation.net (Free Software Company) Germany Coordinator, fsfeurope.org (Non-Profit Org for Free Software) www.kolab-konsortium.com (Email/Groupware Solution, Professional Service) -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 189 bytes Desc: not available Url : http://www.intevation.de/pipermail/thuban-devel/attachments/20061129/537a5462/attachment.bin From thuban-patches at wald.intevation.org Tue Nov 28 12:59:45 2006 From: thuban-patches at wald.intevation.org (thuban-patches@wald.intevation.org) Date: Tue, 28 Nov 2006 12:59:45 +0100 (CET) Subject: =?UTF-8?B?W3RodWJhbi1QYXRjaGVzXVsyNDFdIDNEIG1vZGlmaWNhdGlvbnMgdG8gcHlzaGFwZWxpYiBieSBCcmFtIGRlIEdyZXZl?= Message-ID: <20061128115945.83FA8180014D@pyrosoma.intevation.org> Patches item #241, was opened at 2006-11-28 12:59 Status: Open Priority: 2 Submitted By: Bernhard Reiter (bernhard) Assigned to: Nobody (None) Summary: 3D modifications to pyshapelib by Bram de Greve Version: None Category: None Initial Comment: Got an email by Bram: Recently, we had to deal with shapefiles containing Z information, and since pyshapelib doesn't really know how to deal with that (we're big fans of Python and thus also of pyshapelib ;), I had to mod pyshapelib a bit. As attachment, you will find the results. As a side effect, I had to convert the SWIG stuff to 1.3.3, since I wasn't unable to get 1.3.1.a5 working. It was my first encounter with SWIG, so perhaps I did a terrible job, but it kind of works anyhow. If you're interested in incorporating any of the changes to the "main branch" of pyshapelib, I'd be glad to see so =) ---------------------------------------------------------------------- You can respond by visiting: http://wald.intevation.org/tracker/?func=detail&atid=107&aid=241&group_id=6