The present invention relates to a map drawing device that draws a map while causing a transition between a spherical object and a planar map which the map drawing device draws by using a vector map.
Conventionally, various methods for projecting the earth which is spherical onto a plane to generate a map are known. A problem is, however, that when the earth is projected onto a plane, an error occurs between the earth and a map on the plane. For example, in the case of Mercator projection which serves as the base of maps which we see most frequently, the map is expressed as a map in an area having a high latitude is distorted.
By the way, a function of displaying a spherical earth as a map having a small scale which makes it possible for the entire earth to be seen, and displaying a planar map which is drawn by using a vector map in the case of other scales is required of car navigation systems in recent years. A problem is, however, that because an error exists between the earth and the planar map, as described above, when switching between the earth and the planar map according to a scale change, the appearance of the map changes a lot and a feeling that something is abnormal is provided for the user.
In order to solve this problem, the patent reference 1 discloses a technique of making a transition between an earth object, which consists of a polygon, and a planar map, which is obtained by projecting the earth onto a plane by using a stereographic cylindrical projection, by using an animation.
Patent reference 1: Japanese Unexamined Patent Application Publication No. 2009-59099
However, although the technique of making a transition between an earth object, which consists of a polygon, and a planar map, which is obtained by projecting the earth onto a plane by using a stereographic cylindrical projection is disclosed in above-mentioned patent reference 1, no reference is made about a technique of making a transition between an earth object and a planar maps which is drawn by using a vector map. Therefore, the technique disclosed by patent reference 1 cannot implement the function required of car navigation systems.
The present invention is made in order to solve this problem, and it is therefore an object of the present invention to provide a map drawing device that can make a transition between an earth object which consists of a polygon and a planar map which is drawn by using a vector map without providing a feeling that something is abnormal.
In accordance with the present invention, there is provided a map drawing device including: a map data acquirer that acquires map data; a parcel aspect ratio calculator that calculates an aspect ratio of parcels which can minimize a difference between a map in a case of drawing a spherical object from an arbitrary eyepoint on the basis of the map data acquired by the map data acquirer, and a planar map; a polygon generator that generates a polygon for drawing an intermediate map between an earth object and a planar map on the basis of the aspect ratio of parcels which is calculated by the parcel aspect ratio calculator; and a drawer that draws the intermediate map on the basis of the polygon generated by the polygon generator.
Because the map drawing device in accordance with the present invention makes a transition between the earth object which consists of a polygon and the planar map which is drawn by using a vector map by making the intermediate map, which can minimize the difference between the spherical object and the planar map, intervene, the map drawing device can make a transition between the earth object and the planar map without providing a feeling that something is abnormal.
Hereafter, the preferred embodiments of the present invention will be explained in detail with reference to the drawings.
The map database 1 stores map data. Map data stored in this map database 1 are read by the map data acquirer 3.
The controller 2 determines parameters necessary for map drawing, such as a range for drawing and a display scale, according to an input from outside the map drawing device. The parameters determined by this controller 2 are sent to the map data acquirer 3.
The map data acquirer 3 acquires necessary map data indicated by the parameters sent thereto from the controller 2 from the map database 1. This map data acquired by the map data acquirer 3 is sent to the parcel aspect ratio calculator 4 and the polygon generator 5.
The parcel aspect ratio calculator 4 calculates an aspect ratio of parcels serving as a reference, concretely, parcels which can minimize a difference between a map at the time of drawing a spherical object from an arbitrary eyepoint, and a planar map on the basis of the map data sent thereto from the map data acquirer 3. This parcel aspect ratio calculated by the parcel aspect ratio calculator 4 is sent to the polygon generator 5.
The polygon generator 5 generates a polygon for map drawing on the basis of both the map data sent thereto from the map data acquirer 3, and the parcel aspect ratio sent thereto from the parcel aspect ratio calculator 4, and sends the polygon to the drawer 10. This polygon generator 5 includes the spherical polygon coordinate calculator 6, the planar polygon coordinate calculator 7, and the intermediate polygon coordinate calculator 8.
The spherical polygon coordinate calculator 6 calculates the coordinates of each vertex of each polygon which constructs an earth object, and sends the vertex coordinates to the intermediate polygon coordinate calculator 8. The planar polygon coordinate calculator 7 calculates the coordinates of each vertex of each polygon which constructs a planar map, and sends the vertex coordinates to the intermediate polygon coordinate calculator 8.
The intermediate polygon coordinate calculator 8 calculates the vertex coordinates of a polygon (referred to as “polygon coordinates” from here on) which constructs an intermediate map between the earth object and the planar map on the basis of both the vertex coordinates sent thereto from the spherical polygon coordinate calculator 6, and the vertex coordinates sent thereto from the planar polygon coordinate calculator 7. These polygon coordinates calculated by the intermediate polygon coordinate calculator 8 are sent, as a polygon for drawing the intermediate map, to the eyepoint position calculator 9 and the drawer 10.
The eyepoint position calculator 9 calculates an eyepoint position parameter showing an eyepoint position at the time of drawing the intermediate map during a transition on the basis of the polygon sent thereto from the polygon generator 5, and sends the eyepoint position parameter to the drawer 10.
The drawer 10 draws the intermediate map between the earth object and the planar map by using both the polygon which is sent thereto from the polygon generator 5 and which constructs the intermediate map, and the eyepoint position parameter sent thereto from the eyepoint position calculator 9.
Next, the operation of the map drawing device in accordance with Embodiment 1 configured as above will be explained. First, the controller 2 determines the parameters necessary for map drawing, such as a range for drawing and a display scale, according to the input from outside the map drawing device, and sends the parameters to the map data acquirer 3.
The map data acquirer 3 which has received the parameters from the controller 2 acquires necessary map data from the map database 1 according to the parameters, and sends the map data to the parcel aspect ratio calculator 4 and the polygon generator 5. It is assumed that the map data acquired from the map database 1 include image data for mapping onto the polygon which constructs the earth object, and vector data in which a vector map for drawing the planar map is described. It is further assumed that the vector map for drawing the planar map is partitioned into rectangles called parcels.
The parcel aspect ratio calculator 4 which has received the map data from the map data acquirer 3 calculates the parcel aspect ratio of the planar map to which the spherical object is made to make a transition, i.e., the planar map which is to be drawn by using the vector map, on the basis of the map data, and sends the parcel aspect ratio to the polygon generator 5.
Hereafter, a method of drawing the planar map by using the vector map which is partitioned into parcels will be explained. Map data partitioned into parcels is the one in which a map (map whose aspect ratio is a non-square one), as shown in
However, in the case of a map in which the earth is partitioned into map parts by latitude and longitude, because the earth is spherical, the aspect ratios of map parts differ from each other when their latitudes differ from each other. More specifically, as shown in A and B of
However, when a different aspect ratio is set to each of the parcels, because parcel boundaries become discontinuous, the aspect ratio of a representative point is determined and its value is used. When the pixel coordinates of a target screen to be drawn are expressed by W, conversion from the coordinates of each parcel map can be expressed by the following equations (1).
In these equations, win_abs_ratio is the ratio of the pixel coordinates and absolute normalized coordinates, xyratio is the parcel aspect ratio of the representative point, P is the parcel coordinates, ParcelLB is the absolute normalized coordinates of the lower left corner of each parcel, dispCenterAbs is a display center expressed as absolute normalized coordinates, and dispCenterWin is the display center expressed as pixel coordinates.
In the parcel aspect ratio calculator 4, the aspect ratio which is used in this calculator is calculated. This parcel aspect ratio can be determined from the latitude lat of the representative point according to the following equation (2). By using, as this representative point, the current display center, the difference between the map at the time of drawing the spherical object from an arbitrary eyepoint and the planar map can be minimized.
xyratio=cos(lat) (2)
The polygon generator 5 which has received the parcel aspect ratio from the parcel aspect ratio calculator 4 while receiving the map data from the map data acquirer 3 generates a polygon for map drawing on the basis of these map data and parcel aspect ratio. A concrete operation is performed as follows.
First, the spherical polygon coordinate calculator 6 of the polygon generator 5 calculates the coordinates of each vertex of each polygon which constructs the earth object. The coordinate system of a polygon which constructs the earth object is set up in such a way that, as shown in
In these equations, n is an index of each of positions which are acquired by dividing the latitude lines into equal parts along a direction from 90 degrees south toward 90 degrees north, as shown in
Further, assuming that the lower left corner of a texture image shown in
On the other hand, the planar polygon coordinate calculator 7 of the polygon generator 5 calculates the coordinates of each vertex of each polygon which constructs the planar map. The coordinate system of a polygon which constructs the planar map is set up in such a way that, as shown in
(pxnm,pynm,pznm)=(θn,φm,1) (5)
When the coordinates of each vertex of each polygon which constructs the earth object and the coordinates of each vertex of each polygon which constructs the planar map are calculated in this way, the intermediate polygon coordinate calculator 8 of the polygon generator 5 then calculates the polygon coordinates which construct an intermediate map between the earth object and the planar map on the basis of both the vertex coordinates from the spherical polygon coordinate calculator 6, and the vertex coordinates from the planar polygon coordinate calculator 7. This process will be explained with reference to a flow chart shown in
First, the vertex coordinates of a polygon which constructs the planar map are corrected by using the parcel aspect ratio (step ST11). As shown in the above-mentioned equation (5), the vertices of the polygon which constructs the planar map have a square ratio of the X-direction to the Y-direction. Therefore, the intermediate polygon coordinate calculator 8 determines the vertex coordinates P′(px′, py′, pz′) corrected according to the following equation (6) by using the parcel aspect ratio sent thereto from the parcel aspect ratio calculator 4.
(px′mn,py′mn,pz′mn)=(xyratio×,pxmn,pymn,1) (6)
The coordinates of each vertex of each polygon which constructs the planar map are then corrected in such a way that the point of origin becomes the display center (step ST12). At that time, when the x-coordinates of the polygon do not fall within a range of ±(180×xyratio) degrees with respect to the corrected center, as shown in
The corrected planar map is then corrected onto the tangent plane at the point of intersection of the line of sight and the earth object (step ST13). Because the planar map is the tangent plane at (0, 0, z) of the earth object, i.e., the tangent plane in the case of defining the position of zero degrees longitude and zero degrees latitude as the eyepoint, the tangent plane at the point of intersection of the line of sight and the earth object can be determined by rotating the planar map by using the longitude and latitude values at the display center. Each vertex P′(px′, py′, pz′) which constructs the tangent plane rotated can be determined according to the following equation (8).
After that, an intermediate map between the earth object and the planar map on the tangent plane is generated (step ST14). In order to generate this intermediate map, the intermediate polygon coordinate calculator 8 calculates a difference value D(dx, dy, dz) between each vertex of each polygon which constructs the earth object, and each vertex of each polygon which constructs the planar map on the tangent plane first according to the following equation (9).
The intermediate polygon coordinate calculator 8 then determines the coordinates of each vertex of each polygon of the intermediate map by adding the calculated difference value to the coordinates of each vertex of each polygon which constructs the earth object according to a time t during the transition. When a transition time is expressed by T, the coordinates M(mx, my, mz) of each vertex of each polygon of the intermediate map can also be determined according to the following equation (10).
On the other hand, the eyepoint position calculator 9 calculates an eyepoint position parameter showing the eyepoint position at the time of drawing the intermediate map during the transition on the basis of the polygon from the polygon generator 5, and sends the eyepoint position parameter to the drawer 10. It is desirable that the earth object is drawn by using a perspective projection because the earth object is a three-dimensional map, and the planar map is drawn by using a parallel projection because the planar map is a two-dimensional map. Therefore, it is necessary to change the projection method gradually during the transition. To this end, as shown in
When moving from an eyepoint 1 shown in
What is needed in order to bring the appearance in the case of the perspective projection close to that in the case of the parallel projection is just to bring the angle of view close to 0, as shown in
As a result, the visual object distance L in the case of a combination with the scale change can be determined according to the following equation (15), which is acquired by combining the equations (13) and (14).
The drawer 10 which has received both the polygon which constructs the intermediate map shown by the polygon coordinates from the polygon generator 5 and the eyepoint position parameter determined by the eyepoint position calculator 9, after the above-mentioned process, performs three-dimensional drawing by using both these polygon and eyepoint position parameter, the polygon constructing the intermediate map. As a result, the intermediate map during the process of making a transition between the earth object and the planar map can be drawn.
As previously explained, because the map drawing device in accordance with Embodiment 1 includes the parcel aspect ratio calculator 4 and the polygon generator 5, and generates an intermediate map between an earth object and a planar map by using an aspect ratio which can minimize a difference between a map at the time of drawing a spherical object from an arbitrary eyepoint and the planar map, the map drawing device can make a transition between the earth object and the planar map without providing a feeling that something is abnormal. The map drawing device further includes the eyepoint position calculator 9, determines an eyepoint position parameter showing an eyepoint position which makes it possible to perform a scale change while changing a projection method continuously, and generates the intermediate map by using this eyepoint position parameter, the map drawing device can make a transition between the earth object and the planar map while performing a scale change without providing a feeling that something is abnormal.
While the invention has been described in its preferred embodiment, it is to be understood that various changes can be made in an arbitrary component according to the embodiment, and an arbitrary component according to the embodiment can be omitted within the scope of the invention.
Because the map drawing device in accordance with the present invention makes it possible to make a transition between an earth object which consists of a polygon, and a planar map which is drawn by using a vector map, errors occurring between the earth and the planar map can be reduced. As a result, because the appearance of the map does not change a lot when switching between the earth and the planar map according to a scale change, the map drawing device in accordance with the present invention does not provide the user with a feeling that something is abnormal, and is suitable for a map display which is produced in a car navigation system or a portable device.
1 map database, 2 controller, 3 map data acquirer, 4 parcel aspect ratio calculator, 5 polygon generating part, 6 spherical polygon coordinate calculator, 7 planar polygon coordinate calculator, 8 intermediate polygon coordinate calculator, 9 eyepoint position calculator, and 10 drawer.
Filing Document | Filing Date | Country | Kind |
---|---|---|---|
PCT/JP13/53708 | 2/15/2013 | WO | 00 |