Oracle® Spatial Developer's Guide 11g Release 2 (11.2) Part Number E11830-11 |
|
|
PDF · Mobi · ePub |
The MDSYS.SDO_OLS package contains subprograms for Spatial OpenLS support.
To use the subprograms in this chapter, you must understand the conceptual and usage information about OpenLS in Chapter 14.
Table 27-1 lists the OpenLS subprograms.
Table 27-1 Subprograms for OpenLS Support
Subprogram | Description |
---|---|
Submits an OpenLS request using a CLOB object, and returns the result as a CLOB object. |
|
Submits an OpenLS request using an XMLType object, and returns the result as an XMLType object. |
The rest of this chapter provides reference information on the subprograms, listed in alphabetical order.
SDO_OLS.MakeOpenLSClobRequest(
request IN CLOB
) RETURN CLOB;
Submits an OpenLS request using a CLOB object, and returns the result as a CLOB object.
OpenLS request in the form of a CLOB object.
To specify the input request as an XMLType object to return an XMLType object, use the SDO_OLS.MakeOpenLSRequest function.
For information about OpenLS support, see Chapter 14.
The following example requests the nearest business, in a specified category (that is, with specified SIC_code
value), to a specified location (longitude: -122.4083257, latitude: 37.788208).
DECLARE
request CLOB;
result CLOB;
BEGIN
request := TO_CLOB(
'<?xml version="1.0" encoding="UTF-8"?>
<XLS xmlns="http://www.opengis.net/xls" xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1">
<RequestHeader clientName="someName" clientPassword="password"/>
<Request requestID="123" maximumResponses="100" version="1.1"
methodName="DirectoryRequest">
<DirectoryRequest>
<POILocation>
<Nearest nearestCriterion="Proximity">
<Position>
<gml:Point xmlns:gml="http://www.opengis.net/gml">
<gml:pos dimension="2" srsName="4326">-122.4083257 37.788208</gml:pos>
</gml:Point>
</Position>
</Nearest>
</POILocation>
<POIProperties>
<POIProperty name="SIC_code" value="1234567890"/>
</POIProperties>
</DirectoryRequest>
</Request>
</XLS>');
result := SDO_OLS.makeOpenLSClobRequest(request);
END;
/
SDO_OLS.MakeOpenLSRequest(
request IN XMLTYPE
) RETURN XMLTYPE;
Submits an OpenLS request using an XMLType object, and returns the result as an XMLType object.
OpenLS request in the form of an XMLType object.
To specify the input request as a CLOB and to return a CLOB, use the SDO_OLS.MakeOpenLSClobRequest function.
For information about OpenLS support, see Chapter 14.
The following example requests the nearest business, in a specified category (that is, with specified SIC_code
value), to a specified location (longitude: -122.4083257, latitude: 37.788208).
SELECT SDO_OLS.makeOpenLSRequest(XMLTYPE(
'<?xml version="1.0" encoding="UTF-8"?>
<XLS xmlns="http://www.opengis.net/xls" xmlns:gml="http://www.opengis.net/gml"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" version="1.1">
<RequestHeader clientName="someName" clientPassword="password"/>
<Request requestID="123" maximumResponses="100" version="1.1"
methodName="DirectoryRequest">
<DirectoryRequest>
<POILocation>
<Nearest nearestCriterion="Proximity">
<Position>
<gml:Point xmlns:gml="http://www.opengis.net/gml">
<gml:pos dimension="2" srsName="4326">-122.4083257 37.788208</gml:pos>
</gml:Point>
</Position>
</Nearest>
</POILocation>
<POIProperties>
<POIProperty name="SIC_code" value="1234567890"/>
</POIProperties>
</DirectoryRequest>
</Request>
</XLS>')) "OpenLS Response" FROM DUAL;