Mysql space extension VSPostGIS

Source: Internet
Author: User
Tags postgis
Function: MysqlspatialextensionPostGIS spatial index. Only MyISAM supports the R tree index. InnoDB does not support the GIST tree index (the R tree variant) the supported spatial types are only two-dimensional data, two-dimensional data, three-dimensional data, and space functions with limited curve space operations. The following is a space operation function defined by OGC. For example, you want to find the points in a blue polygon,

Function Mysql spatial extension PostGIS spatial indexes only support R tree indexes by MyISAM, and InnoDB does not support GIST tree indexes (R tree variants) the supported spatial types are only two-dimensional data, two-dimensional data, three-dimensional data, and space functions with limited curve space operations. The following is a space operation function defined by OGC. For example, you want to find the points in a blue polygon,

Function

Mysql spatial extension

PostGIS

Spatial Index

Only MyISAM supports the R tree index, but InnoDB does not.

GIST tree index (variant of the R tree)

Supported space types

Only two-dimensional data

Two-dimensional, three-dimensional, and curve

Spatial operation functions

Limited Space Functions

Basic implementation of space operation functions defined by OGC

For example, to find the points in a blue polygon, mysql spatial extension can only find the points in the smallest outsourcing rectangle (red box), while postgis can find the points in any polygon.

# FormatImgID_0 #

Spatial projection

Not Supported

Supports multiple commonly used projection Coordinate Systems

For example, you want to find the distance between two points. MySQL Spatial can only calculate the Euclidean Spatial distance, while PostGIS can calculate the real Spatial distance in different projection coordinate systems.

Transaction support

Not Supported

PostGIS provides a series of long transaction support, which can effectively support complex spatial analysis functions.

Query Efficiency

Loading Speed: MySQL> PostGIS (Transaction)

Create a spatial index: MySQL <PostGIS (diff split algo)

Query: MySQL PostGIS (different query results have different characteristics)

GIS system usage

Use less

For example, the database background of openstreetmap is Postgresql + Postgis.

Summary: If you only use simple GIS or LBS applications, the spatial extensions provided by MySQL can basically meet the requirements. However, if the required functions are more complex, the functions provided by MySQL spatial extensions may not be enough. In this case, Postgresql + postGIS may be more suitable.

,
Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.