forked from postgis/postgis
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbnf-wkb.txt
403 lines (314 loc) · 13.5 KB
/
bnf-wkb.txt
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
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
<well-known binary representation> ::=
<well-knownzm binary representation> |
<well-knownz binary representation> |
<well-knownm binary representation> |
<well-known2d binary representation>
<well-knownzm binary representation> ::=
<pointzm binary representation> |
<curvezm binary representation> |
<surfacezm binary representation> |
<collectionzm binary representation>
<well-knownz binary representation> ::=
<pointz binary representation> |
<curvez binary representation> |
<surfacez binary representation> |
<collectionz binary representation>
<well-knownm binary representation> ::=
<pointm binary representation> |
<curvem binary representation> |
<surfacem binary representation> |
<collectionm binary representation>
<well-known2d binary representation> ::=
<point binary representation> |
<curve binary representation> |
<surface binary representation> |
<collection binary representation>
<pointzm binary representation> ::=
<byte order> <wkbpointzm> <wkbpointzm binary>
<pointz binary representation> ::=
<byte order> <wkbpointz> <wkbpointz binary>
<pointm binary representation> ::=
<byte order> <wkbpointm> <wkbpointm binary>
<point binary representation> ::=
<byte order> <wkbpoint> <wkbpoint binary>
<curvezm binary representation> ::=
<linestringzm binary representation> |
<circularstringzm binary representation> |
<compoundcurvezm binary representation>
<curvez binary representation> ::=
<linestringz binary representation> |
<circularstringz binary representation> |
<compoundcurvez binary representation>
<curvem binary representation> ::=
<linestringm binary representation> |
<circularstringm binary representation> |
<compoundcurvem binary representation>
<curve binary representation> ::=
<linestring binary representation> |
<circularstring binary representation> |
<compoundcurve binary representation>
<linestringzm binary representation> ::=
<byte order> <wkblinestringzm> <num> <wkbpointzm binary>
<linestringz binary representation> ::=
<byte order> <wkblinestringz> <num> <wkbpointz binary>
<linestringm binary representation> ::=
<byte order> <wkblinestringm> <num> <wkbpointm binary>
<linestring binary representation> ::=
<byte order> <wkblinestring> <num> <wkbpoint binary>
<circularstringzm binary representation> ::=
<byte order> <wkbcircularstringzm> <num> <wkbpointzm binary>
<circularstringz binary representation> ::=
<byte order> <wkbcircularstringz> <num> <wkbpointz binary>
<circularstringm binary representation> ::=
<byte order> <wkbcircularstringm> <num> <wkbpointm binary>
<circularstring binary representation> ::=
<byte order> <wkbcircularstring> <num> <wkbpoint binary>
<compoundcurvezm binary representation> ::=
<byte order> <wkbcompoundcurvezm> <num> <wkbcurvezm binary>
<compoundcurvez binary representation> ::=
<byte order> <wkbcompoundcurvez> <num> <wkbcurvez binary>
<compoundcurvem binary representation> ::=
<byte order> <wkbcompoundcurvem> <num> <wkbcurvem binary>
<compoundcurve binary representation> ::=
<byte order> <wkbcompoundcurve> <num> <wkbcurve binary>
<surfacezm binary representation> ::=
<curvezmpolygonzm binary representation>
<surfacez binary representation> ::=
<curvepolygonz binary representation>
<surfacem binary representation> ::=
<curvepolygonm binary representation>
<surface binary representation> ::=
<curvepolygon binary representation>
<curvepolygonzm binary representation> ::=
<byte order> <wkbcurvepolygonzm> <num> <wkbringzm binary> |
<polygonzm binary representation> |
<trianglezm binary representation>
<curvepolygonz binary representation> ::=
<byte order> <wkbcurvepolygonz> <num> <wkbringz binary> |
<polygonz binary representation> |
<trianglez binary representation>
<curvepolygonm binary representation> ::=
<byte order> <wkbcurvepolygonm> <num> <wkbringm binary> |
<polygonm binary representation> |
<trianglem binary representation>
<curvepolygon binary representation> ::=
<byte order> <wkbcurvepolygon> <num> <wkbring binary> |
<polygon binary representation> |
<triangle binary representation>
<polygonzm binary representation> ::=
<byte order> <wkbpolygonzm> <num> <wkblinearringzm binary>
<polygonz binary representation> ::=
<byte order> <wkbpolygonz> <num> <wkblinearringz binary>
<polygonm binary representation> ::=
<byte order> <wkbpolygonm> <num> <wkblinearringm binary>
<polygon binary representation> ::=
<byte order> <wkbpolygon> <num> <wkblinearring binary>
<trianglezm binary representation> ::=
<byte order> <wkbtrianglezm> <num> <wkblinearringzm binary>
<trianglem binary representation> ::=
<byte order> <wkbtrianglem> <num> <wkblinearringm binary>
<trianglez binary representation> ::=
<byte order> <wkbtrianglez> <num> <wkblinearringz binary>
<triangle binary representation> ::=
<byte order> <wkbtriangle> <num> <wkblinearring binary>
<collectionzm binary representation> ::=
<multipointzm binary representation> |
<multicurvezm binary representation> |
<multisurfacezm binary representation> |
<geometrycollectionzm binary representation>
<collectionz binary representation> ::=
<multipointz binary representation> |
<multicurvez binary representation> |
<multisurfacez binary representation> |
<geometrycollectionz binary representation>
<collectionm binary representation> ::=
<multipointm binary representation> |
<multicurvem binary representation> |
<multisurfacem binary representation> |
<geometrycollectionm binary representation>
<collection binary representation> ::=
<multipoint binary representation> |
<multicurve binary representation> |
<multisurface binary representation> |
<geometrycollection binary representation>
<multipointzm binary representation> ::=
<byte order> <wkbmultipointzm> <num> <pointzm binary representation>
<multipointz binary representation> ::=
<byte order> <wkbmultipointz> <num> <pointz binary representation>
<multipointm binary representation> ::=
<byte order> <wkbmultipointm> <num> <pointm binary representation>
<multipoint binary representation> ::=
<byte order> <wkbmultipoint> <num> <point binary representation>
<multicurvezm binary representation> ::=
<byte order> <wkbmulticurvezm> <num> <curvezm binary representation> |
<multilinestringzm binary representation>
<multicurvez binary representation> ::=
<byte order> <wkbmulticurvez> <num> <curvez binary representation> |
<multilinestringz binary representation>
<multicurvem binary representation> ::=
<byte order> <wkbmulticurvem> <num> <curvem binary representation> |
<multilinestringm binary representation>
<multicurve binary representation> ::=
<byte order> <wkbmulticurve> <num> <curve binary representation> |
<multilinestring binary representation>
<multilinestringzm binary representation> ::=
<byte order> <wkbmultilinestringzm> <num> <linestringzm binary representation>
<multilinestringz binary representation> ::=
<byte order> <wkbmultilinestringz> <num> <linestringz binary representation>
<multilinestringm binary representation> ::=
<byte order> <wkbmultilinestringm> <num> <linestringm binary representation>
<multilinestring binary representation> ::=
<byte order> <wkbmultilinestring> <num> <linestring binary representation>
<multisurfacezm binary representation> ::=
<byte order> <wkbmultisurfacezm> <num> <surfacezm binary representation> |
<multipolygonzm binary representation> |
<tinzm binary representation>
<multisurfacez binary representation> ::=
<byte order> <wkbmultisurfacez> <num> <surfacez binary representation> |
<multipolygonz binary representation> |
<tinz binary representation>
<multisurfacem binary representation> ::=
<byte order> <wkbmultisurfacem> <num> <surfacem binary representation> |
<multipolygonm binary representation> |
<tinm binary representation>
<multisurface binary representation> ::=
<byte order> <wkbmultisurface> <num> <surface binary representation> |
<multipolygon binary representation> |
<tin binary representation>
<multipolygonzm binary representation> ::=
<byte order> <wkbmultipolygonzm> <num> <polygonzm binary representation>
<multipolygonz binary representation> ::=
<byte order> <wkbmultipolygonz> <num> <polygonz binary representation>
<multipolygonm binary representation> ::=
<byte order> <wkbmultipolygonm> <num> <polygonm binary representation>
<multipolygon binary representation> ::=
<byte order> <wkbmultipolygon> <num> <polygon binary representation>
<polyhedralsurfacezm binary representation> ::=
<byte order> <wkbpolyhedralsurfacezm> <num> <polygonzm binary representation>
<polyhedralsurfacez binary representation> ::=
<byte order> <wkbpolyhedralsurfacez> <num> <polygonz binary representation>
<polyhedralsurfacem binary representation> ::=
<byte order> <wkbpolyhedralsurfacem> <num> <polygonm binary representation>
<polyhedralsurface binary representation> ::=
<byte order> <wkbpolyhedralsurface> <num> <polygon binary representation>
<tinzm binary representation> ::=
<byte order> <wkbtinzm> <num> <trianglezm binary representation>
<tinz binary representation> ::=
<byte order> <wkbtinz> <num> <trianglez binary representation>
<tinm binary representation> ::=
<byte order> <wkbtinm> <num> <trianglem binary representation>
<tin binary representation> ::=
<byte order> <wkbtin> <num> <triangle binary representation>
<geometrycollectionzm binary representation> ::=
<byte order> <wkbgeometrycollectionzm> <num> <well-knownzm binary representation>
<geometrycollectionz binary representation> ::=
<byte order> <wkbgeometrycollectionz> <num> <well-knownz binary representation>
<geometrycollectionm binary representation> ::=
<byte order> <wkbgeometrycollectionm> <num> <well-knownm binary representation>
<geometrycollection binary representation> ::=
<byte order> <wkbgeometrycollection> <num> <well-known binary representation>
<wkbcurvezm binary> ::=
<linestringzm binary representation> |
<circularstringzm binary representation>
<wkbcurvez binary> ::=
<linestringz binary representation> |
<circularstringz binary representation>
<wkbcurvem binary> ::=
<linestringm binary representation> |
<circularstringm binary representation>
<wkbcurve binary> ::=
<linestring binary representation> |
<circularstring binary representation>
<wkbringzm binary> ::=
<linestringzm binary representation> |
<circularstringzm binary representation> |
<compoundcurvezm binary representation>
<wkbringz binary> ::=
<linestringz binary representation> |
<circularstringz binary representation> |
<compoundcurvez binary representation>
<wkbringm binary> ::=
<linestringm binary representation> |
<circularstringm binary representation> |
<compoundcurvem binary representation>
<wkbring binary> ::=
<linestring binary representation> |
<circularstring binary representation> |
<compoundcurve binary representation>
<wkbpointzm binary> ::= <wkbx> <wkby> <wkbz> <wkbm>
<wkbpointz binary> ::= <wkbx> <wkby> <wkbz>
<wkbpointm binary> ::= <wkbx> <wkby> <wkbm>
<wkbpoint binary> ::= <wkbx> <wkby>
<wkbx> ::= <double>
<wkby> ::= <double>
<wkbz> ::= <double>
<wkbm> ::= <double>
<num> ::= <uint32>
<wkblinearringzm> ::= <num> <wkbpointzm binary>...
<wkblinearringz> ::= <num> <wkbpointz binary>...
<wkblinearringm> ::= <num> <wkbpointm binary>...
<wkblinearring> ::= <num> <wkbpoint binary>...
<wkbpointzm> ::= 3001
<wkbpointm> ::= 2001
<wkbpointz> ::= 1001
<wkbpoint> ::= 1
<wkblinestringzm> ::= 3002
<wkblinestringm> ::= 2002
<wkblinestringz> ::= 1002
<wkblinestring> ::= 2
<wkbpolygonzm> ::= 3003
<wkbpolygonm> ::= 2003
<wkbpolygonz> ::= 1003
<wkbpolygon> ::= 3
<wkbmultipointzm> ::= 3004
<wkbmultipointm> ::= 2004
<wkbmultipointz> ::= 1004
<wkbmultipoint> ::= 4
<wkbmultilinestringzm> ::= 3005
<wkbmultilinestringm> ::= 2005
<wkbmultilinestringz> ::= 1005
<wkbmultilinestring> ::= 5
<wkbmultipolygonzm> ::= 3006
<wkbmultipolygonm> ::= 2006
<wkbmultipolygonz> ::= 1006
<wkbmultipolygon> ::= 6
<wkbgeometrycollectionzm> ::= 3007
<wkbgeometrycollectionm> ::= 2007
<wkbgeometrycollectionz> ::= 1007
<wkbgeometrycollection> ::= 7
<wkbcircularstringzm> ::= 3008
<wkbcircularstringm> ::= 2008
<wkbcircularstringz> ::= 1008
<wkbcircularstring> ::= 8
<wkbcompoundcurvezm> ::= 3009
<wkbcompoundcurvem> ::= 2009
<wkbcompoundcurvez> ::= 1009
<wkbcompoundcurve> ::= 9
<wkbcurvepolygonzm> ::= 3010
<wkbcurvepolygonm> ::= 2010
<wkbcurvepolygonz> ::= 1010
<wkbcurvepolygon> ::= 10
<wkbmulticurvezm> ::= 3011
<wkbmulticurvem> ::= 2011
<wkbmulticurvez> ::= 1011
<wkbmulticurve> ::= 11
<wkbmultisurfacezm> ::= 3012
<wkbmultisurfacem> ::= 2012
<wkbmultisurfacez> ::= 1012
<wkbmultisurface> ::= 12
<wkbpolyhedralsurfacezm> ::= 3015
<wkbpolyhedralsurfacem> ::= 2015
<wkbpolyhedralsurfacez> ::= 1015
<wkbpolyhedralsurface> ::= 15
<wkbtinzm> ::= 3016
<wkbtinm> ::= 2016
<wkbtinz> ::= 1016
<wkbtin> ::= 16
<wkbtrianglezm> ::= 3017
<wkbtrianglem> ::= 2017
<wkbtrianglez> ::= 1017
<wkbtriangle> ::= 17
<byte order> ::= <byte> !! 1 = little, 0 = big
<byte> ::= !! 8 bits byte
<uint32> ::= !! 32 bits unsigned integer
<double> ::= !! 64 bits ieee double