Running microservices on Kubernetes

5 downloads 287 Views 1MB Size Report
R-tree -> MBR. • Geo types and queries are typically not separated. • Easy to learn: SQL, NoSQL syntax. • Almos
Introduction to GEO database technologies Szita Csongor AutSoft Ltd.

Agenda • What is a geo database • Standards and technologies • Database comparsions

What is a geo database?

Definition • A spatial database is a database that is optimized to store and query data that represents objects defined in a geometric space. (wikipedia) • Objects: • Point • Line • Poligyon

• Functions: • Measurements: lenght, area • Functions: create, update, union, difference • Predicates: Overlap, Equals, Whitin, Crosses, Touches, Distance, Disjoint, Contains

What else • Different index types to support fast queries • R-tree -> MBR

• Geo types and queries are typically not separated • Easy to learn: SQL, NoSQL syntax

• Almost every popular database has solution, add-ons

Difficulties in geo databases • 1D -> 1D, 2D, 3D • Projection of Earth • Earth is neither globular nor oval, the center is moving every year 1cm • WGS84 • Date is also important

Purpose of geo databases • Relation beetwen geometries • Transportation • Flight, Ship • Water, Gas

• Land records • Fire departments • Location based service • Navigation • Nearest restaurant, gas station, etc..

Example

Example

Example

Standards and technologies

OpenGIS • Open Geospatial Consortium – 1994 • 524 organization: Oracle, Google, Airbus

• Spacifications: • Types • Functions • Representation

OpenGIS Base Types

General properties • Type • SRID - Spatial Reference Identifier • Coordinates • Boundary: interior, exterior • Envelop: MBR • Simple/Nonsimple • Closed/Not closed • Empty/Nonempty • Dimension: -1, 0, 1, 2, etc

Representation • Well-Known Text • POINT(15 20)

• Well-Known Binary

• 01010000000000000000002E400000000000003440: • • • •

Byte order: 01 WKB type: 01000000 X coordinate: 0000000000002E40 Y coordinate: 0000000000003440

• LinearRing { uint32 numPoints; Point points[numPoints]}

• Create SET @g = GeomFromText('POINT(1 1)'); INSERT INTO geom VALUES (@g);

• Select

• As Text or As Binary

Spatial Relationships

Functions • Equals • Disjoint • Intersects • Touches • Crosses • Whitin • Contains • Overlaps • Relate

R-tree

Database compersion

MySQL • Based on OpenGIS • 2D • Planar, or Euclidean (flat-earth) • R-tree index support • Every OpenGIS function and predicate, but not all type

MS SQL • 2D/3D • Two type: • Geometry: OpenGIS • CircularString • CompoundCurve • CurvePolygon

• Geography – must fit inside a hemisphere • FullGlobe -> special type of Polygon

• Type differences:

• Measurements: unitless, deegrees (lon, lat) • Connecting edge: line vs arc

• B-tree index->MBR

Oracle • 3D • Whitin, anyinteract, inside, nearest neighbors, index

• R-tree index • Types as MS SQL • Unit support • Coordinate system support • • • •

Cartesian coordinates Geographic coordinates Projected coordinates Local coordinates

MongoDB - NoSQL • 2D • Earth-like sphere and Euclidean model • Index support for each model

• Less type and function • Point, LineString, Polygon, MultiPoint, MultiLineString, MultiPolygon, GeometryCollection • Whitin, intersect, near

Summary

Summary • Build on standards • Almost every database give support • Easy to learn and use

Suggest Documents