-
-
Notifications
You must be signed in to change notification settings - Fork 74
/
header.fbs
71 lines (65 loc) · 2 KB
/
header.fbs
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
//namespace FlatGeobuf;
// Geometry type enumeration
// NOTE: Same as WKB 2D geometry type enumeration
enum GeometryType: ubyte {
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
}
enum ColumnType: ubyte {
Byte,
UByte,
Bool,
Short,
UShort,
Int,
UInt,
Long,
ULong,
Float,
Double,
String,
Json,
DateTime,
Binary
}
table Column {
name: string (required); // Column name
type: ColumnType; // Column type
}
table Crs {
org: string; // Case-insensitive name of the defining organization e.g. EPSG or epsg (NULL = EPSG)
code: int; // Numeric ID of the Spatial Reference System assigned by the organization (0 = unknown)
name: string; // Human readable name of this SRS
description: string; // Human readable description of this SRS
wkt: string; // Well-known Text Representation of the Spatial Reference System
}
table Header {
name: string; // Dataset name
envelope: [double]; // Bounds
geometry_type: GeometryType; // Geometry type (should be set to Unknown if per feature geometry type)
hasZ: bool = false; // Does geometry have Z dimension?
hasM: bool = false; // Does geometry have M dimension?
hasT: bool = false; // Does geometry have T dimension?
hasTM: bool = false; // Does geometry have TM dimension?
columns: [Column]; // Attribute columns schema (can be omitted if per feature schema)
features_count: ulong; // Number of features in the dataset (0 = unknown)
index_node_size: ushort = 16; // Index node size (0 = no index)
crs: Crs; // Spatial Reference System
}
root_type Header;