Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> Re: longitude, latitude

Re: longitude, latitude

From: Oliver Artelt <oli_at_md.transnet.de>
Date: Fri, 6 Oct 2000 20:07:47 +0200
Message-Id: <10641.118706@fatcity.com>


Hi,
Have you taken a look to the spatial option of the oracle server? I don't know much about that but maybe you could find some useful functions/index types (R-trees?) there. I think it's a look worth.

oli

On Fre, 06 Okt 2000, jfedock_at_ixl.com wrote:
> Hello all,
>
> Looking for some advice on the best way to use longitude and latitude.
> These values are stored in a table, along with other info.
>
> In order to get within a certain distance, our developers are using the
> following query. It actually runs well, with a few hints. I feel that we
> need to narrow down the long/lat in the where clause by a certain distance.
>
> I'll be the first to admit I don't know much about long/lat. I'm just trying
> to tune this query a bit.
>
> Anybody else out there deal with this before?
>
>
> SELECT DISTINCT service_provider_id,
> SQRT(((37.6715 - LATITUDE)*(37.6715 - LATITUDE) + (-77.5465 -
> LONGITUDE)*(-77.5465 - LONGITUDE)) * 5329) DIST
> FROM provider_search
> WHERE SPECIALTY_CATEGORY_ID = 'PH'
> AND ((37.6715 - LATITUDE)*(37.6715 - LATITUDE) + (-77.5465 -
> LONGITUDE)*(-77.5465 -LONGITUDE)) * 5329 < 100*100
> ORDER BY DIST
>
>
> Thanks.
>
> John
> jfedock_at_ixl.com
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.com
> --
> Author:
> INET: jfedock_at_ixl.com
>
> Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051
> San Diego, California -- Public Internet access / Mailing Lists
> --------------------------------------------------------------------
> To REMOVE yourself from this mailing list, send an E-Mail message
> to: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in
> the message BODY, include a line containing: UNSUB ORACLE-L
> (or the name of mailing list you want to be removed from). You may
> also send the HELP command for other information (like subscribing).

-- 
---

Oliver Artelt, System- und Datenbankadministration
---------------------------------------------------------------
  cubeoffice GmbH & Co.KG # jordanstrasse 7 # 39112 magdeburg
telefon: +49 (0)391 6 11 28 10 # telefax: +49 (0)391 6 11 28 19
   email: oli@cubeoffice.de # web: http://www.cubeoffice.de
---------------------------------------------------------------
Received on Fri Oct 06 2000 - 13:07:47 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US