3.11.2 Determining the N-Nearest Geometries

Using the SDO_NN_V2 filter, you can determine the N-nearest geometries to a geometry.

Note:

The SDO_NN_V2 filter, introduced in Spatial Studio release 22.2, is an improved form of the SDO_NN filter which was used in the prior releases of Oracle Spatial Studio. The old behavior will continue to be supported when you modify analyses that were created using the SDO_NN filter. However, when creating a new analysis, the current SDO_NN_V2 filter will be used.
To find the N-nearest geometries, you must perform the following steps.
The instructions assume that you have the layer to be filtered and the map layer to be used as a filter displayed on your Active Project page.
  1. Click Menu Icon against the map layer, whose coordinates needs to be filtered, in the Layers tab.
  2. Select Spatial Analysis.
    The Spatial Analysis Operations window opens as shown in Figure 3-79.
  3. Click on the Filter tab and select Return shapes nearest to another.
    Nearest neighbors dialog box opens as shown:

    Figure 3-82 Nearest Neighbors Analysis

    Description of Figure 3-82 follows
    Description of "Figure 3-82 Nearest Neighbors Analysis"
  4. Enter Analysis name.
  5. Select the Layer to be filtered.

    Note:

    Ensure that you have run spatial validations on the map layer to be filtered and the map layer to be used as the filter in order to obtain accurate analysis results.
  6. Enter Number of results.
  7. Click Run.
    The Analysis result is listed under Analyses in the Data elements panel on the left pane of the Active Project page.
  8. Drag and drop the analysis result on the map view.
    This creates a new map layer highlighting the N-nearest neighbor geometries for a geometry.