Returns an MBR that represents the minimum and maximum latitude and longitude of all points within a given distance from a point. The earth is modeled as a sphere.
Argument … |
Specifies … |
distance |
a FLOAT value for the distance, in meters, from the point to calculate the MBR. |
radius |
an optional FLOAT value for the radius of the sphere used to model the earth. If omitted, the method uses a value of 6371000.0 meters. |
Returns an MBR that represents the minimum and maximum latitude and longitude of all points within a given distance from the point.
ST_Point
ST_SphericalBufferMBR and ST_SpheroidalBufferMBR basically perform the same function, but with different performance and accuracy. ST_SphericalBufferMBR models the earth as a simple sphere, so it performs better than ST_SpheroidalBufferMBR, but with less accuracy. ST_SpheroidalBufferMBR models the earth as a spheroid, so it returns a more accurate MBR, but it runs slower than ST_SphericalBufferMBR.
The returned MBR cannot cross the longitude value of +/-180 or the latitude value of +/-90. The MBR cannot cover more than 180 degrees of latitude or longitude on the sphere or spheroid.
This example uses ST_SphericalBufferMBR to calculate an MBR that is 5000 meters from a point at longitude 100 and latitude 30:
SELECT
NEW ST_Geometry('POINT(100 30)').ST_SphericalBufferMBR( 5000.0 );