[postgis-users] Announcement: PostGIS Versioning System pgversion and QGIS Plugin

92 views
Skip to first unread message

Düster Horst

unread,
Nov 8, 2010, 2:43:28 AM11/8/10
to postgis-users

I just finished the first beta version of my newly released pgvs support system. The idea of this system is to enable the editing of a single PostGIS layer concurrently by more than one user at the same time, similar to source code versioning systems like CVS or Subversion. You will find further informations at:

http://www.kappasys.org/cms/index.php?id=23&L=5

You can download the PostGIS functions from:

http://www.kappasys.ch/pgtools/pgversion/createFunctions.sql

To get easy access to pgvs I additionally created the QGIS plugin pgversion which you can download from:

http://www.kappasys.org/qgis/plugins.xml

I know that not all features of a SVN like system are implemented yet. But I would like to get your comments and ideas for further developements.

I hope that pgvs can make your life easier.

Regards

Horst

------------------------------------------------

Dr. Horst Düster
Stv. Amtschef / kantonaler GIS-Koordinator

Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
SO!GIS Koordination
Rötistrasse 4
CH-4501 Solothurn

Telefon ++41(0)32 627 25 32
Mobil   ++41(0)79 511 54 12
Telefax ++41(0)32 627 22 14

mailto:horst....@bd.so.ch
http://www.agi.so.ch

 

Javier de la Torre

unread,
Nov 8, 2010, 3:08:06 AM11/8/10
to PostGIS Users Discussion
Hi,

Thats great. Congratulations. 

One question. If I understand correctly you are using the DB users for the versioning. How easy would be to use external users from, for example a web system? We normally do not use the users on PostgreSQL for the data content. Are you planning something on this direction?

Thanks.

Javier



_______________________________________________
postgis-users mailing list
postgi...@postgis.refractions.net
http://postgis.refractions.net/mailman/listinfo/postgis-users

maning sambale

unread,
Nov 8, 2010, 4:09:44 AM11/8/10
to PostGIS Users Discussion
Nice! What version of QGIS does it use. I added your repoe, but I
can't find the plugin in my 1.4 version

--
cheers,
maning
------------------------------------------------------
"Freedom is still the most radical idea of all" -N.Branden
wiki: http://esambale.wikispaces.com/
blog: http://epsg4253.wordpress.com/
------------------------------------------------------

Düster Horst

unread,
Nov 8, 2010, 4:21:58 AM11/8/10
to emmanuel.sambale, postgis-users
The plugin is marked as experimental and I had set the qgis minimum version to 1.5 due to I tested the plugin with 1.5. I changed the minimum version 1.4. Please try it and give me a responce whether it works.

Regards
Horst

------------------------------------------------

Dr. Horst Düster
Stv. Amtschef / kantonaler GIS-Koordinator

Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
SO!GIS Koordination
Rötistrasse 4
CH-4501 Solothurn

Telefon ++41(0)32 627 25 32
Mobil ++41(0)79 511 54 12
Telefax ++41(0)32 627 22 14


-----Ursprüngliche Nachricht-----
Von: maning sambale [mailto:emmanuel...@gmail.com]
Gesendet am: Montag, 8. November 2010 10:10
An: PostGIS Users Discussion
Betreff: Re: [postgis-users] Announcement: PostGIS Versioning System
pgversion and QGIS Plugin

maning sambale

unread,
Nov 8, 2010, 4:57:44 AM11/8/10
to Düster Horst, postgis-users
On QGIS 1.4 (mac), I overridden the 1.5 warning and continued with the
install. Plugin manager didn't activate it.
On qgis 1.5.0 (ubuntu):
I had to install qtsql. Then the plugin was activated. Tested with
my test postgis data, I got this error when I used "Prepare layer for
versioning":

An error has occured while executing Python code:

Traceback (most recent call last):
File "/home/maning/.qgis/python/plugins/pgversion/pgVersion.py",
line 170, in doInit
if not self.tools.versionExists(mySchema, myTable):
File "/home/maning/.qgis/python/plugins/pgversion/pgVersionTools.py",
line 107, in versionExists
if len(result["SCHEMA"]) 0:
KeyError: 'SCHEMA'

Python version:
2.6.5 (r265:79063, Apr 16 2010, 13:28:26)
[GCC 4.4.3]


QGIS version:
1.5.0-Tethys Tethys, exported

Python path: ['/usr/share/qgis/python', '/home/maning/.qgis/python',
'/home/maning/.qgis/python/plugins', '/usr/share/qgis/python/plugins',
'/usr/local/lib/python2.6/dist-packages/Sphinx-0.6.5-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/docutils-0.6-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/Jinja2-2.4.1-py2.6.egg',
'/usr/local/lib/python2.6/dist-packages/Pygments-1.3.1-py2.6.egg',
'/usr/lib/python2.6', '/usr/lib/python2.6/plat-linux2',
'/usr/lib/python2.6/lib-tk', '/usr/lib/python2.6/lib-old',
'/usr/lib/python2.6/lib-dynload', '/usr/lib/python2.6/dist-packages',
'/usr/lib/python2.6/dist-packages/PIL',
'/usr/lib/python2.6/dist-packages/gst-0.10',
'/usr/lib/pymodules/python2.6',
'/usr/lib/python2.6/dist-packages/gtk-2.0',
'/usr/lib/pymodules/python2.6/gtk-2.0',
'/usr/lib/python2.6/dist-packages/wx-2.8-gtk2-unicode',
'/usr/local/lib/python2.6/dist-packages',
u'/home/maning/.qgis//python/plugins',
'/usr/share/qgis/python/plugins/fTools/tools']

Düster Horst

unread,
Nov 8, 2010, 6:02:42 AM11/8/10
to emmanuel.sambale, postgis-users
Did you install pgvs in your postgres db?

------------------------------------------------

Dr. Horst Düster
Stv. Amtschef / kantonaler GIS-Koordinator

Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
SO!GIS Koordination
Rötistrasse 4
CH-4501 Solothurn

Telefon ++41(0)32 627 25 32
Mobil ++41(0)79 511 54 12
Telefax ++41(0)32 627 22 14


-----Ursprüngliche Nachricht-----
Von: maning sambale [mailto:emmanuel...@gmail.com]
Gesendet am: Montag, 8. November 2010 10:58
An: Düster Horst
Cc: postgis-users
Betreff: Re: Re: [postgis-users] Announcement: PostGIS Versioning System
pgversion and QGIS Plugin

Düster Horst

unread,
Nov 8, 2010, 6:13:04 AM11/8/10
to emmanuel.sambale, postgis-users
I made an update to handle a non existing pgvs in the layers source db. Please reinstall the plugin and try again.

------------------------------------------------

Dr. Horst Düster
Stv. Amtschef / kantonaler GIS-Koordinator

Kanton Solothurn
Bau- und Justizdepartement
Amt für Geoinformation
SO!GIS Koordination
Rötistrasse 4
CH-4501 Solothurn

Telefon ++41(0)32 627 25 32
Mobil ++41(0)79 511 54 12
Telefax ++41(0)32 627 22 14


-----Ursprüngliche Nachricht-----
Von: emmanuel...@gmail.com [mailto:emmanuel...@gmail.com]

maning sambale

unread,
Nov 8, 2010, 6:37:03 AM11/8/10
to Düster Horst, postgis-users
Sweet! It's working on qgis 1.5 (ubuntu). Will be watching this
plugin. Thanks!

maning sambale

unread,
Jul 18, 2011, 5:11:59 AM7/18/11
to Düster Horst, postgis-users
I have created a new database for the pg_versioning. I created pgvs
functions and got this error:

$ psql -d philippines -U **** -h **** -f createFunctions.sql

CREATE SCHEMA
CREATE TYPE
GRANT
psql:createFunctions.sql.1:32: NOTICE: CREATE TABLE will create
implicit sequence "version_tables_version_table_id_seq" for serial
column "version_tables.version_table_id"
psql:createFunctions.sql.1:32: NOTICE: CREATE TABLE / PRIMARY KEY
will create implicit index "version_table_pkey" for table
"version_tables"
CREATE TABLE
GRANT
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
CREATE FUNCTION
psql:createFunctions.sql.1:920: NOTICE: function
versions.pgvsreverse(pg_catalog.varchar) does not exist, skipping
DROP FUNCTION
CREATE FUNCTION

The pgadminIII showed the added versions schema but I can't use it in qgis 1.7.

Horst Düster

unread,
Jul 18, 2011, 7:01:45 AM7/18/11
to postgi...@postgis.refractions.net
Hi maning sambale

> CREATE FUNCTION
> psql:createFunctions.sql.1:920: NOTICE: function
> versions.pgvsreverse(pg_catalog.varchar) does not exist, skipping
> DROP FUNCTION
> CREATE FUNCTION
>

You didnt get an error its only a notice. Dont worry.

> The pgadminIII showed the added versions schema but I can't use it in qgis 1.7.

What do you mean with I can't use it in qgis 1.7? Please explain your
problem more precise..

Regrads
Horst

--

Dr. Horst Düster
Burchacker 6
CH-4556 Aeschi

Tel.: +41(0)62 961 03 74
Mobil: +41(0)76 408 51 06
E-Mail: horst....@kappasys.ch
Skype: horstduester
Web: http://www.kappasys.ch


horst_duester.vcf

maning sambale

unread,
Jul 18, 2011, 7:36:00 AM7/18/11
to PostGIS Users Discussion
>> The pgadminIII showed the added versions schema but I can't use it in qgis
>> 1.7.
>
> What do you mean with I can't use it in qgis 1.7? Please explain your
> problem more precise..
On QGIS 1.7, I can load the postgis layer but using the PG_version
Plugin: Database > PG Version > Prepare Layer for Versioning, I get
the following messages:

Fehlermeldung:' Driver not loaded.' Es kann keine Verbindung zur
Datenbank aufgebaut werden! Einige Funktionen des PlugIn doInit
funktionieren deshalb nicht!

Followed by:

Please upgrade the DB-functions from the file:

<Plugin-Directory>/pgversion/tools/updateFunctions.sql

If you have appropriate DB permissions you can update the DB directly
with click on DB-Update.

Driver not loaded Driver not loaded


I tried to manually update the updateFunctions.sql using psql but I
also get errors.

>
> Dr. Horst Düster
> Burchacker 6
> CH-4556 Aeschi
>
> Tel.: +41(0)62 961 03 74
> Mobil: +41(0)76 408 51 06
> E-Mail: horst....@kappasys.ch
> Skype: horstduester
> Web: http://www.kappasys.ch
>
>
>

Horst Düster

unread,
Jul 18, 2011, 7:40:54 AM7/18/11
to postgi...@postgis.refractions.net
you have to install some additional python and qt stuff with:

sudo apt-get install libqt4-sql libqt4-sql-psql python-qt4-sql

Regards
Horst

Am 18.07.2011 13:36, schrieb maning sambale:
> Fehlermeldung:' Driver not loaded.' Es kann keine Verbindung zur
> Datenbank aufgebaut werden! Einige Funktionen des PlugIn doInit
> funktionieren deshalb nicht!

--

horst_duester.vcf

maning sambale

unread,
Jul 18, 2011, 7:45:51 AM7/18/11
to PostGIS Users Discussion
I assume this is on the qgis install (I'm using mac) and not on the
remote postgis server? What about the errors on the postgis version
table creation?

2011/7/18 Horst Düster <horst....@kappasys.ch>:


> sudo apt-get install libqt4-sql libqt4-sql-psql python-qt4-sql

--

Horst Düster

unread,
Jul 18, 2011, 7:53:45 AM7/18/11
to postgi...@postgis.refractions.net

Am 18.07.2011 13:45, schrieb maning sambale:
> What about the errors on the postgis version
> table creation?

This is not an error only a notice, that the function which should be
dropped doesnt exists and the drop action is skipped. Everything should
be fine.

Regards
Horst

horst_duester.vcf

maning sambale

unread,
Jul 18, 2011, 7:56:22 AM7/18/11
to PostGIS Users Discussion
Thanks horst! I just tested using ubuntu and it works just fine. Are
there "binaries" of libqt4-sql libqt4-sql-psql python-qt4-sql in mac?

Horst Düster

unread,
Jul 18, 2011, 7:59:16 AM7/18/11
to postgi...@postgis.refractions.net
Mmmm.... I never worked with Mac. You should ask a Mac-user

Horst

horst_duester.vcf
Reply all
Reply to author
Forward
0 new messages