24.2 SDO_GCDR.ELOC_DRIVE_DISTANCE_POLYGON
Format
SDO_GCDR.ELOC_DRIVE_DISTANCE_POLYGON(
start_address IN VARCHAR2,
country IN VARCHAR2,
cost IN NUMBER,
cost_unit IN VARCHAR2,
vehicle_type IN VARCHAR2,
print_request_response IN VARCHAR2 DEFAULT 'FALSE'
) RETURN SDO_GEOMETRY;
or
SDO_GCDR.ELOC_DRIVE_DISTANCE_POLYGON(
longitude IN NUMBER,
latitude IN NUMBER,
cost IN NUMBER,
cost_unit IN VARCHAR2,
vehicle_type IN VARCHAR2,
print_request_response IN VARCHAR2 DEFAULT 'FALSE'
) RETURN SDO_GEOMETRY;
Description
Computes the drive distance polygon around an input location for the
specified distance cost, and returns the geometry of the polygon in
SDO_GEOMETRY
format.
The input location can either be a single-line address or be specified as longitude and latitude.
Parameters
- start_address
-
Complete start address (not formatted into separate fields).
- country
-
ISO 2-character country code. See Country codes in ISO Online Browsing Platform (OBP) to view the list of supported codes.
- longitude
-
Longitude value of the starting point.
- latitude
-
Latitude value of the starting point.
- cost
-
Drive distance to use for the area of reachability from the starting point.
The output polygon is the area reachable from the start point within the specified distance.
- cost_unit
-
Unit for cost.
Supported values are:
mile
,kilometer
,Km
, andmeter
. - vehicle_type
-
Type of vehicle considered for computing the distance.
Supported values are:
auto
andtruck
- print_request_response
-
Determines if the request sent and response received are to be printed.
By default, the parameter value is
'FALSE'
.
Usage Notes
Note:
TheSDO_GCDR.ELOC_DRIVE_DISTANCE_POLYGON
function is only supported on Oracle Autonomous Database.In order to use this function on your Autonomous Database instance, ensure that you have been granted the required permission. See SDO_GCDR.ELOC_GRANT_ACCESS for more information.
The SDO_GCDR.ELOC_DRIVE_DISTANCE_POLYGON
function can
accept one of the following sets of input parameters to compute the drive distance
polygon (as a geometry) around the specified location:
- Using an unformatted address: Provide the
start_address
parameter where the complete address is stored in a single field (that is, unformatted). - Using geographic coordinates: Provide the
longitude
andlatitude
parameters to determine the location.
Also, note that each parameter input can be a column from a table or view, or an explicit string or number value.
Example
The following example computes the drive distance polygon around a location specified using longitude and latitude for a truck:
SELECT SDO_GCDR.ELOC_DRIVE_DISTANCE_POLYGON(-71.47374, 42.75505, 500, ‘meter', 'truck') polygon FROM DUAL;
POLYGON(SDO_GTYPE, SDO_SRID, SDO_POINT(X, Y, Z), SDO_ELEM_INFO, SDO_ORDINATES)
------------------------------------------------------------------------------------------
SDO_GEOMETRY(2003, 4326, NULL, SDO_ELEM_INFO_ARRAY(1, 1003, 1), SDO_ORDINATE_ARRAY(-71.47863,42.75343
-71.47793,42.75366 -71.47776,42.75372 -71.47763,42.75376 -71.47515,42.75458 -71.47316,42.75412 -71.47298,
42.75301 -71.47144,42.75279 -71.47056,42.75388 -71.47142,42.75415 -71.47282,42.75423 -71.47348,
42.75578 -71.47313,42.75671 -71.4738,42.75625 -71.47423,42.75609 -71.47478,42.75597 -71.47627,
42.75619 -71.4773,42.75562 -71.47819,42.75549 -71.47863,42.75343))
Parent topic: SDO_GCDR Package (Geocoding)