The temperature-salinity relationship is one of the most important characteristics used for identifying water masses in marine research. Nonetheless, it is not easy to search, compare or analyse the temperature-salinity characteristic efficiently in the ocean database of a wide ranging area. Since marine data are typically collected over a wide range area, how to represent, manage and share such data flexibly and responsively is a critical issue in marine research. Visualization techniques are powerful media for data presentation and knowledge discovery. The temperature-salinity relationship that signifies the characteristics of water mass is modelled in this study as a polynomial function whose coefficients can be estimated through statistical regression. Based on such representation, the distance between two temperature-salinity characteristics could be measured automatically, allowing the comparison of similar water masses for a wide range area to be efficiently performed. The proposed approach can effectively reduce the amount of computations by aggregating the data with seasonal and spatial variations, facilitating the comparison of different water masses through sampling the temperature-salinity characteristics without degrading their discriminating capabilities. With reduced scale data it becomes feasible to visualize or compare them in real time. This tool is helpful for querying geographic locations with similar temperature-salinity characteristic interactively and for tracking specific patterns of water masses, such as the Kuroshio near Taiwan or those in the South China Sea.