estimated_envelope
1. ESTIMATED_ENVELOPE Function
=======estimated_envelope
1. ESTIMATED_ENVELOPE Function
>>>>>>> 9d19b1c8cb744c8e86d5c15b74d8b5f719ad62beThe ESTIMATED_ENVELOPE function in H2 database is used to estimate the minimum bounding rectangle (envelope) of a spatial object.
2. Syntax
The syntax for the ESTIMATED_ENVELOPE function in H2 database is as follows:
ESTIMATED_ENVELOPE(geometry)
Arguments
geometry
: The spatial object for which the estimated envelope needs to be calculated. It should be a valid geometry object.
Return
- The ESTIMATED_ENVELOPE function returns the estimated minimum bounding rectangle (envelope) of the given spatial object.
3. Notes
- The ESTIMATED_ENVELOPE function in H2 database is an estimation and may not provide a precise result.
- The input spatial object should be a valid geometry object. Invalid or null geometries may result in unexpected behavior or errors.
- This function is specific to spatial operations in H2 database and may not be available in other databases.
4. Examples
Here are a few examples demonstrating the usage of the ESTIMATED_ENVELOPE function in H2 database:
Example 1 - Calculating the estimated envelope of a point:
SELECT ESTIMATED_ENVELOPE('POINT(10 20)') AS envelope;
Output:
envelope
----------
POLYGON((10 20,10 20,10 20,10 20))
Example 2 - Calculating the estimated envelope of a polygon:
SELECT ESTIMATED_ENVELOPE('POLYGON((0 0, 0 10, 10 10, 10 0, 0 0))') AS envelope;
Output:
envelope
----------
POLYGON((0 0,0 10,10 10,10 0,0 0))
5. Related Functions
- ENVELOPE - Calculate the exact minimum bounding rectangle of a spatial object.
- ST_X - Get the X-coordinate of a point.
- ST_Y - Get the Y-coordinate of a point.