Neighborhood Selection (Geostatistical Analyst)

Available with Geostatistical Analyst license.

Summary

Creates a layer of points based on a user-defined neighborhood.

For example, you can create a selection of points in a circular neighborhood around a location defined by the input point.

Illustration

Neighborhood Selection tool illustration
The output layer contains a selection of 10 blue points.

Usage

Parameters

LabelExplanationData Type
Input point features

The points that will be used to create a neighborhood selection.

Feature Layer
Output layer

An output layer with the neighborhood selection.

Feature Layer
Input point

The neighborhood center's x,y-coordinate.

Point
Maximum neighbors to include

The number of points that will be used in each sector. If a sector has the required number of points, all points in that sector will be used.

Long
Include at least

The minimum number of points that will be used in each sector. If the minimum number of required points are not available in any given sector, the nearest available point outside the sector will be selected.

Long
Minor semiaxis

The size of the minor semiaxis of the search neighborhood.

Double
Major semiaxis

The size of the major semiaxis of the search neighborhood.

Double
Angle

The angle of rotation of the neighborhood axis.

Double
Shape type
(Optional)

Species the geometry of the neighborhood.

  • One sectorThe neighborhood will be a single ellipse.
  • Four sectors The neighborhood will be an ellipse divided into four sectors.
  • Four shifted sectors The neighborhood will be an ellipse divided into four sectors and shifted 45 degrees.
  • Eight sectors The neighborhood will be an ellipse divided into eight sectors
String

arcpy.ga.GANeighborhoodSelection(in_dataset, out_layer, point_coord, neighbors_max, neighbors_min, minor_semiaxis, major_semiaxis, angle, {shape_type})
NameExplanationData Type
in_dataset

The points that will be used to create a neighborhood selection.

Feature Layer
out_layer

An output layer with the neighborhood selection.

Feature Layer
point_coord

The neighborhood center's x,y-coordinate.

Point
neighbors_max

The number of points that will be used in each sector. If a sector has the required number of points, all points in that sector will be used.

Long
neighbors_min

The minimum number of points that will be used in each sector. If the minimum number of required points are not available in any given sector, the nearest available point outside the sector will be selected.

Long
minor_semiaxis

The size of the minor semiaxis of the search neighborhood.

Double
major_semiaxis

The size of the major semiaxis of the search neighborhood.

Double
angle

The angle of rotation of the neighborhood axis.

Double
shape_type
(Optional)

Species the geometry of the neighborhood.

  • ONE_SECTORThe neighborhood will be a single ellipse.
  • FOUR_SECTORS The neighborhood will be an ellipse divided into four sectors.
  • FOUR_SECTORS_SHIFTED The neighborhood will be an ellipse divided into four sectors and shifted 45 degrees.
  • EIGHT_SECTORS The neighborhood will be an ellipse divided into eight sectors
String

Code sample

NeighborhoodSelection example 1 (Python window)

Create a feature layer based on some neighborhood criteria.

import arcpy
from arcpy import env
env.workspace = "C:/gapyexamples/data"
arcpy.GANeighborhoodSelection_ga("ca_ozone_pts", "outNS", "-2000000 -50000", 
                                 "20", "5","200000", "200000", "0", "One sector")
NeighborhoodSelection example 2 (stand-alone script)

Create a feature layer based on some neighborhood criteria.

# Name: NeighborhoodSelection_Example_02.py
# Description: Creates a layer of points based on a user-defined neighborhood.
# Requirements: Geostatistical Analyst Extension

# Import system modules
import arcpy

# Set environment settings
arcpy.env.workspace = "C:/gapyexamples/data"

# Set local variables
inPoints = "ca_ozone_pts.shp"
outLayer = "outNS"
pointCoord = "-2000000 -50000"
maxNeighbors = 20
minNeighbors = 5
majSemiaxis = 200000
minSemiaxis = 200000
angle = 0
shape = "One Sector"

# Execute NeighborhoodSelection
arcpy.GANeighborhoodSelection_ga(inPoints, outLayer, pointCoord, maxNeighbors,
                                 minNeighbors, majSemiaxis, minSemiaxis, angle,
                                 shape)

Environments

Licensing information

  • Basic: Requires Geostatistical Analyst
  • Standard: Requires Geostatistical Analyst
  • Advanced: Requires Geostatistical Analyst

Related topics