map 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. .TH MAP 6
  2. .SH NAME
  3. map \- digitized map formats
  4. .SH DESCRIPTION
  5. Files used by
  6. .IR map (7)
  7. are a sequence of structures of the form:
  8. .PP
  9. .EX
  10. struct {
  11. signed char patchlatitude;
  12. signed char patchlongitude;
  13. short n;
  14. union {
  15. struct {
  16. short latitude;
  17. short longitude;
  18. } point[n];
  19. struct {
  20. short latitude;
  21. short longitude;
  22. struct {
  23. signed char latdiff;
  24. signed char londiff;
  25. } point[\-n];
  26. } highres;
  27. } segment;
  28. };
  29. .EE
  30. where
  31. .B short
  32. stands for 16-bit integers and there is no padding within or between
  33. .BR structs .
  34. Shorts are stored in little-endian order, low byte first.
  35. To assure portability,
  36. .I map
  37. accesses them bytewise.
  38. .PP
  39. Fields
  40. .L patchlatitude
  41. and
  42. .L patchlongitude
  43. tell to what
  44. 10-degree by 10-degree
  45. patch of the earth's surface a segment belongs.
  46. Their values range from \-9 to 8 and from \-18 to 17,
  47. respectively, and indicate the coordinates of the
  48. southeast corner of the patch in units of 10 degrees.
  49. .PP
  50. Each segment of
  51. .RB | n |
  52. points is connected; consecutive segments
  53. are not necessarily related.
  54. Latitude and longitude
  55. are measured in units of 0.0001 radian.
  56. If
  57. .B n
  58. is negative, then
  59. differences to the first and succeeding points
  60. are measured in units of 0.00001 radian.
  61. Latitude is counted positive to the north and
  62. longitude positive to the west.
  63. .PP
  64. The patches are ordered lexicographically by
  65. .L patchlatitude
  66. then
  67. .LR patchlongitude .
  68. A printable
  69. index to the first segment of each patch
  70. in a file named
  71. .I data
  72. is kept in an associated file named
  73. .IB data .x\f1.
  74. Each line of an index file contains
  75. .L patchlatitude,
  76. .L patchlongitude
  77. and the byte position
  78. of the patch
  79. in the map file.
  80. Both the map file and the index file are ordered by
  81. patch latitude and longitude.
  82. .SH "SEE ALSO"
  83. .IR map (7)
  84. .br
  85. The data comes from the World Data Bank I and II and
  86. U.S. Government sources: the Census Bureau, Geological
  87. Survey, and CIA.