24.2 SDO_GCDR.ELOC_DRIVE_TIME_POLYGON

Format

SDO_GCDR.ELOC_DRIVE_TIME_POLYGON(
  route_preference        IN  VARCHAR2,
  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');

or

SDO_GCDR.ELOC_DRIVE_TIME_POLYGON(
  route_preference        IN  VARCHAR2,
  longitude               IN  NUMBER,
  latitude                IN  NUMBER,    
  cost                    IN  NUMBER,
  cost_unit               IN  VARCHAR2,
  vehicle_type            IN  VARCHAR2,    
  print_request_response  IN  VARCHAR2 DEFAULT 'FALSE');

Description

Computes the drive time polygon around an input location for the specified 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

route_preference

Routing preference.

Supported values are: shortest, fastest, and traffic.

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

Distance or time bounds of the polygon.

cost_unit

Unit for cost.

Supported values are: mile, kilometer, km, meter, hour, minute, and second.

vehicle_type

Type of vehicle considered for computing the distance.

Supported values are: auto and truck

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:

The SDO_GCDR.ELOC_DRIVE_TIME_POLYGON function is only supported in Oracle Autonomous Database Serverless deployments.

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_TIME_POLYGON function can accept one of the following sets of input parameters to compute the drive time 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 and latitude 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 fastest drive time polygon around an address for a truck:

SELECT SDO_GCDR.ELOC_DRIVE_TIME_POLYGON('fastest', '1 Oracle Dr, Nashua, NH', 'US', 1, 'minute', '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.46924,
 42.76051, -71.46928, 42.76, -71.46919, 42.75975, -71.46911, 42.75962, -71.46899, 42.7594,
 -71.46974, 42.75638, -71.47012, 42.75626, -71.47038, 42.75617, -71.46688, 42.7552, -71.46602,
 42.75482, -71.46409, 42.75397, -71.46244, 42.75343, -71.4618, 42.75311, -71.46102, 42.7542,
 -71.46054, 42.75496, -71.45947, 42.75647, -71.45924, 42.75761, -71.45815, 42.75858, -71.45741,
 42.75912, -71.45813, 42.75955, -71.45959, 42.76009, -71.46187, 42.76099, -71.46227, 42.76177,
 -71.46266, 42.76243, -71.46354, 42.76268,-71.46447, 42.76344, -71.46639, 42.76425, -71.4668,
 42.76412, -71.46668, 42.76387, -71.46683, 42.7625, -71.46732, 42.76183, -71.46924, 42.76051))