function fovc2corn_cmd, item
;
;+
;NAME:
;	fovc2corn_cmd
;PURPOSE:
;	To extract the word corresponding to the FOV (Field of View) center
;	and convert it back to corner commanded pixel.
;CALLING SEQUENCE:
;	cmd = fovc2corn_cmd(roadmap)
;INPUT:
;	item	- A roadmap or index
;OUTPUT:
;	returns	- The FOV Center in arcmin, a integer value or a string
;		  value depending on the switches used.  It is a vector
;		  if the input is a vector.
;			(0,*) = East/West (east is negative)
;			(1,*) = North/South (south is negative)
;		  If heliocentric coordinate option is used, the results
;		  are in degrees.  The order for E/W and N/S is the same
;		  as shown above.
;HISTORY:
;	Written 23-Jun-93 by M.Morrison
;-
;
siz = size(item)
typ = siz( siz(0)+1 )
if (typ eq 8) then begin
    tags = tag_names(item)
    if (tags(0) eq 'GEN') then fov = item.sxt.fov_center $	;index
			else fov = item.fov_center		;roadmap
end else begin
    message, 'Expected a roadmap or index as input. Simply returning input', /info
    return, item
end
;
sum = 2^gt_res(item)
shape = gt_shape_cmd(item)
;
xc = 512 - fix(fov(0,*) / 2.45 + .5*sgn(fov(0,*)) )	;roundoff
yc = 638 + fix(fov(1,*) / 2.45 + .5*sgn(fov(1,*)) )
;
out = fov
out(0,*) = xc - shape(0,*)/2*sum
out(1,*) = yc - shape(1,*)/2*sum
;
return, out
end
