aboutsummaryrefslogtreecommitdiff
path: root/man/man7/map.html
blob: 1ebdfbba22e20e56c1e1145ea25d907449fe9d4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
<head>
<title>map(7) - Plan 9 from User Space</title>
<meta content="text/html; charset=utf-8" http-equiv=Content-Type>
</head>
<body bgcolor=#ffffff>
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=10><td>
<tr><td width=20><td>
<tr><td width=20><td><b>MAP(7)</b><td align=right><b>MAP(7)</b>
<tr><td width=20><td colspan=2>
    <br>
<p><font size=+1><b>NAME     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    map &ndash; digitized map formats<br>
    
</table>
<p><font size=+1><b>DESCRIPTION     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    Files used by <a href="../man7/map.html"><i>map</i>(7)</a> are a sequence of structures of the form:
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    <tt><font size=+1>struct {<br>
    
    <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

        signed char patchlatitude;<br>
        signed char patchlongitude;<br>
        short n;<br>
        union {<br>
         
        <table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

            struct {<br>
              short latitude;<br>
              short longitude;<br>
             } point[n];<br>
             struct {<br>
              short latitude;<br>
              short longitude;<br>
              struct {<br>
               signed char latdiff;<br>
               signed char londiff;<br>
              } point[&ndash;n];<br>
             } highres;<br>
            
        </table>
        } segment;<br>
        
    </table>
    };<br>
    </font></tt>where <tt><font size=+1>short</font></tt> stands for 16-bit integers and there is no padding
    within or between <tt><font size=+1>structs</font></tt>. Shorts are stored in little-endian
    order, low byte first. To assure portability, <i>map</i> accesses them
    bytewise. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    Fields <tt><font size=+1>patchlatitude</font></tt> and <tt><font size=+1>patchlongitude</font></tt> tell to what 10-degree
    by 10-degree patch of the earth&#8217;s surface a segment belongs. Their
    values range from &ndash;9 to 8 and from &ndash;18 to 17, respectively, and
    indicate the coordinates of the southeast corner of the patch
    in units of 10 degrees. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    Each segment of |<tt><font size=+1>n</font></tt>| points is connected; consecutive segments
    are not necessarily related. Latitude and longitude are measured
    in units of 0.0001 radian. If <tt><font size=+1>n</font></tt> is negative, then differences
    to the first and succeeding points are measured in units of 0.00001
    radian. Latitude is counted positive to the north and longitude
    positive to the west. 
    <table border=0 cellpadding=0 cellspacing=0><tr height=5><td></table>
    
    The patches are ordered lexicographically by <tt><font size=+1>patchlatitude</font></tt> then
    <tt><font size=+1>patchlongitude</font></tt>. A printable index to the first segment of each
    patch in a file named <i>data</i> is kept in an associated file named
    <i>data</i><tt><font size=+1>.x</font></tt>. Each line of an index file contains <tt><font size=+1>patchlatitude, patchlongitude</font></tt>
    and the byte position of the
    patch in the map file. Both the map file and the index file are
    ordered by patch latitude and longitude.<br>
    
</table>
<p><font size=+1><b>SEE ALSO     </b></font><br>

<table border=0 cellpadding=0 cellspacing=0><tr height=2><td><tr><td width=20><td>

    <a href="../man7/map.html"><i>map</i>(7)</a><br>
    The data comes from the World Data Bank I and II and U.S. Government
    sources: the Census Bureau, Geological Survey, and CIA.<br>
    
</table>

<td width=20>
<tr height=20><td>
</table>
<!-- TRAILER -->
<table border=0 cellpadding=0 cellspacing=0 width=100%>
<tr height=15><td width=10><td><td width=10>
<tr><td><td>
<center>
<a href="../../"><img src="../../dist/spaceglenda100.png" alt="Space Glenda" border=1></a>
</center>
</table>
<!-- TRAILER -->
</body></html>