Previous Page | Next Page

The GINSIDE Procedure

PROC GINSIDE Statement


The GINSIDE procedure compares a data set of X and Y coordinates to a map data set containing map polygons and determines whether the X and Y points fall inside or outside of the map polygons.
Requirements: Three data sets are required: a data set containing points, a map data set, and an output data set.

PROC GINSIDE
DATA=points-data-set
MAP=map-data-set
OUT=output-data-set < INSIDEONLY>;


Required Argument

DATA=points-data-set

specifies an input data set that contains the X and Y coordinates of the individual points that are being compared to the map polygons.

Note:   If this data set contains the same ID variable (or variables) as does the map, the value should be set to MISSING so that the points are not considered to be part of the boundary of the polygon.  [cautionend]

MAP=map-data-set

specifies the map data set that contains the polygons that you want to compare the points in the input data set to. This data must conform to the rules for a map data set and contain variables X and Y and one or more ID variables. The ID statement should name that variable or variables.

Note:   The X and Y values in the input data set must be in the same projection system and units as the X and Y in the map data set. So, if the map data set has unprojected X and Y values in radians, then the point data set X and Y variable values must also be unprojected and in radians.  [cautionend]

OUT=output-data-set

specifies the output data set for the GINSIDE procedure. The output data set contains all of the observations and variables from the input data set, and an ID variable is added.


Options

INSIDEONLY

causes the output data set to contain only points that are inside the map polygons. By default, the data set contains all points.

Previous Page | Next Page | Top of Page