PRO prov ; This procedure reads in the ASCII file '/jasper/cnsr3_data1/prov/prov.ascii', ; locates the breaks in the Canadian political boundaries listed ; in the file, and OPLOTs the lines onto the existing plot. You ; must call MAP_SET first to define the projection. COMMON provinces,lats,lons,nb,b,l IF N_ELEMENTS(l) EQ 0 THEN BEGIN PRINT,'Reading provincial boundaries file...' OPENR,unit,'/jasper/cnsr3_data1/prov/prov.dat',/GET_LUN len=1 READU,unit,len ; length of each array to follow lats=FLTARR(len) ; latitudes and longitudes are lons=lats ; FLOATs keys=INTARR(len) ; keys are INTs READU,unit,lats READU,unit,lons READU,unit,keys CLOSE,unit FREE_LUN,unit l=FIX(keys/10) ; interpret 3rd col as # of pts per boundary b=WHERE(l,nb) ; locate non-zero elements l=l(b) ; save only non-zero elements ENDIF PRINT,'Plotting provincial boundaries...' FOR i=0,nb-1 DO BEGIN ; for each boundary segment s=b(i) ; define start point in lats, lons arrays q=b(i)+l(i)-1 ; as well as quitting point OPLOT,lons(s:q),lats(s:q) ; overplot the boundary segment ENDFOR PRINT,'Done...' RETURN END