Get the App
SLTechnology News&Howtos  ›  Internet Technology  › 

Apache Calcite official documentation Chinese version-Advanced-2. Space (Spatial)

Shulou Source: shulou.com Published: 2022-06-02 22:12:15 10月24日 Update

The second part is the Advanced space (Spatial).

   Calcite aims to implement the OpenGIS simple feature implementation Specification (SQL), a standard implementation of spatial databases such as PostGIS and H2GIS.

   We also aim to add optimizer support for spatial indexes and other forms of query optimization.

2.1 introduction

   spatial database is optimized for storing and querying data representing objects defined in geometric space.

   Calcite's support for spatial data includes:

GEOMETRY data types and subtypes, including POINT,LINESTRING and spatial functions (prefixed as ST_; we implemented 35 of them in the OpenGIS specification)

   will also at some point include query rewriting to use spatial indexes. 2.2 enable space support

   although the GEOMETRY data type is built-in, these features are not enabled by default. You need to add a fun=spatial to JDBC connection string to enable these features. For example, sqlline:

$. / sqlline >! connect jdbc:calcite:fun=spatial "sa" SELECT ST_PointFromText ('POINT (- 71.064544 42.28787)') +-- + | EXPR$0 | +-- + | {"x":-71.064544 "y": 42.28787} | +-+ 1 row selected (0.323 seconds) 2.3Thank you

The OpenGIS implementation of    Calcite uses Esri geometry API. Thanks to their community for their help.

While    is developing this feature, we make extensive use of PostGIS documentation and testing and H2GIS documentation, and refer to two reference implementations when the specification is not clear. Thank you for these wonderful projects.

Tags: Space data function database type support query document time index reference advanced wonderful two geometry function prefix simultaneously character string Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Shulou Technology Redmi Huawei Linux Apple