Received: from maia.hub.org (maia-5.hub.org [200.46.204.29]) by mail.postgresql.org (Postfix) with ESMTP id CC30CB5DC09 for ; Thu, 25 Aug 2011 19:56:46 -0300 (ADT) Received: from mail.postgresql.org ([200.46.204.86]) by maia.hub.org (mx1.hub.org [200.46.204.29]) (amavisd-maia, port 10024) with ESMTP id 07568-02 for ; Thu, 25 Aug 2011 22:56:40 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from qmta13.westchester.pa.mail.comcast.net (qmta13.westchester.pa.mail.comcast.net [76.96.59.243]) by mail.postgresql.org (Postfix) with ESMTP id 6CDC9B5DC3C for ; Thu, 25 Aug 2011 19:56:40 -0300 (ADT) Received: from omta20.westchester.pa.mail.comcast.net ([76.96.62.71]) by qmta13.westchester.pa.mail.comcast.net with comcast id QkpM1h0061YDfWL5DmwhnP; Thu, 25 Aug 2011 22:56:41 +0000 Received: from rray2.comcast.net ([75.65.154.18]) by omta20.westchester.pa.mail.comcast.net with comcast id Qmwe1h0010Q4uCT3gmwgK8; Thu, 25 Aug 2011 22:56:40 +0000 Received: from rray.drdc.mstc.ms.gov ([172.17.32.9]) by rray2.comcast.net (8.14.3/8.14.3/Debian-9.1ubuntu1) with ESMTP id p7PMuYkg006263 for ; Thu, 25 Aug 2011 17:56:36 -0500 Received: from rray.drdc.mstc.ms.gov (rray.drdc.mstc.ms.gov [127.0.0.1]) by rray.drdc.mstc.ms.gov (8.13.8/8.13.8) with ESMTP id p7PMuO1v017271 for ; Thu, 25 Aug 2011 17:56:24 -0500 Received: from localhost (rray@localhost) by rray.drdc.mstc.ms.gov (8.13.8/8.13.8/Submit) with ESMTP id p7PMuOsO017268 for ; Thu, 25 Aug 2011 17:56:24 -0500 X-Authentication-Warning: rray.drdc.mstc.ms.gov: rray owned process doing -bs Date: Thu, 25 Aug 2011 17:56:24 -0500 (CDT) From: lxnf98mm@comcast.net X-X-Sender: rray@rray.drdc.mstc.ms.gov To: pgsql-sql@postgresql.org Subject: Need a little help with geometric query Message-ID: User-Agent: Alpine 2.00 (LRH 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; format=flowed; charset=US-ASCII X-Virus-Scanned: clamav-milter 0.96.5 at rray2 X-Virus-Status: Clean X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=-2.421 tagged_above=-5 required=5 tests=BAYES_00=-1.9, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RP_MATCHES_RCVD=-0.532, T_TO_NO_BRKTS_FREEMAIL=0.01 X-Spam-Level: X-Archive-Number: 201108/112 X-Sequence-Number: 35780 This is my first shot at using postgresql's geometric functions I have a passel of lines defined by x1 y1 x2 y2 I created a table with type lseg and loaded it I start by finding the line that has an end closest to 0,0 Now I want to find the next line that has an end closest to the first line's other end and so on I want to find the shortest path I see there are a lot of geometric operators but I am a bit baffled Can someone offer suggestions or reading references Thanks Richard