function geom_indices_config_template
anan = fltarr(1) & anan[0] = 'NaN'
ppp = {VERSION:1.00000,$
DATASTART:3l, $
DELIMITER:61b, $
MISSINGVALUE:anan[0], $
COMMENTSYMBOL:'', $
FIELDCOUNT:2l, $
FIELDTYPES:[7l,7l], $
FIELDNAMES:['FIELD1','FIELD2'], $
FIELDLOCATIONS:[0l,15l], $
FIELDGROUPS:[0l,1l]}
RETURN, ppp
END
function geom_indices_read_config, header = hhh
otp = -1
dir = geom_indices_config_filedir(/app_query)
if (dir[0] NE '') then begin
ll = strmid(dir, strlen(dir)-1,1)
if (ll EQ '/' or ll EQ '\') then filex = dir+'geom_indices_config.txt' $
else filex = dir + PATH_SEP() + 'geom_indices_config.txt'
if (file_search(filex) NE '') then begin
template = geom_indices_config_template()
fff = file_search(filex)
strfx = read_ascii(filex, template=template, header=hhh)
if (size(strfx, /type) EQ 8) then begin
otp = create_struct(strtrim(strfx.field1[0], 2), $
strtrim(strfx.field2[0], 2), $
strtrim(strfx.field1[1], 2), $
strtrim(strfx.field2[1], 2))
For j = 2, n_elements(strfx.field1)-1 Do $
if is_numeric(strfx.field2[j]) then begin
str_element, otp, strtrim(strfx.field1[j], 2), $
fix(strfx.field2[j]), /add
endif else str_element, otp, strtrim(strfx.field1[j], 2), strtrim(strfx.field2[j], 2), /add
endif
endif
endif
temp_string = strtrim(!geom_indices.local_data_dir, 2)
ll = strmid(temp_string, strlen(temp_string)-1, 1)
if ~(ll EQ '/' OR ll EQ '\') then temp_string = temp_string + PATH_SEP()
!geom_indices.local_data_dir = temporary(temp_string)
temp_string = strtrim(!geom_indices.remote_data_dir, 2)
ll = strmid(temp_string, strlen(temp_string)-1, 1)
if ~(ll EQ '/' or ll EQ '\') then temp_string = temp_string + '/'
!geom_indices.remote_data_dir = temporary(temp_string)
RETURN, otp
END