Documentation Home
MySQL 5.5 Reference Manual
Related Documentation Download this Manual
PDF (US Ltr) - 27.1Mb
PDF (A4) - 27.1Mb
PDF (RPM) - 26.1Mb
HTML Download (TGZ) - 6.6Mb
HTML Download (Zip) - 6.6Mb
HTML Download (RPM) - 5.6Mb
Man Pages (TGZ) - 168.7Kb
Man Pages (Zip) - 277.2Kb
Info (Gzip) - 2.5Mb
Info (Zip) - 2.5Mb
Excerpts from this Manual

MySQL 5.5 Reference Manual  /  ...  /  Spatial Relation Functions That Use Minimum Bounding Rectangles (MBRs)

12.15.9.2 Spatial Relation Functions That Use Minimum Bounding Rectangles (MBRs)

The OpenGIS specification defines the following functions that test the relationship between two geometry values g1 and g2. The MySQL implementation uses minimum bounding rectangles, so these functions return the same result as the corresponding MBR-based functions. The return values 1 and 0 indicate true and false, respectively.

  • Contains(g1, g2)

    Returns 1 or 0 to indicate whether g1 completely contains g2. This tests the opposite relationship as Within().

  • Disjoint(g1, g2)

    Returns 1 or 0 to indicate whether g1 is spatially disjoint from (does not intersect) g2.

  • Equals(g1, g2)

    Returns 1 or 0 to indicate whether g1 is spatially equal to g2.

  • Intersects(g1, g2)

    Returns 1 or 0 to indicate whether g1 spatially intersects g2.

  • Overlaps(g1, g2)

    Two geometries spatially overlap if they intersect and their intersection results in a geometry of the same dimension but not equal to either of the given geometries.

    This function returns 1 or 0 to indicate whether g1 spatially overlaps g2.

  • Within(g1, g2)

    Returns 1 or 0 to indicate whether g1 is spatially within g2. This tests the opposite relationship as Contains().


User Comments
Sign Up Login You must be logged in to post a comment.