populārākās grafiskās datu bāzes sistēmas web view02.11.2015 · (a linestring of...

Download Populārākās grafiskās datu bāzes sistēmas Web view02.11.2015 · (a linestring of three or more coordinates in which the start and end points are the same, usually not instantiable,

If you can't read please download the document

Upload: vandung

Post on 05-Feb-2018

215 views

Category:

Documents


0 download

TRANSCRIPT

28

Spatial database elements

1. Point. Geometric aspect of an object, for which only its location

in space, but not the extent, is relevant.

city

2. Line (polyline). Moving through space, connections in space.

river

cable

highway

3. Region. Abstraction of an object with extent.

forest

lake

city

4. Partitions.

5. Networks (graphs).

Spatial data types

GEOMETRY (abstract superclass)

POINT (a single coordinate, usually but not necessarily 2 dimensional)

LINESTRING (a set of two or more coordinates, with a linear interpretation of the path between the coordinates)

LINEARRING (a linestring of three or more coordinates in which the start and end points are the same, usually not instantiable, but used to build polygons)

POLYGON (a set of one or more closed linearrings, one exterior ring that defines a bounded area, and a set of interior rings that define exceptions (holes) to the bounded areas)

MULTIPOINT (a set of points)

MULTILINESTRING (a set of linestrings)

MULTIPOLYGON (a set of polygons)

GEOMETRYCOLLECTION (a heterogeneous set of geometries)

Simplexes and faces

d-simplex - minimal object of dimension d

Finite set of simplexes such that the intersection of any two simplexes is a face (veidols).

Relational database spatial elements

2D point and cluster

2D lines.

2D polygons.

Object relational database spatial elements

2D lines.

2D polygons.

DBVS Oracle11g grafikas pamatstruktras

Layers

In most GIS software data is organized in themes as data layers. This approach allows data to be input as separate themes and overlaid based on analysis requirements. This can conceptualized as vertical layering the characteristics of the earth's surface. The overlay concept is so natural to cartographers and natural resource specialists that it has been built into the design of most CAD vector systems as well. The overlay/layer approach used in CAD systems is used to separate major classes of spatial features. This concept is also used to logically order data in most GIS software. The terminology may differ between GIS software, but the approach is the same. A variety of terms are used to define data layers in commercial GIS software. These include themes, coverages, layers, levels, objects, and feature classes.

Hierarchical structure of spatial data

Spatal element

Geometry

Layers

Coordinate system

Precision

Oracle Spatial data model

eometrisko objektu tips SDO_GEOMETRY un t elementi (tiek izmantot ar Oracle Spatial)

SDO_ELEM_INFO SDO_ORDINATES

SDO_ SDO_ SDO_

GTYPE SRID POINT SDO_STARTING_OFFSET X1, Y1, X2, Y2, . . .

SDO_ETYPE

SDO_INTERPRETATION

create type SDO_GEOMETRY as object( SDO_GTYPE number, SDO_SRID number, SDO_POINT SDO_POINT_TYPE, SDO_ELEM_INFO SDO_ELEM_INFO_ARRAY, SDO_ORDINATES SDO_ORDINATE_ARRAY);

create type SDO_POINT_TYPE as object( X number, Y number, Znumber);

create type SDO_ELEM_INFO_ARRAY as varray(1048576) of number;

create type SDO_ORDINATE_ARRAY as varray(1048576) of number;

IBM DB2 Spatial Extender eometrijas objektu modelis

MS SQL Server eometrijas objektu modelis

Iekautie grafikas datu tipi DBVS PostgreSQL

PostgreSQL grafisko datu apstrdes iekauts funkcijas

Grafisks informcijas meklana (vaicjumu realizana)

Parkljumu veidi (types of intersections)

eometriju predikti (geometric predicates)

Vaicjumu realizanas metodes grafiskajs datu bzs

1. Neprtraukts aproksimcijas (continuous approximations).

2. Rea tipa aproksimcijas (grid approximations).

One-Dimensional Embedding of Grid Approximations

Basic idea:

1) find a linear order for the cells of the grid preserving proximity;

2) define this order recursively for a grid corresponding to a hierachical subdivision of space.

z-order, Morton-order

Represent any shape by a set of bit strings, called z-elements

1. Put z-elements as spatial keys into a B-tree B.

2. Containment query with rectangle r:

- determine z-elements for r;

- for each z-element z scan a part of the leaf sequence of B having z as a prefix;

- check theses candidates for actual containment, avoid

duplicate reports.

Universlo DBS indeksi

Grafisko indeksu veidoana (indexes of graphic)

Grafisko objektu telpa (space of graphics)

eometrisko datu indeksu (spatial indexes) tipi

1) Grid (spatial index);

2) Z-order (curve);

3) Quadtree;

4) Octree;

5) UB-tree;

6) R-tree: Typically the preferred method for indexing spatial data. Objects (shapes, lines and points) are grouped using the minimum bounding rectangle (MBR). Objects are added to an MBR within the index that will lead to the smallest increase in its size.

7) R+ tree;

8) R* tree;

9) Hilbert R-tree;

10) X-tree;

11) kd-tree;

12) m-tree - an m-tree index can be used for the efficient resolution of similarity queries on complex objects as compared using an arbitrary metric.

Aproksimjoie taisnstri (bounding boxes)

R tree tipa indeksi

The figure above illustrates an R-Tree configuration with 4 sequences.The MBR that covers the spatial data is D to M and MBR created for indexing is A to C.

Lets create an example where spatial data, which includes a random point, is searched. If the point is in a within relationship with D, G or M, then the root to leaf node can be found immediately.If the point is in the area F and J intersects, then in the root node, A will be visited first then return F, then move to root node, select C and return J.This is where the problem lies. The example in Figure 2 only has two tree levels. However, it will take a lot of time to search the tree if there is a lot of data.

These problems have been resolved in R+-Tree.

R+ - tree tipa indeksi

In the figure above, the spatial data configuration from D to M is the same as in R Tree configuration. However, the A and C MBR area is different. In R+-Tree, if needed, the overlapping areas in the same level can be brought from different nodes. You can see that J and D are redundant.

When such redundancies occur, when looking for the area F and J are intersecting, you need only to search in A MBR and do not have to search C.

Prklans noteikana (find intersecting shapes)

(2) (1)

(4) (3)

Grafisko datu datu bzes sistma

Populrks grafisks datu bzes sistmas

1. Oracle RDBMS with Spatial or Locator.

3. PostgreSQL with PostGIS.

4. IBM DB2 with Spatial Extender.

5. IBM Informix with Spatial Blade.

2. SQL Server 2008 with Spatial.

Standartu realizcija grafiskajs datu bzes sistmas

Part 2 of Simple Feature Access is implemented to varying degrees in:

1) MySQL Spatial Extensions, although "All of the functions that calculate relations between geometries are implemented using bounding boxes not the actual geometries." MySQL DBMS implements the datatype geometry plus some spatial functions that have been implemented according to the OpenGIS specifications. However, in MySQL version 5.5 and earlier, functions that test spatial relationships are limited to working with minimum bounding rectangles rather than the actual geometries. MySQL versions earlier than 5.0.16 only supported spatial data in MyISAM tables. As of MySQL 5.0.16, InnoDB, NDB, BDB, and ARCHIVE also support spatial features.

2) PostgreSQL DBMS (database management system) uses the spatial extension PostGIS to implement the standardized datatype geometry and corresponding functions.

2) PostGIS extension for PostgreSQL, also supporting some of the SQL/MM Spatial features.

3) SpatiaLite extension for SQLite. SpatiaLite extends Sqlite with spatial datatypes, functions, and utilities.

4) Oracle Spatial, which also implements some of the advanced features from SQL/MM Spatial.

5) IBM DB2 Spatial Extender and IBM Informix Spatial DataBlade. IBM DB2 Spatial Extender can be used to enable any edition of DB2, including the free DB2 Express-C, with support for spatial types

6) Microsoft SQL Server since version 2008, with significant additions in the 2012 version.

eometrisko datu apstrdes funkcijas un operatori

The functions fall into a few basic categories:

1) construction, for building geometries from text and binary representations

2) serialization, for outputting geometries into various text and binary representations (like KML, GML, JSON and SVG)

3) predicates, for testing relationships between geometries and returning true/false answers

4) analysis and measurement, for returning numerical summaries (areas, lengths, distances) about geometries

5) accessors, for stripping out parts from geometries (rings from polygons, points from linestrings, and so on)

6) builders, that take geometry inputs and build new altered outputs (like unions, differences, buffers, convex hulls and so on)

7) aggregates, that take geometry sets and return single resultants, union is the most common

The list of possible functions is very