Re: [Qgis-user] Python Geoprocessing Plugin

2008-03-21 Thread Paolo Cavallini
Dr. Horst Düster ha scritto:

> mmm at the moment there is no documentation avaliable. What kind of
> documentation do you expect? Explanation of the different functions or
> documentation of the plugin code itself?

I think this plugin should become part of the core: too useful to miss
it! As such, its functioning should be documented in the main manual.

> I don't understand the intension of your question. Do you mean to get a
> PostGIS Layer, make an analysis like buffer  and than to store back the
> result to DB? This approach assumes write access to DB, login methods to
> DB etc. I believe that the best way is to store the geoprocessing
> results to your file system. You are free to use the SPIT plugin to
> transfer the stored results to your DB.

I think storing results on the file system is very good for many users,
but serious postgis users would prefer to run the analyses directly in
the db. We're thinking about something like:

Dialog1: Choose the name of the table(s) to run the analysis on
[list of PostGIS layers loaded into QGIS]
and the analysis to be run (buffer etc.)

Dialog2: Choose whether you want to create:
1. visualization only
2. a view
3. a table

if 1 then

select [all the fields from table_name, minus the
$geographic_field], st_buffer ([$geographic_field], [buffer_width])
from [table_name];

if 2 then

create view [table_name_buffer as a default] as select [all the fields
from table_name, minus the $geographic_field], st_buffer
([$geographic_field], [buffer_width]) from [table_name];
insert into geometry_columns values('', '[schema, as a default the
working one'], '[table_name_buffer]', 'st_buffer', 2, [srid from
original table], 'POLYGON');

if 3 then

create table [table_name_buffer as a default] as select [all the fields
from table_name, minus the $geographic_field] from [table_name];
select addgeometrycolumn('[schema, as a default the working one'],
'[able_name_buffer]', 'st_buffer', [srid from original table],
'POLYGON', 2);
update [table_name_buffer] set
st_buffer=st_buffer([$geographic_field], [buffer_width]);

In principle this should be reasonably simple, as it is only a matter of
passing the commands+credentials to the db (see eg the "New PostGIS
layer" plugin for an example).

I'm not saying *you* should code this, just that *if* someone is willing
to, he would better do it inside your plugin rather than a separate one.
In case someone needs help with SQL commands, we're available.
All the best, and thanks for your work!
pc
-- 
Paolo Cavallini, see: http://www.faunalia.it/pc
Noi ci troviamo male con NGI http://www.ngi.it/
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


Re: [Qgis-user] Python Geoprocessing Plugin

2008-03-20 Thread Paolo Cavallini
Düster Horst ha scritto:
> I've just published a new Rev. of the python geoprocessing plugin to fix
> the translation problem. I tested QGIS and Plugin based on QT4.3.4 and
> now translation works fine for me. QGIS hangs after canceling

Hi Horst.
I'm testing your plugin, and I'm enjoying a lot.
Is there some documentation available?
It would be very good to integrate in the same plugin an engine to pass
spatial queries of the same type to the database. Conceptually it is a
rather different beast, but I believe it would be preferable to have the
same interface, with an option "save on the db".
All the best.
pc
-- 
Paolo Cavallini, see: http://www.faunalia.it/pc
Noi ci troviamo male con NGI http://www.ngi.it/
___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user


[Qgis-user] Python Geoprocessing Plugin

2008-03-18 Thread Düster Horst
I've just published a new Rev. of the python geoprocessing plugin to fix
the translation problem. I tested QGIS and Plugin based on QT4.3.4 and
now translation works fine for me. QGIS hangs after canceling
fileDialogs when it was compiled  with QT-4.3.3. After upgrade to
QT-4.3.4 the translation and the fileDialog works correct for me. As a
workaround I added a QT Version check to decide weather translation will
be enabled or not. For QT > 4.3.3 translation is enabled. I would
appreciate when you can test the plugin against your QT installation.

Regards
Horst



Dr. Horst Düster
GIS-Koordinator, Stv. Amtschef

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
Telefax ++41(0)32 627 22 14

mailto:[EMAIL PROTECTED]
http://www.agi.so.ch


___
Qgis-user mailing list
Qgis-user@lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/qgis-user