<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="MSHTML 5.50.4522.1800" name=GENERATOR></HEAD>
<BODY
style="WORD-WRAP: break-word; webkit-nbsp-mode: space; webkit-line-break: after-white-space">
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff
size=2>John,</FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff size=2>I
created the plugin due to the lack of possibility to visualize PostGIS SQL
Queries with resultant tables containing geometry columns. In principle it
should have a similar behaviour like the PgAdmin3 SQL Editor. With the
difference that the new plugin creates a geographical view at the result too.
</FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff size=2>Mini
docmentation:</FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff size=2>1. You
have to define a PostGIS connection with the PostGIS
Connector</FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff size=2>2.
When you start the plugin for the first time, it will ask for a temp-path
because it has to store the resultant shape files into a directory. For further
sessions this directory will be used until you change it with the ...
button</FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff size=2>3.
select the former defined PostGIS connectin</FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff size=2>4.
Under the assumption you have a PostGIS Table called example with one
geometry-column you can use the plugin to execute the following
query:</FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff
size=2>select * from example </FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff size=2>when
you hit the execute button or alternatively F5 the query is executed and it
produces a shape-file with the query result. But my simple example doesn't make
much sense. The use of the plugin makes sense when you develop complex queries
with joins, aggregations, filter, functions etc. In this case you are able to
develop your query and to view the result directly and very easy. I think it is
very helpful.</FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009>>Also, the plugin asks for a temporary
directory to store files in, but it seems that you need a permanent directory to
work from. This is where I am confused. Is this meant to perform queries on
>existing postgis tables, or is it meant to query a shapefile and then load
it into postgis? If the former, how does it improve on adding a postgis layer
and performing the query there? </SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009>In many cases when you develop spatial
queries it is helpful to see the result directly. Thus you have to save the
query-result temporarily many times until you have finished the development
process. Than you can take your query and make a view from it into the database,
which you can load directly from PostGIS via Postgres connector of course. The
idea is to have a developement tool it is not the idea to create persistent
queries. If you like to save your temporary query result to a non temporary
place, please use the QGIS save as shapefile command.</SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff size=2>I hope
that the intension and the use of the plugin will be a little more
precised.</FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff
size=2></FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff
size=2>Regrads</FONT></SPAN>
</DIV>
<DIV><SPAN class=484240220-12032009><FONT face=Arial color=#0000ff
size=2>Horst</FONT></SPAN>
</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>
</DIV>
<P>
<FONT face=Arial color=#000000
size=2>------------------------------------------------</FONT>
</P>
<P><FONT face=Arial color=#000000 size=2>Dr. Horst Düster</FONT> <BR>
<FONT
face=Arial color=#000000 size=2>Stv. Amtschef / GIS-Koordinator </FONT>
</P>
<P><FONT face=Arial color=#000000 size=2>Kanton Solothurn</FONT> <BR>
<FONT
face=Arial color=#000000 size=2>Bau- und Justizdepartement</FONT> <BR>
<FONT
face=Arial color=#000000 size=2>Amt für Geoinformation</FONT> <BR>
<FONT
face=Arial color=#000000 size=2>SO!GIS Koordination</FONT> <BR>
<FONT face=Arial
color=#000000 size=2>Rötistrasse 4</FONT> <BR>
<FONT face=Arial color=#000000
size=2>CH-4501 Solothurn</FONT>
</P>
<P><FONT face=Arial color=#000000 size=2>Telefon ++41(0)32 627 25 32</FONT>
<BR>
<FONT face=Arial color=#000000 size=2>Telefax ++41(0)32 627 22 14</FONT>
</P>
<P><FONT face=Arial color=#000000 size=2><A target=_blank
href="mailto:horst.duester@bd.so.ch">mailto:horst.duester@bd.so.ch</A></FONT>
<BR>
<FONT face=Arial color=#000000 size=2><A target=_blank
href="http://www.agi.so.ch/">http://www.agi.so.ch</A></FONT>
</P>
<DIV><FONT face=Arial color=#0000ff size=2></FONT>
</DIV>
<BLOCKQUOTE dir=ltr style="MARGIN-RIGHT: 0px">
<DIV><FONT face="Times New Roman" size=2>-----Ursprüngliche
Nachricht-----<BR>
<B>Von:</B> John C. Tull
[mailto:john.tull@wildnevada.org]<BR>
<B>Gesendet am:</B> Donnerstag, 12. März
2009 17:47<BR>
<B>An:</B> Düster Horst<BR>
<B>Cc:</B>
qgis-user<BR>
<B>Betreff:</B> Re: [Qgis-user] New PostGIS SQL Query Editor
Plugin<BR>
</DIV></FONT>
<P>
Düster,
<DIV><BR>
</DIV>
<DIV>Do you have any documentation on how to use this? I gave it a go this
morning, but a simple query statement did not work. What would be a snippet
that would work in the query editor given that one has a table called
"example" in a database called postgis with public schema on a local
server?
</DIV>
<DIV><FONT face=Arial color=#0000ff size=2></FONT><BR>
</DIV>
<DIV>Also, the plugin asks for a temporary directory to store files in, but it
seems that you need a permanent directory to work from. This is where I am
confused. Is this meant to perform queries on existing postgis tables, or is
it meant to query a shapefile and then load it into postgis? If the former,
how does it improve on adding a postgis layer and performing the query
there?
</DIV>
<DIV><BR>
</DIV>
<DIV>Cheers,
</DIV>
<DIV>John
</DIV>
<DIV><BR>
<DIV>
<DIV>On Mar 12, 2009, at 1:36 AM, Düster Horst wrote:
</DIV><BR
class=Apple-interchange-newline>
<BLOCKQUOTE type="cite">
<SPAN class=Apple-style-span
style="WORD-SPACING: 0px; FONT: 14px Arial; TEXT-TRANSFORM: none; COLOR: rgb(0,0,0); TEXT-INDENT: 0px; WHITE-SPACE: normal; LETTER-SPACING: normal; BORDER-COLLAPSE: separate; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 0px; webkit-border-vertical-spacing: 0px; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0px">
<DIV>
<DIV class=Normal
style="MARGIN-TOP: 0pt; FONT-SIZE: 12pt; MARGIN-BOTTOM: 0pt; TEXT-INDENT: 0pt; FONT-FAMILY: Arial; TEXT-ALIGN: left"><SPAN
style="FONT-SIZE: 10pt">I just uploaded the new PostGIS SQL Query Editor
Plugin to the QGIS User-Contributed Python Plugin Repository. The aim of the
plugin is to edit and perform any spatial PostGIS query from an editor
environment. After successful execution of a query the result will be loaded
from shape file to MapCanvas. The plugin works provided that pgsql2shp is
installed and the path to pgsql2shp is defined in the system PATH
environment.</SPAN>
</DIV><BR>
<DIV class=Normal
style="MARGIN-TOP: 0pt; FONT-SIZE: 12pt; MARGIN-BOTTOM: 0pt; TEXT-INDENT: 0pt; FONT-FAMILY: Arial; TEXT-ALIGN: left"><SPAN
style="FONT-SIZE: 10pt">I hope that the plugin will be helpful for you. I'm
looking forward for any comment.</SPAN>
</DIV><BR>
<DIV class=Normal
style="MARGIN-TOP: 0pt; FONT-SIZE: 12pt; MARGIN-BOTTOM: 0pt; TEXT-INDENT: 0pt; FONT-FAMILY: Arial; TEXT-ALIGN: left"><SPAN
style="FONT-SIZE: 10pt">Regards</SPAN>
</DIV><BR>
<DIV class=Normal
style="MARGIN-TOP: 0pt; FONT-SIZE: 12pt; MARGIN-BOTTOM: 0pt; TEXT-INDENT: 0pt; FONT-FAMILY: Arial; TEXT-ALIGN: left"><SPAN
style="FONT-SIZE: 10pt">Dr. Horst Düster</SPAN><BR>
<SPAN
style="FONT-SIZE: 10pt">Stv. Amtschef / GIS-Koordinator</SPAN>
</DIV><BR>
<DIV class=Normal
style="MARGIN-TOP: 0pt; FONT-SIZE: 12pt; MARGIN-BOTTOM: 0pt; TEXT-INDENT: 0pt; FONT-FAMILY: Arial; TEXT-ALIGN: left"><SPAN
style="FONT-SIZE: 10pt">Kanton Solothurn</SPAN><BR>
<SPAN
style="FONT-SIZE: 10pt">Bau- und Justizdepartement</SPAN><BR>
<SPAN
style="FONT-SIZE: 10pt">Amt für Geoinformation</SPAN><BR>
<SPAN
style="FONT-SIZE: 10pt">SO!GIS Koordination</SPAN><BR>
<SPAN
style="FONT-SIZE: 10pt">Rötistrasse 4</SPAN><BR>
<SPAN
style="FONT-SIZE: 10pt">CH-4501 Solothurn</SPAN>
</DIV><BR>
<DIV class=Normal
style="MARGIN-TOP: 0pt; FONT-SIZE: 12pt; MARGIN-BOTTOM: 0pt; TEXT-INDENT: 0pt; FONT-FAMILY: Arial; TEXT-ALIGN: left"><SPAN
style="FONT-SIZE: 10pt">Telefon ++41(0)32 627 25 32</SPAN><BR>
<SPAN
style="FONT-SIZE: 10pt">Telefax ++41(0)32 627 22 14</SPAN>
</DIV><BR>
<DIV class=Normal
style="MARGIN-TOP: 0pt; FONT-SIZE: 12pt; MARGIN-BOTTOM: 0pt; TEXT-INDENT: 0pt; FONT-FAMILY: Arial; TEXT-ALIGN: left"><SPAN
style="FONT-SIZE: 10pt"><A
href="mailto:horst.duester@bd.so.ch">mailto:horst.duester@bd.so.ch</A></SPAN><BR>
<SPAN
style="FONT-SIZE: 10pt"><A
href="http://www.agi.so.ch">http://www.agi.so.ch</A></SPAN>
</DIV><BR>
_______________________________________________<BR>
Qgis-user
mailing list<BR>
<A
href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</A><BR>
<A
href="http://lists.osgeo.org/mailman/listinfo/qgis-user">http://lists.osgeo.org/mailman/listinfo/qgis-user</A><BR>
</DIV></SPAN></BLOCKQUOTE>
</DIV><BR>
</DIV>
<P>
</P></BLOCKQUOTE></BODY></HTML>