pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Tomasz Myrta <jasiek@klaster.net>
To: Ryan <pgsql-sql@seahat.com>
Cc: pgsql-sql@postgresql.org
Subject: Re: nearest match
Date: Thu, 13 Mar 2003 09:57:02 +0100
Message-ID: <3E7047DE.5000306@klaster.net> (raw)
References: <10112.65.102.128.233.1047504752.squirrel@fordparts.com>

Ryan wrote:
> I'm doing some work with part diagrams and server-side image maps.
> I want to store single point coordinates (x,y) for reference numbers in a
> table looking like:
> 
> reference_number text,
> x int,
> y int
> 
> My question is:  How can I find the *nearest* match of some clicked on
> coordinates without specifying some arbitrary distance from the stored
> point?
> 
> The more I think about this the more I am realizing it is probally not
> that hard, I just can't seem to grasp the answer right now.
Can you say it in math logic? How to find, that some points are nearer 
then other without counting distance?

For image maps consider using geometric types like polygon. You need 
only one row for one area when using them.

Regards,
Tomasz Myrta




view thread (6+ messages)  latest in thread

Message-ID: <3E7047DE.5000306@klaster.net>
Permalink:  ../3E7047DE.5000306@klaster.net/
Also on:    postgresql.org/message-id/3E7047DE.5000306@klaster.net

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: jasiek@klaster.net, pgsql-sql@seahat.com
  Subject: Re: nearest match
  In-Reply-To: <3E7047DE.5000306@klaster.net>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox