24.10 SDO_GCDR.ELOC_ROUTE_GEOM

Format

SDO_GCDR.ELOC_ROUTE_GEOM(
  route_preference        IN  VARCHAR2,       
  start_address           IN  VARCHAR2,    
  end_address             IN  VARCHAR2,    
  country                 IN  VARCHAR2,    
  vehicle_type            IN  VARCHAR2,    
  print_request_response  IN  VARCHAR2 DEFAULT 'FALSE'
) RETURN SDO_GEOMETRY;

or

SDO_GCDR.ELOC_ROUTE_GEOM(
  route_preference        IN  VARCHAR2,      
  start_longitude         IN  NUMBER,
  start_latitude          IN  NUMBER,    
  end_longitude           IN  NUMBER,    
  end_latitude            IN  NUMBER,
  vehicle_type            IN  VARCHAR2,    
  print_request_response  IN  VARCHAR2 DEFAULT 'FALSE'
) RETURN SDO_GEOMETRY;

Description

Computes the route between two locations and returns the geometry of the route in SDO_GEOMETRY format.

The input locations can either be single-line addresses or be specified by geographic coordinates.

Parameters

route_preference

Routing preference.

Supported values are: shortest, fastest, and traffic.

start_address

Complete start address (not formatted into separate fields).

end_address

Complete end 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.

start_longitude

Longitude value of the starting point.

start_latitude

Latitude value of the starting point.

end_longitude

Longitude value of the ending point.

end_latitude

Latitude value of the ending point.

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_ROUTE_GEOM 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_ROUTE_GEOM function can accept one of the following sets of parameters to determine the route geometry between two points:

  • Using unformatted addresses: Provide the start_address and end_address parameters where the complete address is stored in a single field (that is, unformatted).
  • Using geographic coordinates: Provide the start_longitude, start_latitude, end_longitude, and end_latitude parameters to determine the start and end locations.

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 shortest route geometry taken by a truck between two geographic coordinates.

SELECT SDO_GCDR.ELOC_ROUTE_GEOM('shortest', -71.46439, 42.75875,-71.46278, 42.7553, 'truck') route_geom FROM DUAL;

ROUTE_GEOM 
–-------------------------------------------------------------------------------------------------------------------------------                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                
MDSYS.SDO_GEOMETRY(2002, 4326, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 2, 1), MDSYS.SDO_ORDINATE_ARRAY(-71.4643900005, 42.7587499999,
    -71.46439, 42.75875, -71.46433, 42.75862, -71.46431, 42.75858, -71.46421, 42.75837, -71.4641, 42.75813, -71.46397, 42.75785,
	-71.46375, 42.75739, -71.4637, 42.75728, -71.46368, 42.75724, -71.46359, 42.75706, -71.46351, 42.75689, -71.46333, 42.75656,
	-71.46326, 42.75639, -71.46312, 42.75605, -71.46296, 42.75568, -71.46278, 42.7553, -71.46278, 42.7553))