Simon, for what you describe you just need PostGIS, nothing else. It comes with a utility called pgAdmin that lets you type SQL statements and display the results in a spreadsheet-like format (among other things).<div><br>
</div><div>If you do the standard PostGIS windows install from <a href="http://postgis.refractions.net/download/windows/">http://postgis.refractions.net/download/windows/</a> I think it should include pgAdmin, though I'm not 100% sure as I run on Mac. It's been a while since I installed PostGIS, but I used the packaged install from enterprisedb at <a href="http://www.enterprisedb.com/products/download.do">http://www.enterprisedb.com/products/download.do</a> (this is for PostGreSQL but it includes PostGIS). At that time the standard Mac installation was a little more work, but the enterprisedb install was a one click deal (I was amazed how easy it was!). There are a few different options for packaged installers - another is OpenGeo <a href="http://opengeo.org/products/suite/download/">http://opengeo.org/products/suite/download/</a> which includes more than just PostGIS.</div>
<div><br></div><div>I'd look at the basic PostGIS installation first and if you hit issues with that look at the enterprisedb or opengeo installers. </div><div><br></div><div>Others may be able to give you more specific suggestions for installing on Windows.</div>
<div><br></div><div>Cheers,</div><div>    Peter.</div><div><br><br><div class="gmail_quote">On Thu, Dec 3, 2009 at 4:42 PM, Simon Cropper (Botanicus Australia Pty Ltd) <span dir="ltr"><<a href="mailto:scropper@botanicusaustralia.com.au">scropper@botanicusaustralia.com.au</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">


  

<div bgcolor="#ffffff" text="#000000">
Peter & others,<br>
<br>
With PostGIS what is the best option for installation to trial this
option. Where would you enter the SQL query?<br>
<br>
If you go to the PostGIS page it pushes you to UDig. Does UDig have the
functionality to send SQL statements to the database? Does PostGIS
install if I install UDig or should I install in a set sequence, a bit
like Giovanni suggested for Grass.<br>
<br>
Dumb question - "Is PostGIS-UDig" setup to operate as a desktop type
system? Everytime I looked at UDig I got the impression it used web
resources and was geared to enterprise solutions to multiple users to a
online-resource repository.<br>
<br>
Alternatively is anyone aware whether gvSIG can query the database in
this way with beantools or Jython? If so, how? I know gvSIG can connect
to PostGIS?<div class="im"><br>
<div>
<p>Cheers Simon</p>
<p style="margin-left:36pt">
Simon Cropper <br>
Botanicus Australia Pty Ltd<br>
PO Box 160, Sunshine, Victoria 3020.<br>
P: 9311 5822. M: 041 830 3437.<br>
<a href="mailto:scropper@botanicusaustralia.com.au" target="_blank">mailto:
scropper@botanicusaustralia.com.au</a> <br>
<a href="http://www.botanicusaustralia.com.au" target="_blank">web:
www.botanicusaustralia.com.au</a> <br>
</p>
</div>
<br>
<br></div>
Peter Batty wrote:
<blockquote type="cite"><div><div></div><div class="h5">Simon, you could do this as a PostGIS query. To take the
polygon case, if you loaded the data into a table in PostGIS called
parcel (say), you could run a query something like the following (not
guaranteeing this is exactly correct but something along these lines):
  <div><br>
  </div>
  <div>select <a href="http://a.id" target="_blank">a.id</a>, <a href="http://b.id" target="_blank">b.id</a>, </div>
  <div>ST_distance(a.geom, b.geom), </div>
  <div>ST_distance(ST_centroid(a.geom), ST_centroid(b.geom)),</div>
  <div>ST_azimuth(ST_centroid(a.geom), ST_centroid(b.geom))</div>
  <div>from parcel a, parcel b<br>
  <br>
  </div>
  <div>This would give you ids, shortest distance, distance between
centroids and angle between centroids. There are no doubt others here
who can correct my SQL syntax :) !</div>
  <div><br>
  </div>
  <div>There is a simple utility to load a shape file into PostGIS.</div>
  <div><br>
  </div>
  <div>Cheers,</div>
  <div>    Peter.</div>
  <div><br>
  <div class="gmail_quote">On Thu, Dec 3, 2009 at 3:49 PM, Simon
Cropper (Botanicus Australia Pty Ltd) <span dir="ltr"><<a href="mailto:scropper@botanicusaustralia.com.au" target="_blank">scropper@botanicusaustralia.com.au</a>></span>
wrote:<br>
  <blockquote class="gmail_quote" style="border-left:1px solid rgb(204, 204, 204);margin:0pt 0pt 0pt 0.8ex;padding-left:1ex">
    <div bgcolor="#ffffff" text="#000000">Hi Everyone,<br>
    <br>
My name is Simon and I am an environmental consultant. I use a variety
of open source GIS systems and tools almost every day to analyse flora,
fauna and vegetation data. I am interested in OSGeo both from the
standpoint (or my underlying belief) that software and data should be
free (you know how the mantra goes) and my desire to contribute to a
broader community effort to develop appropriate software for users. I
have been actively using OpenJUMP, Kosmo, OpenEV, EveryDWG and
Sextante. I have tinkered with Ilwis, GRASS, Quantum (various versions)
and a few others I have lost track of. I am currently using
GVSIG+Sextante, which I find very useful and easy to use. I am an old
user of ArcView 3.1+(numerous scripts/extensions).<br>
    <br>
I have a common GIS problem but can not find any OSGeo project that has
provided a set of tools to combat it. I need to establish the
distance+angle between various geometries (points, lines, polygons) in
same layer and in different layers. A specific problem I currently have
is finding the minimum distance and angle between 200 odd polygons in
the same layer. Each polygon has a unique id and I want to get a table
with UID_A, UID_B, MINIMUM_DISTANCE, ANGLE. I know that ArcGIS and
ArcView have this functionality, and script exist for old versions of
ArcView, but I am looking for an Open Source alternative.<br>
    <br>
Ideally such a tool would create the following data for each geometry
type...<br>
    <br>
POINTS -- UID_A, UID_B, DISTANCE, ANGLE<br>
LINES -- UID_A, UID_B, DISTANCE_AT_CLOSEST _POINT<br>
POLYGON --  UID_A, UID_B, MIN_DISTANCE, MAX_DISTANCE,
HAUSDORFF_DISTANCE, CENTROID_DISTANCE, ANGLE_BETWEEN_CENTROIDS<br>
    <br>
What I have found already...<br>
    <ul>
      <li>I have noted that Sextante can create a matrix of distances
between points within the same layer. With rows and column representing
the complete set of points being compared. <br>
      </li>
      <li>I have also found QGIS has a fTools Plugin that allows you to
"Measure distances between two point layers, and output results as a)
Square distance matrix, b) Linear distance matrix, or c) Summary of
distances." QGIS 2009. <br>
      </li>
      <li>I suspect that GRASS would provide this functionality but
can't
get that package to work on my system (even WinGRASS), so if you point
me here please also point me to a tutorial on getting the thing to work
(this system is not intuitive; My problem has been in establishing a
repository and getting data into it for viewing, let alone analysis; it
failed the age old test that if you can't even get the thing running in
half an hour, the learning curve is going to be way too high to use in
in normal business activities; I have tried - yes following their
instructions - several times, and spent several days reading manuals,
wiki's,etc to no avail).<br>
      </li>
    </ul>
    <big>BUT I can't find any tool</big> that allows me to calculate
the
minimum distance between polygons and indicate the direction of the
polygon.<br>
    <br>
Anyone out there know of such a tool?<br>
    <br>
Note: I am using Windows XP Pro SP3 and store all my GIS data as
shapefiles.<br>
    <div>-- <br>
    <p>Cheers Simon</p>
    <p style="margin-left:36pt">
Simon Cropper <br>
Botanicus Australia Pty Ltd<br>
PO Box 160, Sunshine, Victoria 3020.<br>
P: 9311 5822. M: 041 830 3437.<br>
    <a href="mailto:scropper@botanicusaustralia.com.au" target="_blank">mailto:
scropper@botanicusaustralia.com.au</a> <br>
    <a href="http://www.botanicusaustralia.com.au" target="_blank">web:
www.botanicusaustralia.com.au</a> <br>
    </p>
    </div>
    </div>
    <br>
_______________________________________________<br>
Discuss mailing list<br>
    <a href="mailto:Discuss@lists.osgeo.org" target="_blank">Discuss@lists.osgeo.org</a><br>
    <a href="http://lists.osgeo.org/mailman/listinfo/discuss" target="_blank">http://lists.osgeo.org/mailman/listinfo/discuss</a><br>
    <br>
  </blockquote>
  </div>
  <br>
  <br clear="all">
  <br>
-- <br>
Peter Batty - President, Spatial Networking<br>
W: +1 303 339 0957  M: +1 720 346 3954<br>
Blog: <a href="http://geothought.blogspot.com" target="_blank">http://geothought.blogspot.com</a><br>
  </div>
  </div></div><pre><hr size="4" width="90%"><div class="im">
_______________________________________________
Discuss mailing list
<a href="mailto:Discuss@lists.osgeo.org" target="_blank">Discuss@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/discuss" target="_blank">http://lists.osgeo.org/mailman/listinfo/discuss</a>
  </div></pre>
</blockquote>
</div>

<br>_______________________________________________<br>
Discuss mailing list<br>
<a href="mailto:Discuss@lists.osgeo.org">Discuss@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/discuss" target="_blank">http://lists.osgeo.org/mailman/listinfo/discuss</a><br>
<br></blockquote></div><br><br clear="all"><br>-- <br>Peter Batty - President, Spatial Networking<br>W: +1 303 339 0957  M: +1 720 346 3954<br>Blog: <a href="http://geothought.blogspot.com">http://geothought.blogspot.com</a><br>

</div>