Sugi 12 89 Chojnacky Tymcio

Please download to get full document.

View again

of 6
All materials on our website are shared by users. If you have any questions about copyright issues, please report us to resolve them. We are always happy to assist you.
Document Description
Document Share
Documents Related
Document Tags
Document Transcript
  CONVERSION OF UT COORDI~ TES TO GEOGRAPHIC COORDINATES FOR SASjGRAPH SOFTWARE PROC GMAP DISPLAY David C. Chojnacky, Intermountain Research Station Ronald P. Tymcio Intermountain Research Station ABSTRACT: The Universal Transverse Mercator UTM) grid is used to reference all forest data collected in the Rocky Mountain States by the USDA Forest Service, Forest Survey P£oject. Display of these data with SASjGRAPH mapping procedures requires a conversion of UTM coordinates to geographic coordinates ~latitude and longitude). In this paper a SAS DATA step is given for conversion of UT to geographic coordinates. Also given are examples of Forest Survey maps using the SASjGRAPH with converted UT data. INTRODUCTION The Universal Transverse Mercator UTM) grid is a map reference system for almost the entire world USDD 1973). Only the North and South Poles are excluded. The grid consists of geo~raphical strips or zones 6 degrees in width (fig. 1). · · ã ã ã ã UTM GRID ZONES Figure l--UTM grid zones for the United States. Map points are identified within each zone by northing tl and Iteastingll UTM coordinates on a metric scale (fig. 2). UTM COORDIN TES Figure 2--The UTM northingll coordinate identifies vertical direction and the lIeasting coordinate identifies horizontal direction. 489 UTM coordinates are planimetric and are continuous except for small breaks in the easting scale between zones. UTM coordinates are the fundamental map reference system used by the USDA Forest Service Forest Survey Unit in the Rocky Mountain States (fig. 3). MONTANA DAHO WYOMING NEVADA lITAH COLOR DO RIZON MEXIC Figure 3--The Rocky Mountain States. All forest land sampling done by Forest Survey is referenced to the UT system. An initial 1 000- meter UT grid is marked on U.S. Geologic Survey maps to identify forested land and ownership categories. Then field locations are subsampled from the 1 OOO-meter grid sample for ground observation and measurement. By sampling from a UTM grid Forest Survey samples are equal map distance apart within grid zones), field sample locations are easily identified on U.S. Geologic Survey topographic maps and resulting survey data are labeled in metric units. Although UT coordinates have many advantages for mapping and inventory of forest and range lands in the Rocky Mountain States they are not compatible with SAS mapping procedures SAS 1985). The GMAP procedure in SAS/GRAPH is based on geographic coordinates (latitude and longitude expressed in radians). not UTM coordinates. Fortunately, a conversion between geographic and UT coordinates exists but it is somewhat camp 1 ca ted. The purpose of this paper is to document the conversion of UT coordinates to geographic coordinates in a SAS DATA step and display resulting data with GM P procedure using the ANNOTATE= Data Sets feature. CONVERSION OF UT COORDINATES The algorithm for conversion of UTM coordinates to- geographic coordinates was taken from document ation supplied by Lloyd 1985), which was based on Claire s 1968) work. For a given map point,    . the algorithm requires UTM grid zone and northing and easting coordinates as inputs in order to .give latitude and longitude as outputs. The Clark 1866 spheroid is used by the algorithm for the assumed size and shape of the earth. The algorithm, as given in this paper, is applicable to the northern hemisphere only, but easily can be modified for the southern hemisphere by adjusting the northing: Y = 10,000,000 -Y where: Y = northing coordinate in southern hemisphere Y = adjusted northing coordinate. The mathematics of the conversion only involve algebra, but the conversion itself is based on complex geometric relationships. Further explana tion is not given here but can be found in USDO (1973). Given below is a SAS DATA step including brief comments for the conversion of UTM coordi nates in the northern hemisphere. Inputs for the DATA step are UTM grid zone 2-digit integer), easting 6-digit integer), and northing 7-di9it integer). Also state and county (in FIPS code) are included for later merging with SAS/GRAPH map data sets. ** BAS PROGRAM FOR CONVERSION OF UTM EASTING AND NORTHING TO LATITUDE (LATRADJ AND LONGITUDE (LONGRAD) EXPRESSED IN RADIANS __ USING VERSION S.03 UNDER AOSIVB ~~~.u; LIBNANE DD2 ':D3:SASLIB:GMAP'; DATA RADIANS (KEEP=STATE COUNTY EASTING NORTHING LATRAD WNGRAD); INFILE UTMS MISSOVER RECFM=D; INPUT STATE COUNTY GRID ZONE EASTING NORTHING ***DEFINE VARIABLES***; X=EASTING; Y=NORTHING; ZONE=GRIDZONE; **~DEFINE PI*~ ; PI=3.141S926S3SB9793; RADIUS OF THE EQUATOR IN METERS ; A=637lt~6 4; U-ItECCENTRICITY SQUARED ; ESQ::. 00676865'199'1; ttttMINOR ECCENTRICITY SQUARED '; EM2=ESQI(1-ESQJ; ultSCALE FACTOR OF THE CENTRAL MERIDIAN '; KO=.9996; u 'FALSE EASTING tt; C=500000.0; '''''''RECTIFYING LATITUDE ''''''; V=.0000001571128261; R£=Y 'Y; CRL=COS (BL) ; u 'CALCULATING LATITUDE OF FOOT OF PERPENDICULAR FROM POINT TO CENTRAL MERIDIAN (IN RADIANS) 'U; 0=.0000002457956882; D=.005078649674; F=.0000300245646; FP=BL ((D (F 'CRL**2) (G CRL**4)) '(SQRT(1. 0-CRL**2)) 'CRL); 490 '''''COSINE OF LATITUDE OF FOOT OF PERPENDICULAR '* '; COSFP=COS (FP); ** 'COSINE OF LATITUDE OF FOOT OF PERPENDICULAR SQUARED** ; CFP2=COSFP**2; ETA=1 (EM2 CFP2); '''''DIFFERENCE BETWEEN EASTING INPUTED AND FALSE EASTING '''''; XMC=X-C; XAK=( (I-ESQ) / (KO KO)) '(}[MC/A) 2; '* 'DEGREES IN ONE RAlJIAN FOR CALCULATING CENTRAL MERIDIAN '**; RADDEG=180. 0 IPI; ** 'CALCULATIONS FOR LATITUDE '; 'FIRST CALCULATION ; LAT1=ETA 'ETA 'TAN(FP) /2.0; 'SECOND CALCULATION '; LAT2=(2.0 - 6.0 EM2 3.0/CFP2 (12.0 'EM2 _ 9.0 'EM2 2) 'CFP2 6.0 EM2u 2 CFP2)/12.0; 'THIRD CALCULATION '; LAT3= ETA (16.0 - 72. o 'EM2 45.0/CFP2**2 _ 45.0 'EM2/CFP2 244. o 'EM2 'CFP2)/360. 0; 'CALCULATING LATITUDE IN RADIANS '**; LATRAD=FP _ LAT1 'XAKtt(1.0 - LAT2 'XAK LATJ 'XAK**2); '**CALCULATING LONGITUDE '**; 'FIRST CALCULATION '; LONG1=SQRT(ETA) /COSFP; 'SECOND CALCULATION ; LONG2=ETA '(_I.O 2.01CFP2 EM2 'CFP2)/6.0; 'THIRD CALCULATION '; LONG3=ETAtt(1.0 8. o 'EM2 24.0/CFP2 ''''2 - 20.0/CFP2 - 2. 0 'EM2 CFP2) /120.0; '**CALCULA fING CENTRAL MERIDIAN IN RADIANS FOR GRID ZONE ENTERED ''''''; CM=(183.0 _ 6.0 ZONE)/RAIJDEG; '''''CALCULAPING LONGITUDE IN RADIANS '; 'NOTE: ADD DIFFERENCE IF EASTING LESS THAN FALSE EASTING SUBTRACT DIFFERENCE IF EASTING GREATER THAN FALSE EASTING OF THE GRID ZONE; RUN IF XMC LT I THEN LONGRAD=CM SQRT(XAX) 'LONG1 '(1. 0 - UK' LONG2 XAK**2 ' LONG3); IF XMC GT I THEN LONGRAD-GM - SQRT(XAK) 'LONGI '(1.0 - XAX LONG2 XAX 2 ' LONG3); SAS UTM MAPPING APPLICATIONS Several maps were made to illustrate the useful ness of the UTM conversion algorithm when combined with the mapping features of SAS/GRAPH. The UTM data (converted to latitude and longitude) were combined and prOjected with the SAS map data set to assure uniform scaling. The projected UTM data were then separated from the SAS map data set. The projected UTM data were included in the GMAP procedure for final mapping using ANNOTATE Data Sets. A similar example of this logic is given in the SAS/GRAPH User s Guide (SAS 1985, p. 316-317) ã Figure 4 illustrates 5 OOO-meter UTM grid points corresponding to several ownerships overlaid onto a Wyoming counties map. Five different public    ã . . .. ã ............. .. JIo JIo JIo JIo .. .... .,, JIo .. . ã ã Jt. ã ã ã .. ã ã ã ã ã ã ã ã ã ã Nat'l Fore.t 0 Nat'l Park ã Bureau of Land .tamt ... Indian Re ãã vatlon State Figure 4--Five Wyoming public ownerships sampled on 5 ODD-meter UTM grid. ownershi ps are ill ustrated for Wyomi ng. The map shows a slight problem in using special symbols with FUNCTION='lABEl' to annotate the ownerships on the map. Notice in figure 4 ownership classes below the southern Wyoming border and a small gap of no ownerships below the northern Wyoming border. There should be no ownership symbols outside the Wyoming border and National Park and National Forest ownerships should be adjacent to the northern border. These problems apparently occurred because ANNOTATE's label function centers within a graphics cell, instead of centering exactly on the X an Y coordinates (SAS 1985, p. 124). Had we used ANNOTATE's symbol function (SAS 1985, p. 130) instead of the label function this problem might not have occurred. However this speculation was not tested because of a bug in our AOS/VS version of SAS/GRAPH (beta test version 5.03 . Also illustrated in figure 4 is the effect of a UTM zone break between zones 12 and 13 (see fig. 1) for the BlM ownership. Zone breaks are a known nuisance when selecting survey samples on a fixed UTM coordinate grid, but maps such as figure 4 will help us make a sampling correction to deal with this problem in the future. Because the SAS code for generating figure 4 is representative of our concept for mapping UTM data s t is given below: 491 SAS PROGRAM FOR SUGI12 PAPER--OWNERSHIP MAP ' GOPTIONS DEVICE=HP?475A; LIBNAME DD1 ':DJ:SASLIB:GMAP:SUGI12'; DATA PI SET DD1.WY PI; O=OWNER; - IF 0 EQ 9 OR 0 EQ 11 OR 0 EQ 12 OR Q 13 OR o EQ 15; LENGTH FUNCTION $ 8 STYLE $ 8 TEXT $ 25 COLOR $ 8 POSITION $ 1; FUNCTION= 'LABEL'; XSYS='2'; YSY8='2'; WHEN ,,'A ; X=LONGRAD; Y=LATRAD; P08ITION='5'; STYLE= 'SPECIAL'; COLOR= 'BLACKS'; IF a EQ 11 THEN TEXT='K'; IF a EQ 9 THEN TEXT ,,'H'; IF 0 Q 12 THEN TEXT='L'; IF 0 EQ 13 THEN TEXT='$'; IF a EQ 15 THEN TEXT='M'; NATIONAL FOREST; NATIONAL PARK; ELM; INDIAN; STATE; IF a EQ 9 OR a EQ 13 OR a EQ 15 THEN 8IZE=.8; IF a EQ 11 THEN SIZE=1.1; COUNTY = -1; ...... DUMMY COUNTY FOR ANNOTATE TEXT; RUN;  DATA LEGEND; LENGTH TEXT 25; FUNCTION= LABEL ; XSYS='3'; YSYS='3'; COLOR= BLACK3 ; POSITION: 0'; Y==01; X=14; STYLE= SPECIAL ; TEXT= K ; Y=.; K=.; OUTPUT; STYLE= DUPLEX ; TEXT= Nat Z, Fonst ; OUTPUT; RUN; STYLE= SPECIAL ; TEXT= H ; OUTPUT; STYLE= DUPLEX ; TEXT: Nat Z, Park'; OUTPUT; STYLE== SPECIAL ; TEXT:: L'; OUTPUT; STYLE= DUPLEX ; TEXT= Bureau of Land MfJ111t ;OlJTPUT; STYLE= SPECIAL ; TEXT= '; OUTPlJT; STYLE= DUPLEX ; TEXT= Indian Reservation'; OUTPUT; STYLE= SPECIAL ; TEXT= M ; OUTPUT; STYLE= DUPLEX ; TEXT= State'; OUTPUT; DATA SASMAP; SET DD1.WY_CNTY PI; RUN; PROG GPROJECT DATA=SABMAP OUT=COMBINED; ID COUNTY; RUN; DATA M P PTS PI PTS; SET COMBINED; IF COUNTY EQ =1 THEN OUTPUT PI PTS; ELSE OUTPUT MAP_PTS; RUN; DATA PI PTS; SET PI PTS LEGEND; RUN; -- DATA FAKE (KEEP=COUNTY NUMBER); SET MAP PTS; BY COUNTY; - IF FIRST. COUNTY; NUMBER=1; RUN; PROC GMAP MAP=MAP PTS DATA=FAKE; ID COUNTY; - CHORO NUMBER / GOUTLINE=BLACK 1 DISCRETE NOLEGEND ANNOTATE=PI _PTS; PATTERN1 V::E; TITLE; FOOTNOTE1; FOOTNOTE3; RUN; Additional resource maps for sections of Wyoming are shown in figures 5 and 6. Figure 5--Yellowstone National Park's forest types and lakes sampled on a 5 000-meter UTM gri d. 492 In both cases UTM data sampled on 5 OOO-meter grid is overlaid onto a portion of the Wyoming counties map available in SAS. ãã ã t ã ã ã ã ·1 . ã ã . ãããããã ããã ã ãã ãã ãã ãã ãã ·t· ã ãã = ã ã ...... ft ãã ã IU· ã ã .t a: **a : d t III ã : :... ~ ã ãã :· ·1 ã ã ã ã ã ã ã ã ã ã ã ã ã ã ã ããããã ã ã ã ã ãã ã ã ã ã ã ããã ã ã ãã ã ã ã ã ããã ã ã ã ã < 500 ell fVlle ã 500 TO 2.000 ell ft/lle > 2,000 111 1 ft/ae ã Mafl Fanlllt Figure 6--Wood volume for all ownerships except National Forest in the Black Hills region of northeast Wyoming sampled on a 5 OOO-meter UTM grid. These maps illustrate the usefulness of a spatial display of forest survey data. In the past, Forest Survey data presentation was limited to statistical tables or charts. Our final mapping application of UTM data involved an attempt to draw boundaries around a block of UT data points. We selected the Wind River Indian Reservation as a test case. Identi-fication of the boundary points (fig. 7) was straightforward. However, we had difficulty joining the points with a solid line. Figure . ... i;. - : : ã ............... 1 7--Boundary perimeter points for Wyoming s Wind River Indian Reservation sampled on a 5 OOO-meter UTM grid.
Similar documents
View more...
Search Related
We Need Your Support
Thank you for visiting our website and your interest in our free products and services. We are nonprofit website to share and download documents. To the running of this website, we need your help to support us.

Thanks to everyone for your continued support.

No, Thanks