192: l_customer_geocode_object := address_to_geometry(null,
193: lower(l_customer_rec.ADDRESS_LINE1 || ' ' ||l_customer_rec.ADDRESS_LINE2 || ' ' ||l_customer_rec.ADDRESS_LINE3),
194: l_customer_rec.CITY, lower(l_customer_rec.STATE), l_customer_rec.POSTAL_CODE);
195: else
196: l_customer_geocode_object := MDSYS.SDO_GEOMETRY(g_geometry_param1,
197: g_geometry_param2,
198: MDSYS.SDO_POINT_TYPE(p_customer_longitude,
199: p_customer_lattitude,
200: NULL),
1545: street VARCHAR2,
1546: city VARCHAR2,
1547: state VARCHAR2,
1548: zip_code VARCHAR2)
1549: RETURN MDSYS.SDO_GEOMETRY
1550: AS
1551: latitude_loc NUMBER;
1552: latitude_str VARCHAR2(200);
1553: latitude NUMBER;
1614: /*SELECT longitude_str
1615: INTO longitude
1616: FROM DUAL;
1617: */
1618: RETURN MDSYS.SDO_GEOMETRY(2001,
1619: 8307,
1620: MDSYS.SDO_POINT_TYPE(longitude,
1621: latitude,
1622: NULL),
1729: --------------------------------------------------------------------------------
1730: --
1731: -- This routine computes the distance between two point geometries
1732: -- using an authalic spherical approximation to the earth ellipsoid.
1733: -- mdsys.sdo_geometry geom1, The first geometry
1734: -- mdsys.sdo_geometry geom2, The second geometry
1735: -- Both geometries should be point geometries with geodetic longitude/latitude
1736: -- coordinates in degrees. Result is returned in meters.
1737: --------------------------------------------------------------------------------
1730: --
1731: -- This routine computes the distance between two point geometries
1732: -- using an authalic spherical approximation to the earth ellipsoid.
1733: -- mdsys.sdo_geometry geom1, The first geometry
1734: -- mdsys.sdo_geometry geom2, The second geometry
1735: -- Both geometries should be point geometries with geodetic longitude/latitude
1736: -- coordinates in degrees. Result is returned in meters.
1737: --------------------------------------------------------------------------------
1738: FUNCTION geocode_distance (geom1 MDSYS.SDO_GEOMETRY,
1734: -- mdsys.sdo_geometry geom2, The second geometry
1735: -- Both geometries should be point geometries with geodetic longitude/latitude
1736: -- coordinates in degrees. Result is returned in meters.
1737: --------------------------------------------------------------------------------
1738: FUNCTION geocode_distance (geom1 MDSYS.SDO_GEOMETRY,
1739: geom2 MDSYS.SDO_GEOMETRY,
1740: distance_unit VARCHAR2)
1741: RETURN NUMBER IS
1742:
1735: -- Both geometries should be point geometries with geodetic longitude/latitude
1736: -- coordinates in degrees. Result is returned in meters.
1737: --------------------------------------------------------------------------------
1738: FUNCTION geocode_distance (geom1 MDSYS.SDO_GEOMETRY,
1739: geom2 MDSYS.SDO_GEOMETRY,
1740: distance_unit VARCHAR2)
1741: RETURN NUMBER IS
1742:
1743: l_ct number;