Working with the database » History » Version 5
Rafael Bailon-Ruiz, 2020-12-04 11:41
1 | 5 | Rafael Bailon-Ruiz | !db%20diagram.png! |
---|---|---|---|
2 | 1 | Rafael Bailon-Ruiz | h1. Working with the database |
3 | |||
4 | The feature database is CAMS managing the storage and access of vector data, pieces of information like sensor measurements that can be described in space with a geometric figure such as a points, lines or polygons. See http://wiki.gis.com/wiki/index.php/Vector_data_modelto read more about vector data models. |
||
5 | |||
6 | 2 | Rafael Bailon-Ruiz | The basic piece of information of this data model is the _feature_, defined by a _geometry_ that indicates unequivocally its position and shape in the world, and a set of _attributes_ which are the characteristics associated to that location. Related features sharing a common geometry definition and attribute set are usually grouped together. |
7 | 1 | Rafael Bailon-Ruiz | |
8 | 3 | Rafael Bailon-Ruiz | {{toc}} |
9 | 2 | Rafael Bailon-Ruiz | |
10 | 1 | Rafael Bailon-Ruiz | h2. Data model |
11 | |||
12 | The CAMS database model is takes inspiration from the _OGR data model_ and the _OGC OpenPackage specification_. |
||
13 | |||
14 | h3. Dataset |
||
15 | |||
16 | A dataset is encompasses a set of feature collections stored in the same database or file. |
||
17 | |||
18 | |||
19 | h3. Collection |
||
20 | |||
21 | A collection describes the characteristics of features of the same kind or category. I.e.: "Wind", "UAV state", "Liquid water content", etc. It corresponds roughly to a table in a relational database or a layer in many geographic information models. |
||
22 | |||
23 | A collection is defined by the following parameters: |
||
24 | # A computer id (name_id), |
||
25 | # A human-readable name, |
||
26 | 2 | Rafael Bailon-Ruiz | # An coordinate reference system as an "EPSG code":https://en.wikipedia.org/wiki/EPSG_Geodetic_Parameter_Dataset, |
27 | 1 | Rafael Bailon-Ruiz | # A geometry type (As of 12/2020 only the "point" geometry is supported), |
28 | 3 | Rafael Bailon-Ruiz | # A ordered set of attributes and corresponding types. Attributes can be of type _int_, _str_, _float_, or _datetime_. |
29 | 1 | Rafael Bailon-Ruiz | # And, optionally, a long description. |
30 | |||
31 | |||
32 | h3. Feature |
||
33 | |||
34 | !vector_feature.png! |
||
35 | |||
36 | 3 | Rafael Bailon-Ruiz | The collection field is used to identify the collection to with a particular field belongs; thus determining the geometry and attribute set. |
37 | 1 | Rafael Bailon-Ruiz | |
38 | 3 | Rafael Bailon-Ruiz | General attributes, *t* (time) and *producer* , are mandatory for features generated repeatedly by UAV sensors. The time attribute is represented by a date and time (datetime.datetime in python) in Coordinated Universal Time (UTC). The producer attribute is a string. |
39 | 1 | Rafael Bailon-Ruiz | |
40 | 3 | Rafael Bailon-Ruiz | Specific attributes are unique to a particular collection. All features of the same collection must have the same attributes, but features of different collections do not need to share specific attributes unlike general ones. For instance, a _"wind"_ collection can have the _"east"_ and _"west"_ attributes to describe the wind vector components. |
41 | 1 | Rafael Bailon-Ruiz | |
42 | 4 | Rafael Bailon-Ruiz | h2. Code architecture |
43 | 1 | Rafael Bailon-Ruiz | |
44 | 4 | Rafael Bailon-Ruiz | h3. Class diagram |
45 | !db%20diagram.png! |
||
46 | 1 | Rafael Bailon-Ruiz | |
47 | 4 | Rafael Bailon-Ruiz | h3. DataServer |
48 | |||
49 | h3. FeatureDatabase |
||
50 | |||
51 | h3. StorageBackends |
||
52 | |||
53 | h2. Code examples |
||
54 | |||
55 | h3. Initialization |
||
56 | |||
57 | h3. Inserting feature |
||
58 | |||
59 | h3. Querying the database |
||
60 | 3 | Rafael Bailon-Ruiz | |
61 | |||
62 | h2. Post-mission analysis |
||
63 | |||
64 | |||
65 | |||
66 |