@@ -114,7 +114,7 @@ static int usage (struct GMTAPI_CTRL *API, int level) {
114114 GMT_Message (API , GMT_TIME_NONE , "\t<grid> may be one or more grid files.\n" );
115115 GMT_Message (API , GMT_TIME_NONE , "\n\tOPTIONS:\n" );
116116 GMT_Message (API , GMT_TIME_NONE , "\t-C Format report in fields on a single line using the format\n" );
117- GMT_Message (API , GMT_TIME_NONE , "\t <file w e s n z0 z1 dx dy n_columns n_rows [x0 y0 x1 y1] [med L1scale] [mean std rms] [n_nan] [mode LMSscale]>,\n" );
117+ GMT_Message (API , GMT_TIME_NONE , "\t <file w e s n z0 z1 dx dy n_columns n_rows [x0 y0 x1 y1] [med L1scale] [mean std rms] [n_nan] [mode LMSscale] registration >,\n" );
118118 GMT_Message (API , GMT_TIME_NONE , "\t where -M adds [x0 y0 x1 y1] and [n_nan], -L1 adds [median L1scale], -L2 adds [mean std rms],\n" );
119119 GMT_Message (API , GMT_TIME_NONE , "\t and -Lp adds [mode LMSscale]).\n" );
120120 GMT_Message (API , GMT_TIME_NONE , "\t Use -Ct to place <file> at the end of the output record, or -Cn to write only numerical columns.\n" );
@@ -478,7 +478,7 @@ EXTERN_MSC int GMT_grdinfo (void *V_API, int mode, void *args) {
478478
479479 double x_min = 0.0 , y_min = 0.0 , z_min = 0.0 , x_max = 0.0 , y_max = 0.0 , z_max = 0.0 , wesn [4 ];
480480 double global_xmin , global_xmax , global_ymin , global_ymax , global_zmin , global_zmax ;
481- double z_mean = 0.0 , z_median = 0.0 , z_mode = 0.0 , z_stdev = 0.0 , z_scale = 0.0 , z_lmsscl = 0.0 , z_rms = 0.0 , out [22 ];
481+ double z_mean = 0.0 , z_median = 0.0 , z_mode = 0.0 , z_stdev = 0.0 , z_scale = 0.0 , z_lmsscl = 0.0 , z_rms = 0.0 , out [23 ];
482482
483483 char format [GMT_BUFSIZ ] = {"" }, text [GMT_LEN512 ] = {"" }, record [GMT_BUFSIZ ] = {"" }, grdfile [PATH_MAX ] = {"" };
484484 char * type [2 ] = { "Gridline" , "Pixel" }, * sep = NULL , * projStr = NULL , * answer [2 ] = {"" , " no" };
@@ -533,6 +533,7 @@ EXTERN_MSC int GMT_grdinfo (void *V_API, int mode, void *args) {
533533 if (Ctrl -> L .norm & 1 ) n_cols += 2 ; /* Add median scale */
534534 if (Ctrl -> L .norm & 2 ) n_cols += 3 ; /* Add mean stdev rms */
535535 if (Ctrl -> L .norm & 4 ) n_cols += 2 ; /* Add mode lmsscale */
536+ n_cols ++ ; /* Add registration */
536537 }
537538 if (Ctrl -> C .mode == GRDINFO_NUMERICAL ) cmode = GMT_COL_FIX_NO_TEXT ;
538539 geometry = GMT_IS_NONE ;
@@ -789,6 +790,7 @@ EXTERN_MSC int GMT_grdinfo (void *V_API, int mode, void *args) {
789790 if (Ctrl -> L .norm & 4 ) {
790791 out [col ++ ] = z_mode ; out [col ++ ] = z_lmsscl ;
791792 }
793+ out [col ++ ] = G -> header -> registration ;
792794 if (Ctrl -> C .mode == GRDINFO_TRAILING )
793795 sprintf (record , "%s" , HH -> name );
794796 GMT_Put_Record (API , GMT_WRITE_DATA , Out );
@@ -840,6 +842,7 @@ EXTERN_MSC int GMT_grdinfo (void *V_API, int mode, void *args) {
840842 strcat (record , sep ); gmt_ascii_format_col (GMT , text , z_mode , GMT_OUT , GMT_Z ); strcat (record , text );
841843 strcat (record , sep ); gmt_ascii_format_col (GMT , text , z_lmsscl , GMT_OUT , GMT_Z ); strcat (record , text );
842844 }
845+ strcat (record , sep ); gmt_ascii_format_col (GMT , text , (double )G -> header -> registration , GMT_OUT , GMT_Z ); strcat (record , text );
843846 if (Ctrl -> C .mode == GRDINFO_TRAILING ) { sprintf (text , "%s%s" , sep , HH -> name ); strcat (record , text ); }
844847 GMT_Put_Record (API , GMT_WRITE_DATA , Out );
845848 }
0 commit comments