A subsystem is developed for interactively drawing synoptic chart to solve issues in previous versions of MICAPS and meet new user requirements. First of all, the composite design pattern is used to define the class hierarchy that describes graphical objects. This class hierarchy fits well with the relation among different graphical objects and therefore reduces the spatial complexity of the program, making manipulations to graphical objects much easier to implement. Thanks to the polymorphism feature provided by modern object-oriented programming languages, clients manipulating the graphical objects can treat all objects in this composite structure uniformly. The consequential benefit of this design advantage in practice is that the client code does not need to be modified when new types of graphical objects are introduced. This is especially useful for developers to define customized graphical object in their own applications. Above all, the proposed class hierarchy not only promotes code reusability, but also makes it easy to add new types of graphical objects. The code that draws rubber band graphical objects is constructed using the state design pattern, in which the behavior of drawing a particular type of graphical object is implemented in the corresponding class. The advantage of this approach is that introducing new types of graphical objects only require deriving new subclass and does not affect existing code. In addition, the gesture event class is proposed to represent the start, continue and end gestures in the rubber band drawing. In this way, the gestures can be customized at runtime by users. On the contrary, if the conventional code structure using large conditional statements is employed for rubber band drawing as in the previous implementation, the code complexity will increase dramatically when new types of graphical objects are introduced and the code defining the gestures has to be modified when user changes these gestures. The disadvantage makes it difficult to extend, debug and maintain the code. An algorithm to modify linestrip-type graphical objects, in particular isolines, is proposed. By taking advantage of the smoothness constraint, the proposed algorithm is able to solve the ambiguity in isolines modification and make the modified result meet the user expectation. The command design pattern is employed to implement undo/redo and runtime logging. The former feature facilitates users manipulation and the latter feature can restore the program session to the last successful state after the program quits abnormally. These two features enhance usability and reliability of the program. The implementation of automatically saving edited document which ensures the integrity of the documents is discussed. With all these features implemented, the proposed system not only facilitates users manipulation but provides good performance and reliability as well.
Yu L, Cao L, Li Y, et al. Introduce on Typhoon Forecast Operational System//Proceedings of 27th IIPS for Meteorology, Oceanography, and Hydrology. 2011.
Hopkins T, Henry R, Mandel E, et al. AWIPS Ⅱ Migration Status//Proceedings of 27th IIPS for Meteorology, Oceanography, and Hydrology. 2011.
[9]
Griffith F. AWIPS-Ⅱ Into the Future//Proceedings of 27th IIPS for Meteorology, Oceanography, and Hydrology. 2011.
[10]
Daabeck J. Overview of Meteorological Workstation Development in Europe//Proceedings of 21st International Conference on Interactive Information Processing Systems (IIPS) for Meteorology, Oceanography, and Hydrology. 2005.
Figure 1. The class hierarchy that encapsulates all types of graphical objects in a subsystem for interactively drawing synoptic chart
Figure 2. Using the state design pattern, a class hierarchy is proposed to represents all states corresponding to users' selection of graphical objects
Figure 3. The toolbox dialog
Figure 4. Two cases demonstrating the ambiguity of modified isolines
Figure 5. 12 unique cases according to the shape and direction of isolines
Figure 6. The class hierarchy that represents some user operations in a subsystem for interactively drawing synoptic chart