osmformat.lisp 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169
  1. (cl:eval-when (:execute :compile-toplevel :load-toplevel)
  2. (cl:unless (cl:find-package "OSMPBF")
  3. (cl:defpackage OSMPBF (:use))))
  4. (cl:in-package "OSMPBF")
  5. (cl:export '(HEADER-BLOCK
  6. BBOX
  7. REQUIRED-FEATURES
  8. OPTIONAL-FEATURES
  9. WRITINGPROGRAM
  10. SOURCE
  11. OSMOSIS-REPLICATION-TIMESTAMP
  12. OSMOSIS-REPLICATION-SEQUENCE-NUMBER
  13. OSMOSIS-REPLICATION-BASE-URL
  14. HEADER-B-BOX
  15. LEFT
  16. RIGHT
  17. TOP
  18. BOTTOM
  19. PRIMITIVE-BLOCK
  20. STRINGTABLE
  21. PRIMITIVEGROUP
  22. GRANULARITY
  23. LAT-OFFSET
  24. LON-OFFSET
  25. DATE-GRANULARITY
  26. PRIMITIVE-GROUP
  27. NODES
  28. DENSE
  29. WAYS
  30. RELATIONS
  31. CHANGESETS
  32. STRING-TABLE
  33. S
  34. INFO
  35. VERSION
  36. TIMESTAMP
  37. CHANGESET
  38. UID
  39. USER-SID
  40. VISIBLE
  41. DENSE-INFO
  42. CHANGE-SET
  43. ID
  44. NODE
  45. KEYS
  46. VALS
  47. LAT
  48. LON
  49. DENSE-NODES
  50. DENSEINFO
  51. KEYS-VALS
  52. WAY
  53. REFS
  54. RELATION
  55. ROLES-SID
  56. MEMIDS
  57. TYPES))
  58. (proto:define-schema osmformat
  59. (:package "OSMPBF"
  60. :lisp-package "OSMPBF"
  61. :options (:java_package "crosby.binary"))
  62. (proto:define-message header-block
  63. (:conc-name ""
  64. :source-location (#P"/home/enikesha-ssd/dev/lisp/ocm/osmformat.proto" 2255 2266))
  65. ((bbox 1) :type (common-lisp:or common-lisp:null header-b-box))
  66. ((required-features 4) :type (protobufs:list-of common-lisp:string))
  67. ((optional-features 5) :type (protobufs:list-of common-lisp:string))
  68. ((writingprogram 16) :type (common-lisp:or common-lisp:null
  69. common-lisp:string))
  70. ((source 17) :type (common-lisp:or common-lisp:null common-lisp:string))
  71. ((osmosis-replication-timestamp 32) :type (common-lisp:or common-lisp:null
  72. protobufs:int64))
  73. ((osmosis-replication-sequence-number 33) :type (common-lisp:or
  74. common-lisp:null
  75. protobufs:int64))
  76. ((osmosis-replication-base-url 34) :type (common-lisp:or common-lisp:null
  77. common-lisp:string)))
  78. (proto:define-message header-b-box
  79. (:conc-name ""
  80. :source-location (#P"/home/enikesha-ssd/dev/lisp/ocm/osmformat.proto" 3227 3237))
  81. ((left 1) :type protobufs:sint64)
  82. ((right 2) :type protobufs:sint64)
  83. ((top 3) :type protobufs:sint64)
  84. ((bottom 4) :type protobufs:sint64))
  85. (proto:define-message primitive-block
  86. (:conc-name ""
  87. :source-location (#P"/home/enikesha-ssd/dev/lisp/ocm/osmformat.proto" 3516 3530))
  88. ((stringtable 1) :type string-table)
  89. ((primitivegroup 2) :type (protobufs:list-of primitive-group))
  90. ((granularity 17) :type (common-lisp:or common-lisp:null protobufs:int32) :default 100)
  91. ((lat-offset 19) :type (common-lisp:or common-lisp:null protobufs:int64) :default 0)
  92. ((lon-offset 20) :type (common-lisp:or common-lisp:null protobufs:int64) :default 0)
  93. ((date-granularity 18) :type (common-lisp:or common-lisp:null
  94. protobufs:int32) :default 1000))
  95. (proto:define-message primitive-group
  96. (:conc-name ""
  97. :source-location (#P"/home/enikesha-ssd/dev/lisp/ocm/osmformat.proto" 4248 4262))
  98. ((nodes 1) :type (protobufs:list-of node))
  99. ((dense 2) :type (common-lisp:or common-lisp:null dense-nodes))
  100. ((ways 3) :type (protobufs:list-of way))
  101. ((relations 4) :type (protobufs:list-of relation))
  102. ((changesets 5) :type (protobufs:list-of change-set)))
  103. (proto:define-message string-table
  104. (:conc-name ""
  105. :source-location (#P"/home/enikesha-ssd/dev/lisp/ocm/osmformat.proto" 4627 4638))
  106. ((s 1) :type (protobufs:list-of protobufs:byte-vector)))
  107. (proto:define-message info
  108. (:conc-name ""
  109. :source-location (#P"/home/enikesha-ssd/dev/lisp/ocm/osmformat.proto" 4743 4747))
  110. ((version 1) :type (common-lisp:or common-lisp:null protobufs:int32) :default -1)
  111. ((timestamp 2) :type (common-lisp:or common-lisp:null protobufs:int64))
  112. ((changeset 3) :type (common-lisp:or common-lisp:null protobufs:int64))
  113. ((uid 4) :type (common-lisp:or common-lisp:null protobufs:int32))
  114. ((user-sid 5) :type (common-lisp:or common-lisp:null protobufs:uint32))
  115. ((visible 6) :type (common-lisp:or common-lisp:null common-lisp:boolean)))
  116. (proto:define-message dense-info
  117. (:conc-name ""
  118. :source-location (#P"/home/enikesha-ssd/dev/lisp/ocm/osmformat.proto" 5557 5566))
  119. ((version 1) :type (protobufs:list-of protobufs:int32) :packed common-lisp:t)
  120. ((timestamp 2) :type (protobufs:list-of protobufs:sint64) :packed common-lisp:t)
  121. ((changeset 3) :type (protobufs:list-of protobufs:sint64) :packed common-lisp:t)
  122. ((uid 4) :type (protobufs:list-of protobufs:sint32) :packed common-lisp:t)
  123. ((user-sid 5) :type (protobufs:list-of protobufs:sint32) :packed common-lisp:t)
  124. ((visible 6) :type (protobufs:list-of common-lisp:boolean) :packed common-lisp:t))
  125. (proto:define-message change-set
  126. (:conc-name ""
  127. :source-location (#P"/home/enikesha-ssd/dev/lisp/ocm/osmformat.proto" 6510 6519))
  128. ((id 1) :type protobufs:int64))
  129. (proto:define-message node
  130. (:conc-name ""
  131. :source-location (#P"/home/enikesha-ssd/dev/lisp/ocm/osmformat.proto" 6891 6895))
  132. ((id 1) :type protobufs:sint64)
  133. ((keys 2) :type (protobufs:list-of protobufs:uint32) :packed common-lisp:t)
  134. ((vals 3) :type (protobufs:list-of protobufs:uint32) :packed common-lisp:t)
  135. ((info 4) :type (common-lisp:or common-lisp:null info))
  136. ((lat 8) :type protobufs:sint64)
  137. ((lon 9) :type protobufs:sint64))
  138. (proto:define-message dense-nodes
  139. (:conc-name ""
  140. :source-location (#P"/home/enikesha-ssd/dev/lisp/ocm/osmformat.proto" 7591 7601))
  141. ((id 1) :type (protobufs:list-of protobufs:sint64) :packed common-lisp:t)
  142. ((denseinfo 5) :type (common-lisp:or common-lisp:null dense-info))
  143. ((lat 8) :type (protobufs:list-of protobufs:sint64) :packed common-lisp:t)
  144. ((lon 9) :type (protobufs:list-of protobufs:sint64) :packed common-lisp:t)
  145. ((keys-vals 10) :type (protobufs:list-of protobufs:int32) :packed common-lisp:t))
  146. (proto:define-message way
  147. (:conc-name ""
  148. :source-location (#P"/home/enikesha-ssd/dev/lisp/ocm/osmformat.proto" 8020 8023))
  149. ((id 1) :type protobufs:int64)
  150. ((keys 2) :type (protobufs:list-of protobufs:uint32) :packed common-lisp:t)
  151. ((vals 3) :type (protobufs:list-of protobufs:uint32) :packed common-lisp:t)
  152. ((info 4) :type (common-lisp:or common-lisp:null info))
  153. ((refs 8) :type (protobufs:list-of protobufs:sint64) :packed common-lisp:t))
  154. (proto:define-message relation
  155. (:conc-name ""
  156. :source-location (#P"/home/enikesha-ssd/dev/lisp/ocm/osmformat.proto" 8266 8274))
  157. (proto:define-enum member-type
  158. (:source-location (#P"/home/enikesha-ssd/dev/lisp/ocm/osmformat.proto" 8284 8294))
  159. (node 0)
  160. (way 1)
  161. (relation 2))
  162. ((id 1) :type protobufs:int64)
  163. ((keys 2) :type (protobufs:list-of protobufs:uint32) :packed common-lisp:t)
  164. ((vals 3) :type (protobufs:list-of protobufs:uint32) :packed common-lisp:t)
  165. ((info 4) :type (common-lisp:or common-lisp:null info))
  166. ((roles-sid 8) :type (protobufs:list-of protobufs:int32) :packed common-lisp:t)
  167. ((memids 9) :type (protobufs:list-of protobufs:sint64) :packed common-lisp:t)
  168. ((types 10) :type (protobufs:list-of member-type) :packed common-lisp:t)))