Procedure features: |
|
Sample library member: |
GINSIDE2
|
This example uses the GINSIDE
procedure to determine the state
and county for each pair of coordinates in the input data set.
|
data gps;
input x y site $;
x=x*arcos(-1)/180;
x=x*(-1);
y=y*arcos(-1)/180;
datalines;
-77.0348 40.0454 a
-78.4437 39.1623 b
-78.4115 39.3751 c
-78.7646 40.6354 d
;
run; |
|
proc ginside data=gps map=maps.counties out=gpscounties;
id state county;
run; |
|
proc sort data=gpscounties;
by site;
run;
proc print data=gpscounties;
var site state county x y;
run; |
Proc PRINT Results of Output Data Set shows the values of STATE and COUNTY for each observation in the input data
set.
Proc PRINT Results of Output Data Set
site STATE COUNTY x y
a 42 133 1.34451 0.69892
b 54 27 1.36910 0.68351
c 54 27 1.36854 0.68723
d 42 21 1.37470 0.70922
Copyright © 2010 by SAS Institute Inc., Cary, NC, USA. All rights reserved.