Beruflich Dokumente
Kultur Dokumente
1 Manual
163 / 315
Examples
SELECT tbl1.column1,
FROM
( VALUES
(1, LINESTRING (0
( VALUES
(2, LINESTRING (0
(3, LINESTRING (1
(4, LINESTRING (0
0, 3 3)::geometry)) AS tbl1,
0, 4 4)::geometry),
1, 2 2)::geometry),
0, 3 3)::geometry)) AS tbl2;
See Also
@, &&
7.7.13 ~=
Name
~= Returns TRUE if As bounding box is the same as Bs.
Synopsis
boolean ~=( geometry A , geometry B );
boolean ~=( geography A , geography B );
Description
The ~= operator returns TRUE if the bounding box of geometry/geography A is the same as the bounding box of geometry/geography B.
Note
This operand will make use of any indexes that may be available on the geometries.
Examples
select LINESTRING(0 0, 1 1)::geometry ~= LINESTRING(0 1, 1 0)::geometry as equality;
equality
|
-----------------+
t
|
The above can be used to test if you have the new or old behavior of ~= operator.
See Also
ST_Equals, ST_OrderingEquals, =
Synopsis
float ST_Area(geometry g1);
float ST_Area(geography g1);
float ST_Area(geography g1, boolean use_spheroid);
Description
Returns the area of the geometry if it is a polygon or multi-polygon. Return the area measurement of an ST_Surface or
ST_MultiSurface value. For geometry Area is in the units of the srid. For geography area is in square meters and defaults
to measuring about the spheroid of the geography (currently only WGS84). To measure around the faster but less accurate sphere
-- ST_Area(geog,false).
This method implements the OpenGIS Simple Features Implementation Specification for SQL 1.1.
This method implements the SQL/MM specification. SQL-MM 3: 8.1.2, 9.5.3
Examples
Return area in square feet for a plot of Massachusetts land and multiply by conversion to get square meters. Note this is in square
feet because 2249 is Mass State Plane Feet
SELECT ST_Area(the_geom) As sqft, ST_Area(the_geom)*POWER(0.3048,2) As sqm
FROM (SELECT
ST_GeomFromText(POLYGON((743238 2967416,743238 2967450,
743265 2967450,743265.625 2967416,743238 2967416)),2249) ) As foo(the_geom);
sqft
|
sqm
---------+------------928.625 | 86.27208552