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.
Requirement: |
Three data sets are required: a data set containing
points, a map data set, and an output data set.
|
Syntax
PROC GINSIDE
DATA=points-data-set
MAP=map-data-set
OUT=output-data-set
< INSIDEONLY>
<INCLUDEBORDER>;
Summary of Optional Arguments
includes points that are on the border of a polygon
in the output data set.
causes the output data set to contain only points
that are inside the map polygons.
Required Arguments
- 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.
- 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.
Restriction: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.
- 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.
Optional Arguments
- INCLUDEBORDER
- includes points that are on the border of a polygon
in the output data set. If any points are on
the border of a polygon, then the output data set includes a variable
named _ONBORDER_. If the value of _ONBORDER_ is
1
, then the point is located on the border of a polygon.Note: If a point is on the border
between multiple polygons, then the point is assigned to the ID of
the first polygon whose border it shares (that is, the polygon that
is processed first from the map data set).
- INSIDEONLY
- causes the output data set to contain only points
that are inside the map polygons. By default, the data
set contains all points.
Copyright © SAS Institute Inc. All rights reserved.