Product Solutions Support
Try MemSQL

GEOGRAPHY_INTERSECTS

This function takes in two geospatial objects and determines whether any part of them overlap.

image

Syntax

GEOGRAPHY_INTERSECTS ( geo1, geo2 )

Arguments

Info

If both geo1 and geo2 are points, this function only returns true if they are identical.

Return Type

Boolean

Examples

select id, name from neighborhoods
where
  GEOGRAPHY_INTERSECTS("POINT(-73.94990499 40.69150746)", shape);

select *
from neighborhoods with (index = shape, resolution = 16)
where geography_intersects(shape,"POLYGON(...)");
Info

The with (index = c, resolution = n) syntax is an optional optimization discussed in the section Special Spatial Tuning Parameters.

Was this article useful?