00001 #include "gis.h"
00002
00003 static int format_double(double,char *);
00004
00005
00018 int G_format_northing ( double north, char *buf,int projection)
00019 {
00020 if (projection == PROJECTION_LL)
00021 G_lat_format (north, buf);
00022 else
00023 format_double (north, buf);
00024
00025 return 0;
00026 }
00027
00028
00041 int G_format_easting ( double east, char *buf,int projection)
00042 {
00043 if (projection == PROJECTION_LL)
00044 G_lon_format (east, buf);
00045 else
00046 format_double (east, buf);
00047
00048 return 0;
00049 }
00050
00051
00064 int G_format_resolution ( double res, char *buf,int projection)
00065 {
00066 if (projection == PROJECTION_LL)
00067 G_llres_format (res, buf);
00068 else
00069 format_double (res, buf);
00070
00071 return 0;
00072 }
00073
00074 static int format_double ( double value, char *buf)
00075 {
00076 sprintf (buf, "%.8f", value);
00077 G_trim_decimal (buf);
00078
00079 return 0;
00080 }