<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META content="text/html; charset=us-ascii" http-equiv=Content-Type>
<META name=GENERATOR content="MSHTML 8.00.7600.16700"></HEAD>
<BODY>
<DIV dir=ltr align=left><SPAN class=009271618-08022011><FONT color=#0000ff
size=2 face=Arial>John, </FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=009271618-08022011><FONT color=#0000ff
size=2 face=Arial>We like using OpenJump for that -- here is a quick tutorial we
wrote up on doing Ad hoc queries with it.</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=009271618-08022011><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=009271618-08022011><FONT color=#0000ff
size=2 face=Arial><A
href="http://www.postgresonline.com/journal/index.php?/archives/72-OpenJump-for-PostGIS-Spatial-Ad-Hoc-Queries.html">http://www.postgresonline.com/journal/index.php?/archives/72-OpenJump-for-PostGIS-Spatial-Ad-Hoc-Queries.html</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=009271618-08022011><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=009271618-08022011><FONT color=#0000ff
size=2 face=Arial>It works fine with PostgreSQL 9.0, but if you are using 9.0 --
you need to download the latest JDBC drivers or set your bytea_output to escape
- both are documented in the FAQ</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=009271618-08022011><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=009271618-08022011><FONT color=#0000ff
size=2 face=Arial><A
href="http://www.postgis.org/documentation/manual-svn/PostGIS_FAQ.html#id2686352">http://www.postgis.org/documentation/manual-svn/PostGIS_FAQ.html#id2686352</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=009271618-08022011><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV>
<DIV dir=ltr align=left><SPAN class=009271618-08022011><FONT color=#0000ff
size=2 face=Arial>Leo</FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=009271618-08022011><FONT color=#0000ff
size=2 face=Arial><A
href="http://www.postgis.us">http://www.postgis.us</A></FONT></SPAN></DIV>
<DIV dir=ltr align=left><SPAN class=009271618-08022011><FONT color=#0000ff
size=2 face=Arial></FONT></SPAN> </DIV><FONT color=#0000ff size=2
face=Arial></FONT><BR>
<DIV dir=ltr lang=en-us class=OutlookMessageHeader align=left>
<HR tabIndex=-1>
<FONT size=2 face=Tahoma><B>From:</B>
postgis-users-bounces@postgis.refractions.net
[mailto:postgis-users-bounces@postgis.refractions.net] <B>On Behalf Of </B>John
Callahan<BR><B>Sent:</B> Tuesday, February 08, 2011 12:25 PM<BR><B>To:</B>
PostGIS Users Discussion<BR><B>Subject:</B> [postgis-users] postgis visual
client<BR></FONT><BR></DIV>
<DIV></DIV>I'm sure this has been asked many times but haven't found a
definitive or consensus answer...<BR><BR>Is there a postgis client that supports
spatial, ad hoc queries and returns those results to a map? This would
include simple (and more complex) SELECT statements but also other queries with
spatial results, such as finding nearest neighbors, intersect, union,
etc...<BR><BR>The best idea I found was to create a view from the ad hoc query
and then use a desktop GIS to display that view. You'd need to update the
view (and refresh the GIS screen) to run a new query. I know QGIS
(and other FOSS GIS packages) allows you to create a definition query (a where
clause to subset the layer) and does support database views. I haven't
seen a place where QGIS supports ad hoc queries. Searching the web, I did
find references to some work done using OpenMap libraries back in 2004, and the
mezoGIS package from around 2005/2006. <BR><BR>Does anyone know of a GUI
tool to use, hopefully one that works for Postgres 9 and PostGIS 2?
Thanks.<BR><BR>- John<BR><BR>PS - Thanks for the recommendations on the PostGIS
in Action book. I just purchased it and looking forward to learning what I
can.<BR><BR clear=all>**************************************************<BR>John
Callahan, Research Scientist<BR>Delaware Geological Survey, University of
Delaware<BR>URL: <A href="http://www.dgs.udel.edu"
target=_blank>http://www.dgs.udel.edu</A><BR>**************************************************<BR></BODY></HTML>