<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
  <meta content="text/html;charset=ISO-8859-1" http-equiv="Content-Type">
</head>
<body bgcolor="#ffffff" text="#000000">
I have a point dataset that I am looking to pull unique geometries from.<br>
<br>
I have tried the following:<br>
<ul>
  <li>select geom from foo GROUP BY geom;</li>
  <li>select DISTINCT geom from foo;<br>
  </li>
</ul>
Both of these methods result in at least one point dropped that should
not have been.  The point dropped in error was not a duplicate point. 
It in fact was already unique in the table.<br>
<br>
This method seems to work:<br>
<ul>
  <li>create temp table bar as select * from foo;</li>
  <li>delete from bar where st_equals(a.geom, b.geom) from bar a, bar b
and a.gid < b.gid;</li>
  <li>I know this is a round-about way, but it proves that GROUP BY or
DISTINCT should have worked.  (I think)<br>
  </li>
</ul>
Any ideas why group by is seemingly erroneous?  <br>
<br>
<pre class="moz-signature" cols="72">Dan Erikson BNRSc
Project Manager
-------------------------------------
Timberline Natural Resource Group
(250)-314-0875 ext 240
#201-175 4th Avenue  Kamloops  BC
<a class="moz-txt-link-abbreviated" href="http://www.timberline.ca">www.timberline.ca</a>
-------------------------------------
</pre>
<br>
</body>
</html>