Returns an MBR that represents the minimum and maximum latitude and longitude of all points within a given distance from the point. The earth is modeled as a spheroid.
Argument … |
Specifies … |
distance |
a FLOAT value for the distance, in meters, from the point to calculate the MBR. |
semimajor |
an optional FLOAT value for the length, in meters, of the semimajor axis of the spheroid. If omitted, the method uses the WGS84 value of 6,378,137.0 meters. |
invflattening |
an optional FLOAT value for the inverse flattening of the spheroid. If omitted, the method uses the WGS84 value of 298.257223563. |
Returns an MBR that represents the minimum and maximum latitude and longitude of all points within a given distance from the point.
ST_Point
For the MBR calculation, the planet is modeled as a spheroid. If you do not pass in values for the semimajor and invflattening arguments, the computation uses the semimajor axis and the inverse flattening ratio from the World Geodetic System, WGS84. A value of 6,378,137.0 meters is used for the semimajor axis, and a value of 298.257223563 is used for the inverse flattening ratio.
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_SpheroidalBufferMBR 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_SpheroidalBufferMBR( 5000.0 );