In this chapter the methods of vector-based systems will be introduced more deeply. One of the most widely used vector-based logic is the spaghetti model. The disadvantage of this model is that the spaghetti approach cannot preserve the topology. Although it does not preserve the topology, topologically correct, gap-free and overlap-free polygon structures can be created, if the system builders have appropriate expertise to handle the correct topology. The greatest advantage of the spaghetti logic is its simplicity.

To make the self-test successfully

Vector data as well as the relation between features are stored by coordinates. Moreover, connection relations should also be stored in vector model. Many everyday questions reveal the importance of topological data structures.

- How do I get to the train-station, asked by a lost tourist.
- Go straight ahead until the second turning, then turn right and follow until it crosses a level crossing, after that keep left to the tracks, and you will reach the station.
- What is in between my and my neighbour's parcel? The answer would be Nothing, only a fence, which is a 1-dimensional object; otherwise we could not be neighbours if there is another object between us.

Topology describes relations and connections (overlap, break points) between features.

The spaghetti model stores only connection rules between nodes and coordinates referring to nodes. It does not investigate topological relations between objects, such as the neighbours of a polygon or if there is a common node for overlapping polygons. It also does not store continuity and the order of features (Fig. 25.).

Figure 25. One of the typical mistakes in the spaghetti model. Dotted and continuous lines should rely on each other, however it is not true here as shown by arrows; moreover, the arrow with a question mark reveals a node that does not have a corresponding continuous pair.

Most GIS software provides a general editing tool based on the spaghetti model. Its advantage resides in simplicity, which is also a disadvantage at the same time. By letting a loosely coupled data structure in use, many mistakes are made, which result bad quality spatial databases. GIS experts are capable of producing high-quality spatial data, although it is not advisable to apply the spaghetti model in a widely used environment. General editing tools are using their own data format, which does not support relational data structure design elements like vicinity and relational considerations.

Despite the error proneness by using the spaghetti model, some of the GIS software are still using them. For checking if a polygon is a ring, the inspection of discontinuity of linestrings is done at software level, even though the data structure does not support data consistency which may be checked by comparing coordinates by coordinates. A concept for modelling the spaghetti model with relation database is shown in Figure 25. The *geometriai elemek* table stores unique identifiers on nodes (primary key) and their coordinates. The *objektumok* table contains the unique identifier of additional attribute data, like Name, Field1, etc. Note that the order of nodes is crucial, since only incrementally drawing nodes yield correct polygons. The structure described in Figure 25 gives the ability of storing polygons topologically, however with no guarantee that it is correct all the time. Manual or software-based interaction is needed for correct topology.

Figure 26. Nodes and polygons composed of nodes defined by connection tables. However, it does not contain any information on topology.

A Társadalominformatika: moduláris tananyagok, interdiszciplináris tartalom- és tudásmenedzsment rendszerek fejlesztése az Európai Unió támogatásával, az Európai Szociális Alap társfinanszírozásával, az ELTE TÁMOP 4.1.2.A/1-11/1-2011-0056 projekt keretében valósult meg.

Generated with ELTESCORM framework