Catégories :

Fonctions géospatiales

ST_COVEREDBY

This returns TRUE if no point in one geospatial object is outside another geospatial object. In other words:

  • GEOGRAPHY object g1 is outside GEOGRAPHY object g2.

  • GEOMETRY object g1 is outside GEOMETRY object g2.

This is equivalent to ST_COVERS(g2, g1).

Although ST_COVEREDBY and ST_WITHIN might seem similar, the two functions have subtle differences. For details on the differences between « covered by » and « within », see the Dimensionally Extended 9-Intersection Model (DE-9IM).

Note

Cette fonction ne prend pas en charge l’utilisation de GeometryCollection ou de FeatureCollection comme valeurs d’entrée.

Voir aussi :

ST_COVERS , ST_WITHIN

Syntaxe

ST_COVEREDBY( <geography_expression_1> , <geography_expression_2> )

ST_COVEREDBY( <geometry_expression_1> , <geometry_expression_2> )

Arguments

geography_expression_1

Un objet GEOGRAPHY qui n’est pas un GeometryCollection ou un FeatureCollection.

geography_expression_2

Un objet GEOGRAPHY qui n’est pas un GeometryCollection ou un FeatureCollection.

geometry_expression_1

A GEOMETRY object that is not a GeometryCollection or FeatureCollection.

geometry_expression_2

A GEOMETRY object that is not a GeometryCollection or FeatureCollection.

Renvoie

BOOLEAN.

Usage Notes

  • For GEOMETRY objects, the function reports an error if the two input GEOMETRY objects have different SRIDs.

Exemples

GEOGRAPHY Examples

Cela montre une utilisation simple de la fonction ST_COVEREDBY :

create table geospatial_table_01 (g1 GEOGRAPHY, g2 GEOGRAPHY);
insert into geospatial_table_01 (g1, g2) values 
    ('POLYGON((0 0, 3 0, 3 3, 0 3, 0 0))', 'POLYGON((1 1, 2 1, 2 2, 1 2, 1 1))');
SELECT ST_COVEREDBY(g1, g2) 
    FROM geospatial_table_01;
+----------------------+
| ST_COVEREDBY(G1, G2) |
|----------------------|
| False                |
+----------------------+
Revenir au début