Global Positioning System Reference
In-Depth Information
The common expectation of a map's proportions is to match a picture of
a city taken from a helicopter or a satellite. The x- and y-scales are identical
regardless of the picture's orientation. A football eld should always be a
perfect rectangle, and a circle should not be distorted. A car moving with
a constant speed should be displayed at constant speed on the map of a
navigation system. Nevertheless, the horizontal and vertical scales have
to be independent of each other, since latitude and longitude scales are
not identical in terms of distances between two values (see page 36). As a
starting point, the map image HD.jpg will be used as a valid map with a
correct projection of the geographic area.
The mapping component should be able to
1. display the area given by a horizontal and a vertical set of decimal
values;
2. draw a coordinate grid based on the four decimal values;
3. fit a map image, also described by two sets of decimal values, into
the mapping area (the grid);
4. draw various geometric primitives to represent points (locations),
lines (road segments), polylines (routes and traces), and polygons
(areas).
The geometric primitives indicate formats of digital maps, which are
not stored as images, but rather as chunks of information. Digital maps
usually do not supply cartographic coordinates. Instead, they are built with
geographical (lat,lon) coordinates usually based on the WGS84 ellipsoid.
Processing digital map data will be introduced in detail in Chapters 7
and 8. For the time being the map image will do.
5.4
The Framework Pattern
The object-oriented paradigm has produced a lot of standard approaches
to common programming problems referred to as patterns. Although there
is no exclusive \framework pattern," the Swing Framework can help to
supply a deeper understanding of the envisioned ROApp Framework.
The Java Swing Framework is a general-purpose graphical user interface.
The framework launches its own drawing thread to draw windows and
their subcomponents. A customized component is created by extending the
JComponent to become part of the existing framework by inheritance. The
framework propagates external events from the user or operating system
to all subcomponents. Every component can override Swing methods with
dedicated code to trigger these events internally.
The object-oriented lesson to be learned from Swing is the potentially
random access of one object from different contexts. The vision of a frame-
work for real objects is analogous. A RealObject is envisioned as the pla-
 
Search WWH ::




Custom Search