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
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
// automatically generated by the FlatBuffers compiler, do not modify

use std::cmp::Ordering;
use std::mem;

extern crate flatbuffers;
use self::flatbuffers::EndianScalar;

#[allow(unused_imports, dead_code)]
#[rustfmt::skip]
pub mod flat_geobuf {

  use std::mem;
  use std::cmp::Ordering;

  extern crate flatbuffers;
  use self::flatbuffers::EndianScalar;

#[allow(non_camel_case_types)]
#[repr(u8)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
pub enum GeometryType {
  Unknown = 0,
  Point = 1,
  LineString = 2,
  Polygon = 3,
  MultiPoint = 4,
  MultiLineString = 5,
  MultiPolygon = 6,
  GeometryCollection = 7,
  CircularString = 8,
  CompoundCurve = 9,
  CurvePolygon = 10,
  MultiCurve = 11,
  MultiSurface = 12,
  Curve = 13,
  Surface = 14,
  PolyhedralSurface = 15,
  TIN = 16,
  Triangle = 17,

}

pub const ENUM_MIN_GEOMETRY_TYPE: u8 = 0;
pub const ENUM_MAX_GEOMETRY_TYPE: u8 = 17;

impl<'a> flatbuffers::Follow<'a> for GeometryType {
  type Inner = Self;
  #[inline]
  fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
    flatbuffers::read_scalar_at::<Self>(buf, loc)
  }
}

impl flatbuffers::EndianScalar for GeometryType {
  #[inline]
  fn to_little_endian(self) -> Self {
    let n = u8::to_le(self as u8);
    let p = &n as *const u8 as *const GeometryType;
    unsafe { *p }
  }
  #[inline]
  fn from_little_endian(self) -> Self {
    let n = u8::from_le(self as u8);
    let p = &n as *const u8 as *const GeometryType;
    unsafe { *p }
  }
}

impl flatbuffers::Push for GeometryType {
    type Output = GeometryType;
    #[inline]
    fn push(&self, dst: &mut [u8], _rest: &[u8]) {
        flatbuffers::emplace_scalar::<GeometryType>(dst, *self);
    }
}

#[allow(non_camel_case_types)]
pub const ENUM_VALUES_GEOMETRY_TYPE:[GeometryType; 18] = [
  GeometryType::Unknown,
  GeometryType::Point,
  GeometryType::LineString,
  GeometryType::Polygon,
  GeometryType::MultiPoint,
  GeometryType::MultiLineString,
  GeometryType::MultiPolygon,
  GeometryType::GeometryCollection,
  GeometryType::CircularString,
  GeometryType::CompoundCurve,
  GeometryType::CurvePolygon,
  GeometryType::MultiCurve,
  GeometryType::MultiSurface,
  GeometryType::Curve,
  GeometryType::Surface,
  GeometryType::PolyhedralSurface,
  GeometryType::TIN,
  GeometryType::Triangle
];

#[allow(non_camel_case_types)]
pub const ENUM_NAMES_GEOMETRY_TYPE:[&'static str; 18] = [
    "Unknown",
    "Point",
    "LineString",
    "Polygon",
    "MultiPoint",
    "MultiLineString",
    "MultiPolygon",
    "GeometryCollection",
    "CircularString",
    "CompoundCurve",
    "CurvePolygon",
    "MultiCurve",
    "MultiSurface",
    "Curve",
    "Surface",
    "PolyhedralSurface",
    "TIN",
    "Triangle"
];

pub fn enum_name_geometry_type(e: GeometryType) -> &'static str {
  let index = e as u8;
  ENUM_NAMES_GEOMETRY_TYPE[index as usize]
}

#[allow(non_camel_case_types)]
#[repr(u8)]
#[derive(Clone, Copy, PartialEq, Eq, PartialOrd, Ord, Hash, Debug)]
pub enum ColumnType {
  Byte = 0,
  UByte = 1,
  Bool = 2,
  Short = 3,
  UShort = 4,
  Int = 5,
  UInt = 6,
  Long = 7,
  ULong = 8,
  Float = 9,
  Double = 10,
  String = 11,
  Json = 12,
  DateTime = 13,
  Binary = 14,

}

pub const ENUM_MIN_COLUMN_TYPE: u8 = 0;
pub const ENUM_MAX_COLUMN_TYPE: u8 = 14;

impl<'a> flatbuffers::Follow<'a> for ColumnType {
  type Inner = Self;
  #[inline]
  fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
    flatbuffers::read_scalar_at::<Self>(buf, loc)
  }
}

impl flatbuffers::EndianScalar for ColumnType {
  #[inline]
  fn to_little_endian(self) -> Self {
    let n = u8::to_le(self as u8);
    let p = &n as *const u8 as *const ColumnType;
    unsafe { *p }
  }
  #[inline]
  fn from_little_endian(self) -> Self {
    let n = u8::from_le(self as u8);
    let p = &n as *const u8 as *const ColumnType;
    unsafe { *p }
  }
}

impl flatbuffers::Push for ColumnType {
    type Output = ColumnType;
    #[inline]
    fn push(&self, dst: &mut [u8], _rest: &[u8]) {
        flatbuffers::emplace_scalar::<ColumnType>(dst, *self);
    }
}

#[allow(non_camel_case_types)]
pub const ENUM_VALUES_COLUMN_TYPE:[ColumnType; 15] = [
  ColumnType::Byte,
  ColumnType::UByte,
  ColumnType::Bool,
  ColumnType::Short,
  ColumnType::UShort,
  ColumnType::Int,
  ColumnType::UInt,
  ColumnType::Long,
  ColumnType::ULong,
  ColumnType::Float,
  ColumnType::Double,
  ColumnType::String,
  ColumnType::Json,
  ColumnType::DateTime,
  ColumnType::Binary
];

#[allow(non_camel_case_types)]
pub const ENUM_NAMES_COLUMN_TYPE:[&'static str; 15] = [
    "Byte",
    "UByte",
    "Bool",
    "Short",
    "UShort",
    "Int",
    "UInt",
    "Long",
    "ULong",
    "Float",
    "Double",
    "String",
    "Json",
    "DateTime",
    "Binary"
];

pub fn enum_name_column_type(e: ColumnType) -> &'static str {
  let index = e as u8;
  ENUM_NAMES_COLUMN_TYPE[index as usize]
}

pub enum ColumnOffset {}
#[derive(Copy, Clone, Debug, PartialEq)]

pub struct Column<'a> {
  pub _tab: flatbuffers::Table<'a>,
}

impl<'a> flatbuffers::Follow<'a> for Column<'a> {
    type Inner = Column<'a>;
    #[inline]
    fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
        Self {
            _tab: flatbuffers::Table { buf: buf, loc: loc },
        }
    }
}

impl<'a> Column<'a> {
    #[inline]
    pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
        Column {
            _tab: table,
        }
    }
    #[allow(unused_mut)]
    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
        args: &'args ColumnArgs<'args>) -> flatbuffers::WIPOffset<Column<'bldr>> {
      let mut builder = ColumnBuilder::new(_fbb);
      if let Some(x) = args.name { builder.add_name(x); }
      builder.add_type_(args.type_);
      builder.finish()
    }

    pub const VT_NAME: flatbuffers::VOffsetT = 4;
    pub const VT_TYPE_: flatbuffers::VOffsetT = 6;

  #[inline]
  pub fn name(&self) -> &'a str {
    self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Column::VT_NAME, None).unwrap()
  }
  #[inline]
  pub fn type_(&self) -> ColumnType {
    self._tab.get::<ColumnType>(Column::VT_TYPE_, Some(ColumnType::Byte)).unwrap()
  }
}

pub struct ColumnArgs<'a> {
    pub name: Option<flatbuffers::WIPOffset<&'a  str>>,
    pub type_: ColumnType,
}
impl<'a> Default for ColumnArgs<'a> {
    #[inline]
    fn default() -> Self {
        ColumnArgs {
            name: None, // required field
            type_: ColumnType::Byte,
        }
    }
}
pub struct ColumnBuilder<'a: 'b, 'b> {
  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> ColumnBuilder<'a, 'b> {
  #[inline]
  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Column::VT_NAME, name);
  }
  #[inline]
  pub fn add_type_(&mut self, type_: ColumnType) {
    self.fbb_.push_slot::<ColumnType>(Column::VT_TYPE_, type_, ColumnType::Byte);
  }
  #[inline]
  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> ColumnBuilder<'a, 'b> {
    let start = _fbb.start_table();
    ColumnBuilder {
      fbb_: _fbb,
      start_: start,
    }
  }
  #[inline]
  pub fn finish(self) -> flatbuffers::WIPOffset<Column<'a>> {
    let o = self.fbb_.end_table(self.start_);
    self.fbb_.required(o, Column::VT_NAME,"name");
    flatbuffers::WIPOffset::new(o.value())
  }
}

pub enum CrsOffset {}
#[derive(Copy, Clone, Debug, PartialEq)]

pub struct Crs<'a> {
  pub _tab: flatbuffers::Table<'a>,
}

impl<'a> flatbuffers::Follow<'a> for Crs<'a> {
    type Inner = Crs<'a>;
    #[inline]
    fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
        Self {
            _tab: flatbuffers::Table { buf: buf, loc: loc },
        }
    }
}

impl<'a> Crs<'a> {
    #[inline]
    pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
        Crs {
            _tab: table,
        }
    }
    #[allow(unused_mut)]
    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
        args: &'args CrsArgs<'args>) -> flatbuffers::WIPOffset<Crs<'bldr>> {
      let mut builder = CrsBuilder::new(_fbb);
      if let Some(x) = args.wkt { builder.add_wkt(x); }
      if let Some(x) = args.description { builder.add_description(x); }
      if let Some(x) = args.name { builder.add_name(x); }
      builder.add_code(args.code);
      if let Some(x) = args.org { builder.add_org(x); }
      builder.finish()
    }

    pub const VT_ORG: flatbuffers::VOffsetT = 4;
    pub const VT_CODE: flatbuffers::VOffsetT = 6;
    pub const VT_NAME: flatbuffers::VOffsetT = 8;
    pub const VT_DESCRIPTION: flatbuffers::VOffsetT = 10;
    pub const VT_WKT: flatbuffers::VOffsetT = 12;

  #[inline]
  pub fn org(&self) -> Option<&'a str> {
    self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Crs::VT_ORG, None)
  }
  #[inline]
  pub fn code(&self) -> i32 {
    self._tab.get::<i32>(Crs::VT_CODE, Some(0)).unwrap()
  }
  #[inline]
  pub fn name(&self) -> Option<&'a str> {
    self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Crs::VT_NAME, None)
  }
  #[inline]
  pub fn description(&self) -> Option<&'a str> {
    self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Crs::VT_DESCRIPTION, None)
  }
  #[inline]
  pub fn wkt(&self) -> Option<&'a str> {
    self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Crs::VT_WKT, None)
  }
}

pub struct CrsArgs<'a> {
    pub org: Option<flatbuffers::WIPOffset<&'a  str>>,
    pub code: i32,
    pub name: Option<flatbuffers::WIPOffset<&'a  str>>,
    pub description: Option<flatbuffers::WIPOffset<&'a  str>>,
    pub wkt: Option<flatbuffers::WIPOffset<&'a  str>>,
}
impl<'a> Default for CrsArgs<'a> {
    #[inline]
    fn default() -> Self {
        CrsArgs {
            org: None,
            code: 0,
            name: None,
            description: None,
            wkt: None,
        }
    }
}
pub struct CrsBuilder<'a: 'b, 'b> {
  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> CrsBuilder<'a, 'b> {
  #[inline]
  pub fn add_org(&mut self, org: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Crs::VT_ORG, org);
  }
  #[inline]
  pub fn add_code(&mut self, code: i32) {
    self.fbb_.push_slot::<i32>(Crs::VT_CODE, code, 0);
  }
  #[inline]
  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Crs::VT_NAME, name);
  }
  #[inline]
  pub fn add_description(&mut self, description: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Crs::VT_DESCRIPTION, description);
  }
  #[inline]
  pub fn add_wkt(&mut self, wkt: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Crs::VT_WKT, wkt);
  }
  #[inline]
  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> CrsBuilder<'a, 'b> {
    let start = _fbb.start_table();
    CrsBuilder {
      fbb_: _fbb,
      start_: start,
    }
  }
  #[inline]
  pub fn finish(self) -> flatbuffers::WIPOffset<Crs<'a>> {
    let o = self.fbb_.end_table(self.start_);
    flatbuffers::WIPOffset::new(o.value())
  }
}

pub enum HeaderOffset {}
#[derive(Copy, Clone, Debug, PartialEq)]

pub struct Header<'a> {
  pub _tab: flatbuffers::Table<'a>,
}

impl<'a> flatbuffers::Follow<'a> for Header<'a> {
    type Inner = Header<'a>;
    #[inline]
    fn follow(buf: &'a [u8], loc: usize) -> Self::Inner {
        Self {
            _tab: flatbuffers::Table { buf: buf, loc: loc },
        }
    }
}

impl<'a> Header<'a> {
    #[inline]
    pub fn init_from_table(table: flatbuffers::Table<'a>) -> Self {
        Header {
            _tab: table,
        }
    }
    #[allow(unused_mut)]
    pub fn create<'bldr: 'args, 'args: 'mut_bldr, 'mut_bldr>(
        _fbb: &'mut_bldr mut flatbuffers::FlatBufferBuilder<'bldr>,
        args: &'args HeaderArgs<'args>) -> flatbuffers::WIPOffset<Header<'bldr>> {
      let mut builder = HeaderBuilder::new(_fbb);
      builder.add_features_count(args.features_count);
      if let Some(x) = args.crs { builder.add_crs(x); }
      if let Some(x) = args.columns { builder.add_columns(x); }
      if let Some(x) = args.envelope { builder.add_envelope(x); }
      if let Some(x) = args.name { builder.add_name(x); }
      builder.add_index_node_size(args.index_node_size);
      builder.add_hasTM(args.hasTM);
      builder.add_hasT(args.hasT);
      builder.add_hasM(args.hasM);
      builder.add_hasZ(args.hasZ);
      builder.add_geometry_type(args.geometry_type);
      builder.finish()
    }

    pub const VT_NAME: flatbuffers::VOffsetT = 4;
    pub const VT_ENVELOPE: flatbuffers::VOffsetT = 6;
    pub const VT_GEOMETRY_TYPE: flatbuffers::VOffsetT = 8;
    pub const VT_HASZ: flatbuffers::VOffsetT = 10;
    pub const VT_HASM: flatbuffers::VOffsetT = 12;
    pub const VT_HAST: flatbuffers::VOffsetT = 14;
    pub const VT_HASTM: flatbuffers::VOffsetT = 16;
    pub const VT_COLUMNS: flatbuffers::VOffsetT = 18;
    pub const VT_FEATURES_COUNT: flatbuffers::VOffsetT = 20;
    pub const VT_INDEX_NODE_SIZE: flatbuffers::VOffsetT = 22;
    pub const VT_CRS: flatbuffers::VOffsetT = 24;

  #[inline]
  pub fn name(&self) -> Option<&'a str> {
    self._tab.get::<flatbuffers::ForwardsUOffset<&str>>(Header::VT_NAME, None)
  }
  #[inline]
  pub fn envelope(&self) -> Option<flatbuffers::Vector<'a, f64>> {
    self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<'a, f64>>>(Header::VT_ENVELOPE, None)
  }
  #[inline]
  pub fn geometry_type(&self) -> GeometryType {
    self._tab.get::<GeometryType>(Header::VT_GEOMETRY_TYPE, Some(GeometryType::Unknown)).unwrap()
  }
  #[inline]
  pub fn hasZ(&self) -> bool {
    self._tab.get::<bool>(Header::VT_HASZ, Some(false)).unwrap()
  }
  #[inline]
  pub fn hasM(&self) -> bool {
    self._tab.get::<bool>(Header::VT_HASM, Some(false)).unwrap()
  }
  #[inline]
  pub fn hasT(&self) -> bool {
    self._tab.get::<bool>(Header::VT_HAST, Some(false)).unwrap()
  }
  #[inline]
  pub fn hasTM(&self) -> bool {
    self._tab.get::<bool>(Header::VT_HASTM, Some(false)).unwrap()
  }
  #[inline]
  pub fn columns(&self) -> Option<flatbuffers::Vector<'a, flatbuffers::ForwardsUOffset<Column<'a>>>> {
    self._tab.get::<flatbuffers::ForwardsUOffset<flatbuffers::Vector<flatbuffers::ForwardsUOffset<Column<'a>>>>>(Header::VT_COLUMNS, None)
  }
  #[inline]
  pub fn features_count(&self) -> u64 {
    self._tab.get::<u64>(Header::VT_FEATURES_COUNT, Some(0)).unwrap()
  }
  #[inline]
  pub fn index_node_size(&self) -> u16 {
    self._tab.get::<u16>(Header::VT_INDEX_NODE_SIZE, Some(16)).unwrap()
  }
  #[inline]
  pub fn crs(&self) -> Option<Crs<'a>> {
    self._tab.get::<flatbuffers::ForwardsUOffset<Crs<'a>>>(Header::VT_CRS, None)
  }
}

pub struct HeaderArgs<'a> {
    pub name: Option<flatbuffers::WIPOffset<&'a  str>>,
    pub envelope: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a ,  f64>>>,
    pub geometry_type: GeometryType,
    pub hasZ: bool,
    pub hasM: bool,
    pub hasT: bool,
    pub hasTM: bool,
    pub columns: Option<flatbuffers::WIPOffset<flatbuffers::Vector<'a , flatbuffers::ForwardsUOffset<Column<'a >>>>>,
    pub features_count: u64,
    pub index_node_size: u16,
    pub crs: Option<flatbuffers::WIPOffset<Crs<'a >>>,
}
impl<'a> Default for HeaderArgs<'a> {
    #[inline]
    fn default() -> Self {
        HeaderArgs {
            name: None,
            envelope: None,
            geometry_type: GeometryType::Unknown,
            hasZ: false,
            hasM: false,
            hasT: false,
            hasTM: false,
            columns: None,
            features_count: 0,
            index_node_size: 16,
            crs: None,
        }
    }
}
pub struct HeaderBuilder<'a: 'b, 'b> {
  fbb_: &'b mut flatbuffers::FlatBufferBuilder<'a>,
  start_: flatbuffers::WIPOffset<flatbuffers::TableUnfinishedWIPOffset>,
}
impl<'a: 'b, 'b> HeaderBuilder<'a, 'b> {
  #[inline]
  pub fn add_name(&mut self, name: flatbuffers::WIPOffset<&'b  str>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_NAME, name);
  }
  #[inline]
  pub fn add_envelope(&mut self, envelope: flatbuffers::WIPOffset<flatbuffers::Vector<'b , f64>>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_ENVELOPE, envelope);
  }
  #[inline]
  pub fn add_geometry_type(&mut self, geometry_type: GeometryType) {
    self.fbb_.push_slot::<GeometryType>(Header::VT_GEOMETRY_TYPE, geometry_type, GeometryType::Unknown);
  }
  #[inline]
  pub fn add_hasZ(&mut self, hasZ: bool) {
    self.fbb_.push_slot::<bool>(Header::VT_HASZ, hasZ, false);
  }
  #[inline]
  pub fn add_hasM(&mut self, hasM: bool) {
    self.fbb_.push_slot::<bool>(Header::VT_HASM, hasM, false);
  }
  #[inline]
  pub fn add_hasT(&mut self, hasT: bool) {
    self.fbb_.push_slot::<bool>(Header::VT_HAST, hasT, false);
  }
  #[inline]
  pub fn add_hasTM(&mut self, hasTM: bool) {
    self.fbb_.push_slot::<bool>(Header::VT_HASTM, hasTM, false);
  }
  #[inline]
  pub fn add_columns(&mut self, columns: flatbuffers::WIPOffset<flatbuffers::Vector<'b , flatbuffers::ForwardsUOffset<Column<'b >>>>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<_>>(Header::VT_COLUMNS, columns);
  }
  #[inline]
  pub fn add_features_count(&mut self, features_count: u64) {
    self.fbb_.push_slot::<u64>(Header::VT_FEATURES_COUNT, features_count, 0);
  }
  #[inline]
  pub fn add_index_node_size(&mut self, index_node_size: u16) {
    self.fbb_.push_slot::<u16>(Header::VT_INDEX_NODE_SIZE, index_node_size, 16);
  }
  #[inline]
  pub fn add_crs(&mut self, crs: flatbuffers::WIPOffset<Crs<'b >>) {
    self.fbb_.push_slot_always::<flatbuffers::WIPOffset<Crs>>(Header::VT_CRS, crs);
  }
  #[inline]
  pub fn new(_fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>) -> HeaderBuilder<'a, 'b> {
    let start = _fbb.start_table();
    HeaderBuilder {
      fbb_: _fbb,
      start_: start,
    }
  }
  #[inline]
  pub fn finish(self) -> flatbuffers::WIPOffset<Header<'a>> {
    let o = self.fbb_.end_table(self.start_);
    flatbuffers::WIPOffset::new(o.value())
  }
}

#[inline]
pub fn get_root_as_header<'a>(buf: &'a [u8]) -> Header<'a> {
  flatbuffers::get_root::<Header<'a>>(buf)
}

#[inline]
pub fn get_size_prefixed_root_as_header<'a>(buf: &'a [u8]) -> Header<'a> {
  flatbuffers::get_size_prefixed_root::<Header<'a>>(buf)
}

#[inline]
pub fn finish_header_buffer<'a, 'b>(
    fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>,
    root: flatbuffers::WIPOffset<Header<'a>>) {
  fbb.finish(root, None);
}

#[inline]
pub fn finish_size_prefixed_header_buffer<'a, 'b>(fbb: &'b mut flatbuffers::FlatBufferBuilder<'a>, root: flatbuffers::WIPOffset<Header<'a>>) {
  fbb.finish_size_prefixed(root, None);
}
} // pub mod FlatGeobuf