Re: Querying distances between two coordinates

From: John Hurley <>
Date: Tue, 14 Jun 2011 12:06:49 -0700 (PDT)
Message-ID: <>


... I was trying to answer (radiussearch)   one of my team came up with a solution storing the lat/long in a
 table column of type "mdsys.sdo_geometry" - I believe this does not  require any Oracle options - available in SE.

 Then insert data into the column using a call such as:

 (2001,               -- This is the SDO_GTYPE attribute and it is set to
                     -- 2001 when storing a two-dimensional single
                     -- such as a customer's location.
 8307,               -- This is the spatial reference system ID
                     -- (SRID), 8307 corresponds to "Longitude /
                     --Latitude (WGS 84)
 mdsys.sdo_point_type (-0.771618, 51.579601, null),

... Then query using the function "sdo_within_distance"

JBH notes:

Sounds to me as if you are using Oracle spatial features and will need to be licensed appropriately.

Oracle makes it easy to have features/options appear in database instances that you may not have appropriately licensed. Up to the DBA and IT management to carefully know how to install and select ( and deselect ) options that you are not licensed for.

The Oracle spatial stuff comes in the mdsys schema ... check with Oracle and do your homework but I think if you start using this stuff you better be prepared to pay for it. Received on Tue Jun 14 2011 - 14:06:49 CDT

Original text of this message