<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – Geospatial functions</title>
    <link>/en/sql-reference/functions/geospatial-functions/</link>
    <description>Recent content in Geospatial functions on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/sql-reference/functions/geospatial-functions/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Sql-Reference: ST_Area</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-area/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-area/</guid>
      <description>
        
        
        &lt;p&gt;Calculates the area of a spatial object.&lt;/p&gt;
&lt;p&gt;The units are:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;GEOMETRY objects: spatial reference system identifier (SRID) units&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;GEOGRAPHY objects: square meters&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Area( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want to calculate the area, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;FLOAT&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Area.&lt;/p&gt;
&lt;p&gt;Calculate the area of a polygon:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Area(ST_GeomFromText(&amp;#39;POLYGON((0 0,1 0,1 1,0 1,0 0))&amp;#39;));
 ST_Area
---------
       1
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Calculate the area of a multipolygon:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; SELECT ST_Area(ST_GeomFromText(&amp;#39;MultiPolygon(((0 0,1 0,1 1,0 1,0 0)),
   ((2 2,2 3,4 6,3 3,2 2)))&amp;#39;));
 ST_Area
---------
     3
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Suppose the polygon has a hole, as in the following figure.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-area/st-area.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Calculate the area, excluding the area of the hole:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Area(ST_GeomFromText(&amp;#39;POLYGON((2 2,5 5,8 2,2 2),
   (4 3,5 4,6 3,4 3))&amp;#39;));
 ST_Area
---------
       8
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Calculate the area of a geometry collection:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Area(ST_GeomFromText(&amp;#39;GEOMETRYCOLLECTION(POLYGON((20.5 20.45,
   20.51 20.52,20.69 20.32,20.5 20.45)),POLYGON((10 20,30 40,25 50,10 20)))&amp;#39;));
 ST_Area
----------
 150.0073
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Calculate the area of a geography object:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Area(ST_GeographyFromText(&amp;#39;POLYGON((20.5 20.45,20.51 20.52,
   20.69 20.32,20.5 20.45))&amp;#39;));
     ST_Area
------------------
 84627437.116037
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_AsBinary</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-asbinary/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-asbinary/</guid>
      <description>
        
        
        &lt;p&gt;Creates the Well-Known Binary (WKB) representation of a spatial object. Use this function when you need to convert an object to binary form for porting spatial data to or from other applications.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;http://www.opengeospatial.org&#34;&gt;Open Geospatial Consortium (OGC)&lt;/a&gt; defines the format of a WKB representation in the &lt;a href=&#34;http://www.opengeospatial.org/standards/sfa&#34;&gt;Simple Feature Access Part 1 - Common Architecture&lt;/a&gt; specification.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_AsBinary( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want the WKB, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;LONG VARBINARY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how to use ST_AsBinary.&lt;/p&gt;
&lt;p&gt;Retrieve WKB and WKT representations:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE locations (id INTEGER, name VARCHAR(100), geom1 GEOMETRY(800), geom2 GEOGRAPHY);
CREATE TABLE
=&amp;gt; COPY locations
    (id, geom1x FILLER LONG VARCHAR(800), geom1 AS ST_GeomFromText(geom1x), geom2x FILLER LONG VARCHAR (800),
     geom2 AS ST_GeographyFromText(geom2x))
   FROM stdin;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
&amp;gt;&amp;gt; 1|POINT(2 3)|
&amp;gt;&amp;gt; 2|LINESTRING(2 4,1 5)|
&amp;gt;&amp;gt; 3||POLYGON((-70.96 43.27,-70.67 42.95,-66.90 44.74,-67.81 46.08,-67.81 47.20,-69.22 47.43,-71.09 45.25,-70.96 43.27))
&amp;gt;&amp;gt; \.
=&amp;gt; SELECT id, ST_AsText(geom1),ST_AsText(geom2) FROM locations ORDER BY id ASC;
 id |       ST_AsText       |                 ST_AsText
----+-----------------------+---------------------------------------------
  1 | POINT (2 3)           |
  2 | LINESTRING (2 4, 1 5) |
  3 |                       | POLYGON ((-70.96 43.27, -70.67 42.95, -66.9 44.74, -67.81 46.08, -67.81 47.2, -69.22 47.43, -71.09 45.25, -70.96 43.27))
=&amp;gt; SELECT id, ST_AsBinary(geom1),ST_AsBinary(geom2) FROM locations ORDER BY id ASC;
.
.
.
(3 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Calculate the length of a WKB using the OpenText™ Analytics Database SQL function &lt;a href=&#34;../../../../en/sql-reference/functions/data-type-specific-functions/string-functions/length/#&#34;&gt;LENGTH&lt;/a&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT LENGTH(ST_AsBinary(St_GeomFromText(&amp;#39;POLYGON ((-1 2, 0 3, 1 2,
                                                        0 1, -1 2))&amp;#39;)));
 LENGTH
--------
     93
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-astext/#&#34;&gt;ST_AsText&lt;/a&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_AsText</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-astext/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-astext/</guid>
      <description>
        
        
        &lt;p&gt;Creates the Well-Known Text (WKT) representation of a spatial object. Use this function when you need to specify a spatial object in ASCII form.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;http://www.opengeospatial.org&#34;&gt;Open Geospatial Consortium (OGC)&lt;/a&gt; defines the format of a WKT string in the &lt;a href=&#34;http://www.opengeospatial.org/standards/sfa&#34;&gt;Simple Feature Access Part 1 - Common Architecture&lt;/a&gt; specification.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_AsText( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want the WKT string, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;LONG VARCHAR&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how to use ST_AsText.&lt;/p&gt;
&lt;p&gt;Retrieve WKB and WKT representations:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE locations (id INTEGER, name VARCHAR(100), geom1 GEOMETRY(800),
   geom2 GEOGRAPHY);
CREATE TABLE
=&amp;gt; COPY locations
    (id, geom1x FILLER LONG VARCHAR(800), geom1 AS ST_GeomFromText(geom1x), geom2x FILLER LONG VARCHAR (800),
     geom2 AS ST_GeographyFromText(geom2x))
    FROM stdin;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
&amp;gt;&amp;gt; 1|POINT(2 3)|
&amp;gt;&amp;gt; 2|LINESTRING(2 4,1 5)|
&amp;gt;&amp;gt; 3||POLYGON((-70.96 43.27,-70.67 42.95,-66.90 44.74,-67.81 46.08,-67.81 47.20,-69.22 47.43,-71.09 45.25,-70.96 43.27))
&amp;gt;&amp;gt; \.
=&amp;gt; SELECT id, ST_AsText(geom1),ST_AsText(geom2) FROM locations ORDER BY id ASC;
 id |       ST_AsText       |                 ST_AsText
----+-----------------------+---------------------------------------------
  1 | POINT (2 3)           |
  2 | LINESTRING (2 4, 1 5) |
  3 |                       | POLYGON ((-70.96 43.27, -70.67 42.95, -66.9 44.74, -67.81 46.08, -67.81 47.2, -69.22 47.43, -71.09 45.25, -70.96 43.27))
(3 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Calculate the length of a WKT using the OpenText™ Analytics Database SQL function &lt;a href=&#34;../../../../en/sql-reference/functions/data-type-specific-functions/string-functions/length/#&#34;&gt;LENGTH&lt;/a&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT LENGTH(ST_AsText(St_GeomFromText(&amp;#39;POLYGON ((-1 2, 0 3, 1 2,
                                                      0 1, -1 2))&amp;#39;)));
 LENGTH
--------
     37
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-asbinary/#&#34;&gt;ST_AsBinary&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Boundary</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-boundary/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-boundary/</guid>
      <description>
        
        
        &lt;p&gt;Calculates the boundary of the specified GEOMETRY object. An object&#39;s boundary is the set of points that define the limit of the object.&lt;/p&gt;
&lt;p&gt;For a linestring, the boundary is the start and end points. For a polygon, the boundary is a linestring that begins and ends at the same point.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Boundary( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want the boundary, type GEOMETRY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Boundary.&lt;/p&gt;
&lt;p&gt;Returns a linestring that represents the boundary:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Boundary(ST_GeomFromText(&amp;#39;POLYGON((-1 -1,2 2,
   0 1,-1 -1))&amp;#39;)));
 ST_AsText
--------------
LINESTRING(-1 -1, 2 2, 0 1, -1 -1)
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Returns a multilinestring that contains the boundaries of both polygons:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Boundary(ST_GeomFromText(&amp;#39;POLYGON((2 2,5 5,8 2,2 2),
   (4 3,5 4,6 3,4 3))&amp;#39;)));
                            ST_AsText
------------------------------------------------------------------
 MULTILINESTRING ((2 2, 5 5, 8 2, 2 2), (4 3, 5 4, 6 3, 4 3))
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The boundary of a linestring is its start and end points:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Boundary(ST_GeomFromText(
   &amp;#39;LINESTRING(1 1,2 2,3 3,4 4)&amp;#39;)));
       ST_AsText
-----------------------
 MULTIPOINT (1 1, 4 4)
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;A closed linestring has no boundary because it has no start and end points:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Boundary(ST_GeomFromText(
   &amp;#39;LINESTRING(1 1,2 2,3 3,4 4,1 1)&amp;#39;)));
    ST_AsText
------------------
 MULTIPOINT EMPTY
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Buffer</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-buffer/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-buffer/</guid>
      <description>
        
        
        &lt;p&gt;Creates a GEOMETRY object greater than or equal to a specified distance from the boundary of a spatial object. The distance is measured in Cartesian coordinate units. ST_Buffer does not accept a distance size greater than +1e15 or less than –1e15.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Buffer( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;d&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want to calculate the buffer, type GEOMETRY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;d&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Distance from the object in Cartesian coordinate units, type FLOAT&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;usage-tips&#34;&gt;Usage tips&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;If you specify a positive distance, ST_Buffer returns a polygon that represents the points within or equal to the distance outside the object. If you specify a negative distance, ST_Buffer returns a polygon that represents the points within or equal to the distance inside the object.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;For points, multipoints, linestrings, and multilinestrings, if you specify a negative distance, ST_Buffer returns an empty polygon.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The OpenText™ Analytics Database Place version of ST_Buffer returns the buffer as a polygon, so the buffer object has corners at its vertices. It does not contain rounded corners.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how to use ST_Buffer.&lt;/p&gt;
&lt;p&gt;Returns a GEOMETRY object:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Buffer(ST_GeomFromText(&amp;#39;POLYGON((0 1,1 4,4 3,0 1))&amp;#39;),1));
                                  ST_AsText
------------------------------------------------------------------------------
POLYGON ((-0.188847498856 -0.159920845081, -1.12155598386 0.649012935089, 0.290814745534 4.76344136152,
 0.814758063466 5.02541302048, 4.95372324225 3.68665254814, 5.04124517538 2.45512549204, -0.188847498856 -0.159920845081))
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Centroid</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-centroid/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-centroid/</guid>
      <description>
        
        
        &lt;p&gt;Calculates the geometric center—the centroid—of a spatial object. If points or linestrings or both are present in a geometry with polygons, only the polygons contribute to the calculation of the centroid. Similarly, if points are present with linestrings, the points do not contribute to the calculation of the centroid.&lt;/p&gt;
&lt;p&gt;To calculate the centroid of a GEOGRAPHY object, see the examples for &lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/stv-geometry/#&#34;&gt;STV_Geometry&lt;/a&gt; and &lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/stv-geography/#&#34;&gt;STV_Geography&lt;/a&gt;.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Centroid( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want to calculate the centroid, type GEOMETRY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY (POINT only)&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Centroid.&lt;/p&gt;
&lt;p&gt;Calculate the centroid for a polygon:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Centroid(ST_GeomFromText(&amp;#39;POLYGON((-1 -1,2 2,-1 2,
   -1 -1))&amp;#39;)));
  ST_AsText
------------
 POINT (-0 1)
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Calculate the centroid for a multipolygon:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Centroid(ST_GeomFromText(&amp;#39;MULTIPOLYGON(((1 0,2 1,2 0,
   1 0)),((-1 -1,2 2,-1 2,-1 -1)))&amp;#39;)));
               ST_AsText
--------------------------------------
 POINT (0.166666666667 0.933333333333)
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;This figure shows the centroid for the multipolygon.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-centroid/st-centroid-pol-2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Contains</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-contains/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-contains/</guid>
      <description>
        
        
        &lt;p&gt;Determines if a spatial object is entirely inside another spatial object without existing only on its boundary. Both arguments must be the same spatial data type. Either specify two GEOMETRY objects or two GEOGRAPHY objects.&lt;/p&gt;
&lt;p&gt;If an object such as a point or linestring only exists along a spatial object&#39;s boundary, then ST_Contains returns false. The interior of a linestring is all the points on the linestring except the start and end points.&lt;/p&gt;
&lt;p&gt;ST_Contains(&lt;em&gt;g1&lt;/em&gt;, &lt;em&gt;g2&lt;/em&gt;&lt;code&gt;)&lt;/code&gt; is functionally equivalent to ST_Within(&lt;em&gt;g2&lt;/em&gt;, &lt;em&gt;g1&lt;/em&gt;&lt;code&gt;)&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;GEOGRAPHY Polygons with a vertex or border on the International Date Line (IDL) or the North or South pole are not supported.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Contains( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;
                        [USING PARAMETERS spheroid={true | false}] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;spheroid = {true | false}&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;(Optional) BOOLEAN that specifies whether to use a perfect sphere or WGS84.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default&lt;/strong&gt;: False&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;BOOLEAN&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Compatible GEOGRAPHY pairs:

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point-Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring-Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon-Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon-Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Contains.&lt;/p&gt;
&lt;p&gt;The first polygon does not completely contain the second polygon:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Contains(ST_GeomFromText(&amp;#39;POLYGON((0 2,1 1,0 -1,0 2))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((-1 3,2 1,0 -3,-1 3))&amp;#39;));
 ST_Contains
-------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-contains/st-contains-pol-1.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;If a point is on a linestring, but not on an end point:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Contains(ST_GeomFromText(&amp;#39;LINESTRING(20 20,30 30)&amp;#39;),
   ST_GeomFromText(&amp;#39;POINT(25 25)&amp;#39;));
 ST_Contains
--------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-contains/st-contains-pol-2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;If a point is on the boundary of a polygon:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Contains(ST_GeographyFromText(&amp;#39;POLYGON((20 20,30 30,30 25,20 20))&amp;#39;),
   ST_GeographyFromText(&amp;#39;POINT(20 20)&amp;#39;));
 ST_Contains
--------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-contains/st-contains-pol-3.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;p&gt;Two spatially equivalent polygons:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Contains (ST_GeomFromText(&amp;#39;POLYGON((-1 2, 0 3, 0 1, -1 2))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((0 3, -1 2, 0 1, 0 3))&amp;#39;));
 ST_Contains
--------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-contains/st-contains-pol-4.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-overlaps/#&#34;&gt;ST_Overlaps&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-within/#&#34;&gt;ST_Within&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_ConvexHull</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-convexhull/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-convexhull/</guid>
      <description>
        
        
        &lt;p&gt;Calculates the smallest convex GEOMETRY object that contains a GEOMETRY object.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_ConvexHull( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want the convex hull, type GEOMETRY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_ConvexHull.&lt;/p&gt;
&lt;p&gt;For a pair of points in a geometry collection:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_ConvexHull(ST_GeomFromText(&amp;#39;GEOMETRYCOLLECTION(
   POINT(1 1),POINT(0 0))&amp;#39;)));
       ST_AsText
-----------------------
 LINESTRING (1 1, 0 0)
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;For a geometry collection:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_ConvexHull(ST_GeomFromText(&amp;#39;GEOMETRYCOLLECTION(
   LINESTRING(2.5 3,-2 1.5), POLYGON((0 1,1 3,1 -2,0 1)))&amp;#39;)));
                  ST_AsText
---------------------------------------------
 POLYGON ((1 -2, -2 1.5, 1 3, 2.5 3, 1 -2))
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The solid lines represent the original geometry collection and the dashed lines represent the convex hull.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-convex-hull/st-convex-hull-pol.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Crosses</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-crosses/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-crosses/</guid>
      <description>
        
        
        &lt;p&gt;Determines if one GEOMETRY object spatially crosses another GEOMETRY object. If two objects touch only at a border, ST_Crosses returns FALSE.&lt;/p&gt;
&lt;p&gt;Two objects spatially cross when both of the following are true:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The two objects have some, but not all, interior points in common.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The dimension of the result of their intersection is less than the maximum dimension of the two objects.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Crosses( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;BOOLEAN&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Crosses.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-crosses/st-crosses-pol-1.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Crosses(ST_GeomFromText(&amp;#39;LINESTRING(-1 3,1 4)&amp;#39;),
   ST_GeomFromText(&amp;#39;LINESTRING(-1 4,1 3)&amp;#39;));
 ST_Crosses
------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-crosses/st-crosses-pol-2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Crosses(ST_GeomFromText(&amp;#39;LINESTRING(-1 1,1 2)&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((1 1,0 -1,3 -1,2 1,1 1))&amp;#39;));
 ST_Crosses
------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-crosses/st-crosses-pol-3.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Crosses(ST_GeomFromText(&amp;#39;POINT(-1 4)&amp;#39;),
   ST_GeomFromText(&amp;#39;LINESTRING(-1 4,1 3)&amp;#39;));
ST_ Crosses
------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Difference</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-difference/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-difference/</guid>
      <description>
        
        
        &lt;p&gt;Calculates the part of a spatial object that does not intersect with another spatial object.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Difference( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Difference.&lt;/p&gt;
&lt;p&gt;Two overlapping linestrings:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Difference(ST_GeomFromText(&amp;#39;LINESTRING(0 0,0 2)&amp;#39;),
   ST_GeomFromText(&amp;#39;LINESTRING(0 1,0 2)&amp;#39;)));
       ST_AsText
-----------------------
 LINESTRING (0 0, 0 1)
(1 row)
=&amp;gt; SELECT ST_AsText(ST_Difference(ST_GeomFromText(&amp;#39;LINESTRING(0 0,0 3)&amp;#39;),
   ST_GeomFromText(&amp;#39;LINESTRING(0 1,0 2)&amp;#39;)));
                ST_AsText
------------------------------------------
 MULTILINESTRING ((0 0, 0 1), (0 2, 0 3))
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Two overlapping polygons:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/difference-2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Difference(ST_GeomFromText(&amp;#39;POLYGON((0 1,0 3,2 3,2 1,0 1))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((0 0,0 2,2 2,2 0,0 0))&amp;#39;)));
            ST_AsText
-------------------------------------
 POLYGON ((0 2, 0 3, 2 3, 2 2, 0 2))
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Two non-intersecting polygons:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Difference(ST_GeomFromText(&amp;#39;POLYGON((1 1,1 3,3 3,3 1,
   1 1))&amp;#39;),ST_GeomFromText(&amp;#39;POLYGON((1 5,1 7,-1 7,-1 5,1 5))&amp;#39;)));
              ST_AsText
-------------------------------------
 POLYGON ((1 1, 1 3, 3 3, 3 1, 1 1))
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Disjoint</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-disjoint/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-disjoint/</guid>
      <description>
        
        
        &lt;p&gt;Determines if two GEOMETRY objects do not intersect or touch.&lt;/p&gt;
&lt;p&gt;If ST_Disjoint returns TRUE for a pair of GEOMETRY objects, ST_Intersects returns FALSE for the same two objects.&lt;/p&gt;
&lt;p&gt;GEOGRAPHY Polygons with a vertex or border on the International Date Line (IDL) or the North or South pole are not supported.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Disjoint( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;
                         [USING PARAMETERS spheroid={true | false}] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;spheroid = {true | false}&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;(Optional) BOOLEAN that specifies whether to use a perfect sphere or WGS84.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default&lt;/strong&gt;: False&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;BOOLEAN&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Compatible GEOGRAPHY pairs:&lt;/p&gt;
&lt;dl&gt;
&lt;dt&gt;Data Type&lt;/dt&gt;
&lt;dd&gt;GEOGRAPHY (WGS84)&lt;/dd&gt;
&lt;dt&gt;Point-Point&lt;/dt&gt;
&lt;dd&gt;No&lt;/dd&gt;
&lt;dt&gt;Linestring-Point&lt;/dt&gt;
&lt;dd&gt;No&lt;/dd&gt;
&lt;dt&gt;Polygon-Point&lt;/dt&gt;
&lt;dd&gt;Yes&lt;/dd&gt;
&lt;dt&gt;Multipolygon-Point&lt;/dt&gt;
&lt;dd&gt;No&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Disjoint.&lt;/p&gt;
&lt;p&gt;Two non-intersecting or touching polygons:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Disjoint (ST_GeomFromText(&amp;#39;POLYGON((-1 2,0 3,0 1,-1 2))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((1 0, 1 1, 2 2, 1 0))&amp;#39;));
 ST_Disjoint
-------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Two intersecting linestrings:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Disjoint(ST_GeomFromText(&amp;#39;LINESTRING(-1 2,0 3)&amp;#39;),
   ST_GeomFromText(&amp;#39;LINESTRING(0 2,-1 3)&amp;#39;));
 ST_Disjoint
-------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Two polygons touching at a single point:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Disjoint (ST_GeomFromText(&amp;#39;POLYGON((-1 2, 0 3, 0 1, -1 2))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((0 2, 1 1, 1 2, 0 2))&amp;#39;));
 ST_Disjoint
--------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-intersects/#&#34;&gt;ST_Intersects&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Distance</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-distance/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-distance/</guid>
      <description>
        
        
        &lt;p&gt;Calculates the shortest distance between two spatial objects. For GEOMETRY objects, the distance is measured in Cartesian coordinate units. For GEOGRAPHY objects, the distance is measured in meters.&lt;/p&gt;
&lt;p&gt;Parameters &lt;code&gt;g1&lt;/code&gt; and &lt;code&gt;g2&lt;/code&gt; must be both GEOMETRY objects or both GEOGRAPHY objects.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Distance( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;
        [USING PARAMETERS spheroid={ true | false } ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;spheroid = { true | false }&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;(Optional) BOOLEAN that specifies whether to use a perfect sphere or WGS84.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default&lt;/strong&gt;: False&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;FLOAT&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Compatible GEOGRAPHY pairs:

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point-Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring-Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring-Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon-Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint-Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint-Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon-Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;h2 id=&#34;recommendations&#34;&gt;Recommendations&lt;/h2&gt;
&lt;p&gt;OpenText™ Analytics Database recommends pruning invalid data before using ST_Distance. Invalid geography values could return non-guaranteed results.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Distance.&lt;/p&gt;
&lt;p&gt;Distance between two polygons:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Distance(ST_GeomFromText(&amp;#39;POLYGON((-1 -1,2 2,0 1,-1 -1))&amp;#39;),
                      ST_GeomFromText(&amp;#39;POLYGON((5 2,7 4,5 5,5 2))&amp;#39;));
 ST_Distance
-------------
           3
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Distance between a point and a linestring in meters:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Distance(ST_GeographyFromText(&amp;#39;POINT(31.75 31.25)&amp;#39;),
    ST_GeographyFromText(&amp;#39;LINESTRING(32 32,32 35,40.5 35,32 35,32 32)&amp;#39;));
   ST_Distance
------------------
 86690.3950562969
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Envelope</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-envelope/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-envelope/</guid>
      <description>
        
        
        &lt;p&gt;Calculates the minimum bounding rectangle that contains the specified GEOMETRY object.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Envelope( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want to find the minimum bounding rectangle, type GEOMETRY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how to use ST_Envelope.&lt;/p&gt;
&lt;p&gt;Returns the minimum bounding rectangle:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Envelope(ST_GeomFromText(&amp;#39;POLYGON((0 0,1 1,1 2,2 2,
   2 1,3 0,1.5 -1.5,0 0))&amp;#39;)));
                 ST_AsText
-------------------------------------------
 POLYGON ((0 -1.5, 3 -1.5, 3 2, 0 2, 0 -1.5))
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-envelope/st-envelope-pol.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Equals</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-equals/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-equals/</guid>
      <description>
        
        
        &lt;p&gt;Determines if two spatial objects are spatially equivalent. The coordinates of the two objects and their WKT/WKB representations must match exactly for ST_Equals to return TRUE.&lt;/p&gt;
&lt;p&gt;The order of the points do not matter in determining spatial equivalence:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;LINESTRING(1 2, 4 3) equals LINESTRING(4 3, 1 2).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;POLYGON ((0 0, 1 1, 1 2, 2 2, 2 1, 3 0, 1.5 -1.5, 0 0)) equals POLYGON((1 1 , 1 2, 2 2, 2 1, 3 0, 1.5 -1.5, 0 0, 1 1)).&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;MULTILINESTRING((1 2, 4 3),(0 0, -1 -4)) equals MULTILINESTRING((0 0, -1 -4),(1 2, 4 3)).&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Coordinates are stored as FLOAT types. Thus, rounding errors are expected when importing Well-Known Text (WKT) values because the limitations of floating-point number representation.&lt;/p&gt;
&lt;p&gt;&lt;code&gt;g1&lt;/code&gt; and &lt;code&gt;g2&lt;/code&gt; must both be GEOMETRY objects or both be GEOGRAPHY objects. Also, &lt;code&gt;g1&lt;/code&gt; and &lt;code&gt;g2&lt;/code&gt; cannot both be of type GeometryCollection.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Equals( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object to compare to &lt;code&gt;g2&lt;/code&gt;, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object to compare to &lt;code&gt;g1&lt;/code&gt;, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;BOOLEAN&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Equals.&lt;/p&gt;
&lt;p&gt;Two linestrings:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Equals (ST_GeomFromText(&amp;#39;LINESTRING(-1 2, 0 3)&amp;#39;),
   ST_GeomFromText(&amp;#39;LINESTRING(0 3, -1 2)&amp;#39;));
 ST_Equals
--------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Two polygons:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Equals (ST_GeographyFromText(&amp;#39;POLYGON((43.22 42.21,40.3 39.88,
   42.1 50.03,43.22 42.21))&amp;#39;),ST_GeographyFromText(&amp;#39;POLYGON((43.22 42.21,
   40.3 39.88,42.1 50.31,43.22 42.21))&amp;#39;));
 ST_Equals
--------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_GeographyFromText</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-geographyfromtext/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-geographyfromtext/</guid>
      <description>
        
        
        &lt;p&gt;Converts a Well-Known Text (WKT) string into its corresponding GEOGRAPHY object. Use this function to convert a WKT string into the format expected by the OpenText™ Analytics Database Place functions.&lt;/p&gt;
&lt;p&gt;A GEOGRAPHY object is a spatial object with coordinates (longitude, latitude) defined on the surface of the earth. Coordinates are expressed in degrees (longitude, latitude) from reference planes dividing the earth.&lt;/p&gt;
&lt;p&gt;The maximum size of a GEOGRAPHY object is 10 MB. If you pass a WKT to ST_GeographyFromText, the result is a spatial object whose size is greater than 10 MB, ST_GeographyFromText returns an error.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;http://www.opengeospatial.org&#34;&gt;Open Geospatial Consortium (OGC)&lt;/a&gt; defines the format of a WKT string in Section 7 in the &lt;a href=&#34;http://www.opengeospatial.org/standards/sfa&#34;&gt;Simple Feature Access Part 1 - Common Architecture&lt;/a&gt; specification.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_GeographyFromText( &lt;span class=&#34;code-variable&#34;&gt;wkt&lt;/span&gt; [ USING PARAMETERS &lt;span class=&#34;code-variable&#34;&gt;ignore_errors&lt;/span&gt;={&amp;#39;y&amp;#39;|&amp;#39;n&amp;#39;} ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;wkt&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Well-Known Text (WKT) string of a GEOGRAPHY object, type LONG VARCHAR&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;ignore_errors&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;(Optional) ST_GeographyFromText returns the following, based on the parameters supplied:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;NULL—If &lt;code&gt;wkt&lt;/code&gt; is invalid and &lt;code&gt;ignore_errors&lt;/code&gt;=&lt;code&gt;&#39;y&#39;&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Error—If &lt;code&gt;wkt&lt;/code&gt; is invalid and &lt;code&gt;ignore_errors&lt;/code&gt;=&lt;code&gt;&#39;n&#39;&lt;/code&gt; or is unspecified.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOGRAPHY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Point&lt;/th&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Multipoint&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Linestring&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Multilinestring&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Polygon&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Multipolygon&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
GeometryCollection&lt;/th&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how to use ST_GeographyFromText.&lt;/p&gt;
&lt;p&gt;Convert WKT into a GEOGRAPHY object:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE wkt_ex (g GEOGRAPHY);
 CREATE TABLE
=&amp;gt; INSERT INTO wkt_ex VALUES(ST_GeographyFromText(&amp;#39;POLYGON((1 2,3 4,2 3,1 2))&amp;#39;));
 OUTPUT
--------
      1
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_GeographyFromWKB</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-geographyfromwkb/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-geographyfromwkb/</guid>
      <description>
        
        
        &lt;p&gt;Converts a Well-Known Binary (WKB) value into its corresponding GEOGRAPHY object. Use this function to convert a WKB into the format expected by OpenText™ Analytics Database Place functions.&lt;/p&gt;
&lt;p&gt;A GEOGRAPHY object is a spatial object defined on the surface of the earth. Coordinates are expressed in degrees (longitude, latitude) from reference planes dividing the earth. All calculations are in meters.&lt;/p&gt;
&lt;p&gt;The maximum size of a GEOGRAPHY object is 10 MB. If you pass a WKB to ST_GeographyFromWKB that results in a spatial object whose size is greater than 10 MB, ST_GeographyFromWKB returns an error.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;http://www.opengeospatial.org&#34;&gt;Open Geospatial Consortium (OGC)&lt;/a&gt; defines the format of a WKB representation in Section 8 in the &lt;a href=&#34;http://www.opengeospatial.org/standards/sfa&#34;&gt;Simple Feature Access Part 1 - Common Architecture&lt;/a&gt; specification.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_GeographyFromWKB( &lt;span class=&#34;code-variable&#34;&gt;wkb&lt;/span&gt; [ USING PARAMETERS &lt;span class=&#34;code-variable&#34;&gt;ignore_errors&lt;/span&gt;={&amp;#39;y&amp;#39;|&amp;#39;n&amp;#39;} ] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;wkb&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Well-Known Binary (WKB) value of a GEOGRAPHY object, type LONG VARBINARY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;ignore_errors&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;(Optional) ST_GeographyFromWKB returns the following, based on the parameters supplied:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;NULL—If &lt;code&gt;wkb&lt;/code&gt; is invalid and &lt;code&gt;ignore_errors&lt;/code&gt;=&lt;code&gt;&#39;y&#39;&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Error—If &lt;code&gt;wkb&lt;/code&gt; is invalid and &lt;code&gt;ignore_errors&lt;/code&gt;=&lt;code&gt;&#39;n&#39;&lt;/code&gt; or is unspecified.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOGRAPHY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how to use ST_GeographyFromWKB.&lt;/p&gt;
&lt;p&gt;Convert WKB into a GEOGRAPHY object:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE wkb_ex (g GEOGRAPHY);
CREATE TABLE
=&amp;gt; INSERT INTO wkb_ex VALUES(ST_GeographyFromWKB(X&amp;#39;0103000000010000000 ... );
 OUTPUT
--------
      1
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_GeoHash</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-geohash/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-geohash/</guid>
      <description>
        
        
        &lt;p&gt;Returns a GeoHash in the shape of the specified geometry.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_GeoHash( &lt;span class=&#34;code-variable&#34;&gt;SpatialObject&lt;/span&gt; [ USING PARAMETERS &lt;span class=&#34;code-variable&#34;&gt;numchars&lt;/span&gt;=&lt;span class=&#34;code-variable&#34;&gt;n&lt;/span&gt;] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;Spatial object&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A GEOMETRY or GEOGRAPHY spatial object. Inputs must be in polar coordinates (-180 &amp;lt;= x &amp;lt;= 180 and -90 &amp;lt;= y &amp;lt;= 90) for all points inside the given geometry.&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;n&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;Specifies the length, in characters, of the returned GeoHash.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOHASH&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_PointFromGeoHash.&lt;/p&gt;
&lt;p&gt;Generate a full precision GeoHash for the specified geometry:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_GeoHash(ST_GeographyFromText(&amp;#39;POINT(3.14 -1.34)&amp;#39;));
ST_GeoHash
----------------------
kpf0rkn3zmcswks75010
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Generate a GeoHash based on the first five characters of the specified geometry:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt;  select ST_GeoHash(ST_GeographyFromText(&amp;#39;POINT(3.14 -1.34)&amp;#39;)USING PARAMETERS numchars=5);
ST_GeoHash
------------
kpf0r
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_GeometryN</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-geometryn/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-geometryn/</guid>
      <description>
        
        
        &lt;p&gt;Returns the &lt;em&gt;&lt;code&gt;n&lt;/code&gt;&lt;/em&gt;&lt;sup&gt;th&lt;/sup&gt; geometry within a geometry object.&lt;/p&gt;
&lt;p&gt;If &lt;em&gt;&lt;code&gt;n&lt;/code&gt;&lt;/em&gt; is out of range of the index, then NULL is returned.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_GeometryN( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; , &lt;span class=&#34;code-variable&#34;&gt;n&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; &lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object of type GEOMETRY.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;n&lt;/span&gt; &lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The geometry&#39;s index number, 1-based.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_GeometryN.&lt;/p&gt;
&lt;p&gt;Return the second geometry in a multipolygon:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE multipolygon_geom (gid int, geom GEOMETRY(1000));
CREATE TABLE
=&amp;gt; COPY multipolygon_geom(gid, gx FILLER LONG VARCHAR, geom AS ST_GeomFromText(gx)) FROM stdin delimiter &amp;#39;|&amp;#39;;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
&amp;gt;&amp;gt;9|MULTIPOLYGON(((2 6, 2 9, 6 9, 7 7, 4 6, 2 6)),((0 0, 0 5, 1 0, 0 0)),((0 2, 2 5, 4 5, 0 2)))
&amp;gt;&amp;gt;\.
=&amp;gt; SELECT gid, ST_AsText(ST_GeometryN(geom, 2)) FROM multipolygon_geom;
 gid |           ST_AsText
-----+--------------------------------
   9 | POLYGON ((0 0, 0 5, 1 0, 0 0))
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Return all the geometries within a multipolygon:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; CREATE TABLE multipolygon_geom (gid int, geom GEOMETRY(1000));
CREATE TABLE
=&amp;gt; COPY multipolygon_geom(gid, gx FILLER LONG VARCHAR, geom AS ST_GeomFromText(gx)) FROM stdin delimiter &amp;#39;|&amp;#39;;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
&amp;gt;&amp;gt;9|MULTIPOLYGON(((2 6, 2 9, 6 9, 7 7, 4 6, 2 6)),((0 0, 0 5, 1 0, 0 0)),((0 2, 2 5, 4 5, 0 2)))
&amp;gt;&amp;gt;\.
=&amp;gt; CREATE TABLE series_numbers (numbs int);
CREATE TABLE
=&amp;gt; COPY series_numbers FROM STDIN;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
&amp;gt;&amp;gt; 1
&amp;gt;&amp;gt; 2
&amp;gt;&amp;gt; 3
&amp;gt;&amp;gt; 4
&amp;gt;&amp;gt; 5
&amp;gt;&amp;gt; \.
=&amp;gt; SELECT numbs, ST_AsText(ST_GeometryN(geom, numbs))
   FROM multipolygon_geom, series_numbers
   WHERE ST_AsText(ST_GeometryN(geom, numbs)) IS NOT NULL
   ORDER BY numbs ASC;
 numbs |                ST_AsText
-------+------------------------------------------
     1 | POLYGON ((2 6, 2 9, 6 9, 7 7, 4 6, 2 6))
     2 | POLYGON ((0 0, 0 5, 1 0, 0 0))
     3 | POLYGON ((0 2, 2 5, 4 5, 0 2))
(3 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-numgeometries/#&#34;&gt;ST_NumGeometries&lt;/a&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_GeometryType</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-geometrytype/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-geometrytype/</guid>
      <description>
        
        
        &lt;p&gt;Determines the class of a spatial object.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_GeometryType( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want the class, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;VARCHAR&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how to use ST_GeometryType.&lt;/p&gt;
&lt;p&gt;Returns spatial class:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_GeometryType(ST_GeomFromText(&amp;#39;GEOMETRYCOLLECTION(LINESTRING(1 1,
   2 2), POLYGON((1 3,4 5,2 2,1 3)))&amp;#39;));
    ST_GeometryType
-----------------------
 ST_GeometryCollection
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_GeomFromGeoHash</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-geomfromgeohash/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-geomfromgeohash/</guid>
      <description>
        
        
        &lt;p&gt;Returns a polygon in the shape of the specified GeoHash.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_GeomFromGeoHash(&lt;span class=&#34;code-variable&#34;&gt;GeoHash&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;GeoHash&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A valid GeoHash string of arbitrary length.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOGRAPHY&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_GeomFromGeoHash.&lt;/p&gt;
&lt;p&gt;Converts a GeoHash string to a Geography object and back to a GeoHash&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt;  SELECT ST_GeoHash(ST_GeomFromGeoHash(‘vert1c9’));
ST_GeoHash
--------------------
vert1c9
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Returns a polygon of the specified GeoHash and uses &lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-astext/&#34;&gt;ST_AsText&lt;/a&gt; to convert the polygon, rectangle map tile, into Well-Known Text:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt;  SELECT ST_AsText(ST_GeomFromGeoHash(&amp;#39;drt3jj9n4dpcbcdef&amp;#39;));
ST_AsText
------------------------------------------------------------------------------------------------------------------------------------------------------------------
POLYGON ((-71.1459699298 42.3945346513, -71.1459699297 42.3945346513, -71.1459699297 42.3945346513, -71.1459699298 42.3945346513, -71.1459699298 42.3945346513))
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Returns multiple polygons and their areas for the specified GeoHashes. The polygon for the high level GeoHash (1234) has a significant area, while the low level GeoHash (1234567890bcdefhjkmn) has an area of zero.&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt;  SELECT ST_Area(short) short_area, ST_AsText(short) short_WKT, ST_Area(long) long_area, ST_AsText(long) long_WKT from (SELECT ST_GeomFromGeoHash(&amp;#39;1234&amp;#39;) short, ST_GeomFromGeoHash(&amp;#39;1234567890bcdefhjkmn&amp;#39;) long) as foo;
-[ RECORD 1 ]---------------------------------------------------------------------------------------------------------------------------------------------------------------------
short_area | 24609762.8991076
short_WKT  | POLYGON ((-122.34375 -88.2421875, -121.9921875 -88.2421875, -121.9921875 -88.06640625, -122.34375 -88.06640625, -122.34375 -88.2421875))
long_area  | 0
long_WKT   | POLYGON ((-122.196077187 -88.2297377551, -122.196077187 -88.2297377551, -122.196077187 -88.2297377551, -122.196077187 -88.2297377551, -122.196077187 -88.2297377551))
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_GeomFromGeoJSON</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-geomfromgeojson/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-geomfromgeojson/</guid>
      <description>
        
        
        &lt;p&gt;Converts the geometry portion of a GeoJSON record in the &lt;a href=&#34;https://www.ogc.org/standards/eo-geojson&#34;&gt;standard format&lt;/a&gt; into a GEOMETRY object. This function returns an error when you provide a GeoJSON Feature or FeatureCollection object.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_GeomFromGeoJSON( &lt;span class=&#34;code-variable&#34;&gt;geojson&lt;/span&gt; [, &lt;span class=&#34;code-variable&#34;&gt;srid&lt;/span&gt;] [ USING PARAMETERS &lt;span class=&#34;code-variable&#34;&gt;param&lt;/span&gt;=&lt;span class=&#34;code-variable&#34;&gt;value&lt;/span&gt;[,...] ] );
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;geojson&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;String containing a GeoJSON GEOMETRY object, type LONG VARCHAR.
&lt;p&gt;OpenText™ Analytics Database accepts the following GeoJSON key values:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;type&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;coordinates&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;geometries&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;Other key values are ignored.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;srid&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Spatial reference system identifier (SRID) of the GEOMETRY object, type INTEGER.&lt;/p&gt;
&lt;p&gt;The SRID is stored in the GEOMETRY object, but does not influence the results of spatial computations.&lt;/p&gt;

&lt;p&gt;This argument is optional when not performing operations.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;ignore_3d&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;(Optional) Boolean, whether to silently remove 3D and higher-dimensional data from the returned GEOMETRY object or return an error, based on the following values:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;true: Removes 3D and higher-dimensional data from the returned GEOMETRY object.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;false (default): Returns an error when the GeoJSON contains 3D or higher-dimensional data.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;ignore_errors&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;(Optional) Boolean, whether to ignore errors on invalid GeoJSON objects or return an error, based on the following values:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;true: Ignores errors during GeoJSON parsing and returns NULL.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;false (default): Returns an error if GeoJSON parsing fails.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

The &lt;code&gt;ignore_errors&lt;/code&gt; setting takes precedence over the &lt;code&gt;ignore_3d&lt;/code&gt; setting. For example, if &lt;code&gt;ignore_errors&lt;/code&gt; is set to true and &lt;code&gt;ignore_3d&lt;/code&gt; is set to false, the function returns NULL if a GeoJSON object contains 3D and higher-dimensional data.

&lt;/div&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Point&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Multipoint&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Linestring&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Multilinestring&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Polygon&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Multipolygon&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;GeometryCollection&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how to use ST_GeomFromGeoJSON.&lt;/p&gt;
&lt;h3 id=&#34;validating-a-single-record&#34;&gt;Validating a single record&lt;/h3&gt;
&lt;p&gt;The following example validates a ST_GeomFromGeoJSON statement with &lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-isvalid/#&#34;&gt;ST_IsValid&lt;/a&gt;. The statement includes the SRID 4326 to indicate that the point data type represents latitude and longitude coordinates, and sets &lt;code&gt;ignore_3d&lt;/code&gt; to true to ignore the last value that represents the altitude:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_IsValid(ST_GeomFromGeoJSON(&amp;#39;{&amp;#34;type&amp;#34;:&amp;#34;Point&amp;#34;,&amp;#34;coordinates&amp;#34;:[35.3606, 138.7274, 29032]}&amp;#39;, 4326 USING PARAMETERS ignore_3d=true));
 ST_IsValid
------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h3 id=&#34;loading-data-into-a-table&#34;&gt;Loading data into a table&lt;/h3&gt;
&lt;p&gt;The following example processes GeoJSON types from STDIN and stores them in a GEOMETRY data type table column:&lt;/p&gt;
&lt;ol&gt;
&lt;li&gt;
&lt;p&gt;Create a table named &lt;span class=&#34;sql&#34;&gt;polygons&lt;/span&gt; that stores GEOMETRY spatial types:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE polygons(geom GEOMETRY(1000));
CREATE TABLE
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Use COPY to read supported GEOMETRY data types from STDIN and store them in an object named &lt;span class=&#34;sql&#34;&gt;geom&lt;/span&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; COPY polygons(geojson filler VARCHAR(1000), geom as ST_GeomFromGeoJSON(geojson)) FROM STDIN;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
&amp;gt;&amp;gt; { &amp;#34;type&amp;#34;: &amp;#34;Polygon&amp;#34;, &amp;#34;coordinates&amp;#34;: [ [ [100.0, 0.0], [101.0, 0.0], [101.0, 1.0], [100.0, 1.0], [100.0, 0.0] ] ] }
&amp;gt;&amp;gt; { &amp;#34;type&amp;#34;: &amp;#34;Point&amp;#34;, &amp;#34;coordinates&amp;#34;: [1, 2] }
&amp;gt;&amp;gt; { &amp;#34;type&amp;#34;: &amp;#34;Polygon&amp;#34;, &amp;#34;coordinates&amp;#34;: [ [ [1, 3], [3, 2], [1, 1], [3, 0], [1, 0], [1, 3] ] ] }
&amp;gt;&amp;gt; \.
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Query the &lt;span class=&#34;sql&#34;&gt;polygons&lt;/span&gt; table. The following example uses &lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-astext/#&#34;&gt;ST_AsText&lt;/a&gt; to return the &lt;span class=&#34;sql&#34;&gt;geom&lt;/span&gt; object in its &lt;a href=&#34;../../../../en/data-analysis/geospatial-analytics/ogc-spatial-definitions/spatial-object-representations/well-known-text-wkt/#&#34;&gt;Well-known text (WKT)&lt;/a&gt; representation, and uses &lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-isvalid/#&#34;&gt;ST_IsValid&lt;/a&gt; to validate each object:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(geom), ST_IsValid(geom) FROM polygons;
                   ST_AsText                   | ST_IsValid
-----------------------------------------------+------------
 POINT (1 2)                                   | t
 POLYGON ((1 3, 3 2, 1 1, 3 0, 1 0, 1 3))      | f
 POLYGON ((100 0, 101 0, 101 1, 100 1, 100 0)) | t
(3 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;/li&gt;
&lt;/ol&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_GeomFromText</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-geomfromtext/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-geomfromtext/</guid>
      <description>
        
        
        &lt;p&gt;Converts a Well-Known Text (WKT) string into its corresponding GEOMETRY object. Use this function to convert a WKT string into the format expected by the OpenText™ Analytics Database Place functions.&lt;/p&gt;
&lt;p&gt;A GEOMETRY object is a spatial object defined by the coordinates of a plane. Coordinates are expressed as points on a Cartesian plane (&lt;em&gt;x&lt;/em&gt;,&lt;em&gt;y&lt;/em&gt;). SRID values of 0 to 2&lt;sup&gt;32-1&lt;/sup&gt; are valid. SRID values outside of this range will generate an error.&lt;/p&gt;
&lt;p&gt;The maximum size of a GEOMETRY object is 10 MB. If you pass a WKT to ST_GeomFromText and the result is a spatial object whose size is greater than 10 MB, &lt;code&gt;ST_GeomFromText&lt;/code&gt; returns an error.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;http://www.opengeospatial.org&#34;&gt;Open Geospatial Consortium (OGC)&lt;/a&gt; defines the format of a WKT representation. See section 7 in the &lt;a href=&#34;http://www.opengeospatial.org/standards/sfa&#34;&gt;Simple Feature Access Part 1 - Common Architecture&lt;/a&gt; specification.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_GeomFromText( &lt;span class=&#34;code-variable&#34;&gt;wkt&lt;/span&gt; [, &lt;span class=&#34;code-variable&#34;&gt;srid&lt;/span&gt;] [ USING PARAMETERS &lt;span class=&#34;code-variable&#34;&gt;ignore_errors&lt;/span&gt;={&amp;#39;y&amp;#39;|&amp;#39;n&amp;#39;} ])
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;wkt&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Well-Known Text (WKT) string of a GEOMETRY object, type LONG VARCHAR.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;srid&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;(Optional when not performing operations)
&lt;p&gt;Spatial reference system identifier (SRID) of the GEOMETRY object, type INTEGER.&lt;/p&gt;
&lt;p&gt;The SRID is stored in the GEOMETRY object, but does not influence the results of spatial computations.&lt;/p&gt;

&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;ignore_errors&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;(Optional) ST_GeomFromText returns the following, based on parameters supplied:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;NULL—If &lt;code&gt;wkt&lt;/code&gt; is invalid and &lt;code&gt;ignore_errors&lt;/code&gt;=&lt;code&gt;&#39;y&#39;&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Error—If &lt;code&gt;wkt&lt;/code&gt; is invalid and &lt;code&gt;ignore_errors&lt;/code&gt;=&lt;code&gt;&#39;n&#39;&lt;/code&gt; or is unspecified.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how to use ST_GeomFromText.&lt;/p&gt;
&lt;p&gt;Convert WKT into a GEOMETRY object:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; SELECT ST_Area(ST_GeomFromText(&amp;#39;POLYGON((1 1,2 3,3 5,0 5,1 -2,0 0,1 1))&amp;#39;));
 ST_Area
---------
       6
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_GeomFromWKB</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-geomfromwkb/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-geomfromwkb/</guid>
      <description>
        
        
        &lt;p&gt;Converts the Well-Known Binary (WKB) value to its corresponding GEOMETRY object. Use this function to convert a WKB into the format expected by many of the OpenText™ Analytics Database Place functions.&lt;/p&gt;
&lt;p&gt;A GEOMETRY object is a spatial object with coordinates (&lt;em&gt;x&lt;/em&gt;,&lt;em&gt;y&lt;/em&gt;) defined in the Cartesian plane.&lt;/p&gt;
&lt;p&gt;The maximum size of a GEOMETRY object is 10 MB. If you pass a WKB to &lt;code&gt;ST_GeomFromWKB&lt;/code&gt; and the result is a spatial object whose size is greater than 10 MB, &lt;code&gt;ST_GeomFromWKB&lt;/code&gt; returns an error.&lt;/p&gt;
&lt;p&gt;The &lt;a href=&#34;http://www.opengeospatial.org&#34;&gt;Open Geospatial Consortium (OGC)&lt;/a&gt; defines the format of a WKB representation in section 8 in the &lt;a href=&#34;http://www.opengeospatial.org/standards/sfa&#34;&gt;Simple Feature Access Part 1 - Common Architecture&lt;/a&gt; specification.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_GeomFromWKB( &lt;span class=&#34;code-variable&#34;&gt;wkb&lt;/span&gt;[, &lt;span class=&#34;code-variable&#34;&gt;srid&lt;/span&gt;] [ USING PARAMETERS &lt;span class=&#34;code-variable&#34;&gt;ignore_errors&lt;/span&gt;={&amp;#39;y&amp;#39;|&amp;#39;n&amp;#39;} ])
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;wkb&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Well-Known Binary (WKB) value of a GEOMETRY object, type LONG VARBINARY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;srid&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;(Optional) Spatial reference system identifier (SRID) of the GEOMETRY object, type INTEGER.
&lt;p&gt;The SRID is stored in the GEOMETRY object, but does not influence the results of spatial computations.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;ignore_errors&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;(Optional) &lt;code&gt;ST_GeomFromWKB&lt;/code&gt; returns the following, based on the parameters supplied:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;NULL—If &lt;code&gt;wkb&lt;/code&gt; is invalid and &lt;code&gt;ignore_errors&lt;/code&gt;=&lt;code&gt;&#39;y&#39;&lt;/code&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Error—If &lt;code&gt;wkb&lt;/code&gt; is invalid and &lt;code&gt;ignore_errors&lt;/code&gt;=&lt;code&gt;&#39;n&#39;&lt;/code&gt; or is unspecified.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how to use ST_GeomFromWKB.&lt;/p&gt;
&lt;p&gt;Convert GEOMETRY into WKT:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE t(g GEOMETRY);
CREATE TABLE
=&amp;gt; INSERT INTO t VALUES(
ST_GeomFromWKB(X&amp;#39;0103000000010000000400000000000000000000000000000000000000000000000000f
               03f0000000000000000f64ae1c7022db544000000000000f03f00000000000000000000000000000000&amp;#39;));
 OUTPUT
--------
      1
(1 row)
=&amp;gt; SELECT ST_AsText(g) from t;
             ST_AsText
------------------------------------
 POLYGON ((0 0, 1 0, 1e+23 1, 0 0))
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Intersection</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-intersection/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-intersection/</guid>
      <description>
        
        
        &lt;p&gt;Calculates the set of points shared by two GEOMETRY objects.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Intersection( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Intersection.&lt;/p&gt;
&lt;p&gt;Two polygons intersect at a single point:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-intersection/st-intersection-pol-1.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Intersection(ST_GeomFromText(&amp;#39;POLYGON((0 2,1 1,0 -1,
   0 2))&amp;#39;),ST_GeomFromText(&amp;#39;POLYGON((-1 2,0 0,-2 0,-1 2))&amp;#39;)));
    ST_AsText
-----------------
 POINT(0 0)
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Two polygons:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-intersection/st-intersection-pol-2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Intersection(ST_GeomFromText(&amp;#39;POLYGON((1 2,1 5,4 5,
   4 2,1 2))&amp;#39;), ST_GeomFromText(&amp;#39;POLYGON((3 1,3 3,5 3,5 1,3 1))&amp;#39;)));
 ST_AsText
------------------
POLYGON ((4 3, 4 2, 3 2, 3 3, 4 3))
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Two non-intersecting linestrings:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-intersection/st-intersection-pol-3.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Intersection(ST_GeomFromText(&amp;#39;LINESTRING(1 1,1 3,3 3)&amp;#39;),
   ST_GeomFromText(&amp;#39;LINESTRING(1 5,1 7,-1 7)&amp;#39;)));
        ST_AsText
--------------------------
 GEOMETRYCOLLECTION EMPTY
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Intersects</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-intersects/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-intersects/</guid>
      <description>
        
        
        &lt;p&gt;Determines if two GEOMETRY or GEOGRAPHY objects intersect or touch at a single point. If ST_Disjoint returns TRUE, ST_Intersects returns FALSE for the same GEOMETRY or GEOGRAPHY objects.&lt;/p&gt;
&lt;p&gt;GEOGRAPHY Polygons with a vertex or border on the International Date Line (IDL) or the North or South pole are not supported.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Intersects( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;
                  [USING PARAMETERS bbox={true | false}, spheroid={true | false}])
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;bbox = {true | false}&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Boolean. Intersects the bounding box of &lt;code&gt;g1&lt;/code&gt; and &lt;code&gt;g2&lt;/code&gt;.
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; False&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;spheroid = {true | false}&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;(Optional) BOOLEAN that specifies whether to use a perfect sphere or WGS84.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default&lt;/strong&gt;: False&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;BOOLEAN&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Point&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Multipoint&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Linestring&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Multilinestring&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Polygon&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Multipolygon&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
GeometryCollection&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Compatible GEOGRAPHY pairs:

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point-Point&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring-Point&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon-Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon-Point&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Intersects.&lt;/p&gt;
&lt;p&gt;Two polygons do not intersect or touch:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-intersects/st-intersects-pol-1.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Intersects (ST_GeomFromText(&amp;#39;POLYGON((-1 2,0 3,0 1,-1 2))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((1 0,1 1,2 2,1 0))&amp;#39;));
 ST_Intersects
--------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Two polygons touch at a single point:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-intersects/st-intersects-pol-2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Intersects (ST_GeomFromText(&amp;#39;POLYGON((-1 2,0 3,0 1,-1 2))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((1 0,1 1,0 1,1 0))&amp;#39;));
 ST_Intersects
--------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Two polygons intersect:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-intersects/st-intersects-pol-3.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Intersects (ST_GeomFromText(&amp;#39;POLYGON((-1 2, 0 3, 0 1, -1 2))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((0 2, -1 3, -2 0, 0 2))&amp;#39;));
 ST_Intersects
--------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-disjoint/#&#34;&gt;ST_Disjoint&lt;/a&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_IsEmpty</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-isempty/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-isempty/</guid>
      <description>
        
        
        &lt;p&gt;Determines if a spatial object represents the empty set. An empty object has no dimension.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_IsEmpty( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;BOOLEAN&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how to use ST_IsEmpty.&lt;/p&gt;
&lt;p&gt;An empty polygon:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_IsEmpty(ST_GeomFromText(&amp;#39;GeometryCollection EMPTY&amp;#39;));
 ST_IsEmpty
------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_IsSimple</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-issimple/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-issimple/</guid>
      <description>
        
        
        &lt;p&gt;Determines if a spatial object does not intersect itself or touch its own boundary at any point.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_IsSimple( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;BOOLEAN&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_IsSimple.&lt;/p&gt;
&lt;p&gt;Polygon does not intersect itself:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-is-simple/st-is-simple-pol-1.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_IsSimple(ST_GeomFromText(&amp;#39;POLYGON((-1 2,0 3,1 2,1 -2,-1 2))&amp;#39;));
 ST_IsSimple
--------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Linestring intersects itself.:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-is-simple/st-is-simple-pol-2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_IsSimple(ST_GeographyFromText(&amp;#39;LINESTRING(10 10,25 25,26 34.5,
   10 30,10 20,20 10)&amp;#39;));
 St_IsSimple
-------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Linestring touches its interior at one or more locations:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-is-simple/st-is-simple-pol-3.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_IsSimple(ST_GeomFromText(&amp;#39;LINESTRING(0 0,0 1,1 0,2 1,2 0,0 0)&amp;#39;));
 ST_IsSimple
-------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_IsValid</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-isvalid/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-isvalid/</guid>
      <description>
        
        
        &lt;p&gt;Determines if a spatial object is well formed or valid. If the object is valid, ST_IsValid returns TRUE; otherwise, it returns FALSE. Use STV_IsValidReason to identify the location of the invalidity.&lt;/p&gt;
&lt;p&gt;Spatial validity applies only to polygons and multipolygons. A polygon or multipolygon is valid if all of the following are true:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The polygon is closed; its start point is the same as its end point.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Its boundary is a set of linestrings.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The boundary does not touch or cross itself.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Any polygons in the interior do not touch the boundary of the exterior polygon except at a vertex.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;The &lt;a href=&#34;http://www.opengeospatial.org&#34;&gt;Open Geospatial Consortium (OGC)&lt;/a&gt; defines the validity of a polygon in section 6.1.11.1 of the &lt;a href=&#34;http://www.opengeospatial.org/standards/sfa&#34;&gt;Simple Feature Access Part 1 - Common Architecture&lt;/a&gt; specification.&lt;/p&gt;
&lt;p&gt;If you are not sure if a polygon is valid, run ST_IsValid first. If you pass an invalid spatial object to a OpenText™ Analytics Database Place function, the function fails or returns incorrect results.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_IsValid( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Geospatial object to test for validity, value of type GEOMETRY or GEOGRAPHY (WGS84).&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;BOOLEAN&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_IsValid.&lt;/p&gt;
&lt;p&gt;Valid polygon:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-is-valid/st-is-valid-pol-1.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_IsValid(ST_GeomFromText(&amp;#39;POLYGON((1 1,1 3,3 3,3 1,1 1))&amp;#39;));
 ST_IsValid
------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Invalid polygon:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-is-valid/st-is-valid-pol-2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_IsValid(ST_GeomFromText(&amp;#39;POLYGON((1 3,3 2,1 1,3 0,1 0,1 3))&amp;#39;));
 ST_IsValid
------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Invalid polygon:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-is-valid/st-is-valid-pol-3.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_IsValid(ST_GeomFromText(&amp;#39;POLYGON((0 0,2 2,0 2,2 0,0 0))&amp;#39;));
 ST_IsValid
------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Invalid multipolygon:.&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-is-valid/st-is-valid-pol-4.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_IsValid(ST_GeomFromText(&amp;#39;MULTIPOLYGON(((0 0, 0 1, 1 1, 0 0)),
   ((0.5 0.5, 0.7 0.5, 0.7 0.7, 0.5 0.7, 0.5 0.5)))&amp;#39;));
 ST_IsValid
------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Valid polygon with hole:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-is-valid/st-is-valid-pol-5.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_IsValid(ST_GeomFromText(&amp;#39;POLYGON((1 1,3 3,6 -1,0.5 -1,1 1),
   (1 1,3 1,2 0,1 1))&amp;#39;));
 ST_IsValid
------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Invalid polygon with hole:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-is-valid/st-is-valid-pol-6.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_IsValid(ST_GeomFromText(&amp;#39;POLYGON((1 1,3 3,6 -1,0.5 -1,1 1),
   (1 1,4.5 1,2 0,1 1))&amp;#39;));
 ST_IsValid
------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Length</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-length/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-length/</guid>
      <description>
        
        
        &lt;p&gt;Calculates the length of a spatial object. For GEOMETRY objects, the length is measured in Cartesian coordinate units. For GEOGRAPHY objects, the length is measured in meters.&lt;/p&gt;
&lt;p&gt;Calculates the length as follows:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;The length of a point or multipoint object is 0.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The length of a linestring is the sum of the lengths of each line segment The length of a line segment is the distance from the start point to the end point.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The length of a polygon is the sum of the lengths of the exterior boundary and any interior boundaries.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The length of a multilinestring, multipolygon, or geometrycollection is the sum of the lengths of all the objects it contains.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

ST_Length does not calculate the length of WKTs or WKBs. To calculate the lengths of those objects, use the &lt;a href=&#34;../../../../en/sql-reference/functions/data-type-specific-functions/string-functions/length/#&#34;&gt;LENGTH&lt;/a&gt; SQL function with ST_AsBinary or ST_AsText.

&lt;/div&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Length( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want to calculate the length, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;FLOAT&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Length.&lt;/p&gt;
&lt;p&gt;Returns length in Cartesian coordinate units:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Length(ST_GeomFromText(&amp;#39;LINESTRING(-1 -1,2 2,4 5,6 7)&amp;#39;));
    ST_Length
------------------
 10.6766190873295
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Returns length in meters:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Length(ST_GeographyFromText(&amp;#39;LINESTRING(-56.12 38.26,-57.51 39.78,
   -56.37 45.24)&amp;#39;));
    ST_Length
------------------
 821580.025733461
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_NumGeometries</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-numgeometries/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-numgeometries/</guid>
      <description>
        
        
        &lt;p&gt;Returns the number of geometries contained within a spatial object. Single GEOMETRY or GEOGRAPHY objects return 1 and empty objects return NULL.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_NumGeometries( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Spatial object of type GEOMETRY or GEOGRAPHY&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;INTEGER&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how to use ST_NumGeometries.&lt;/p&gt;
&lt;p&gt;Return the number of geometries:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; SELECT ST_NumGeometries(ST_GeomFromText(&amp;#39;MULTILINESTRING ((1 5, 2 4, 5 3, 6 6), (3 5, 3 7))&amp;#39;));
 ST_NumGeometries
------------------
                2
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-geometryn/#&#34;&gt;ST_GeometryN&lt;/a&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_NumPoints</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-numpoints/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-numpoints/</guid>
      <description>
        
        
        &lt;p&gt;Calculates the number of vertices of a spatial object, empty objects return NULL.&lt;/p&gt;
&lt;p&gt;The first and last vertex of polygons and multipolygons are counted separately.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_NumPoints( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want to count the vertices, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;INTEGER&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_NumPoints.&lt;/p&gt;
&lt;p&gt;Returns the number of vertices in a linestring:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_NumPoints(ST_GeomFromText(&amp;#39;LINESTRING(1.33 1.56,2.31 3.4,2.78 5.82,
   3.76 3.9,4.11 3.27,5.85 4.34,6.9 4.231,7.61 5.77)&amp;#39;));
 ST_NumPoints
--------------
            8
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Use ST_Boundary and ST_NumPoints to return the number of vertices of a polygon:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_NumPoints(ST_Boundary(ST_GeomFromText(&amp;#39;POLYGON((1 2,1 4,
   2 5,3 6,4 6,5 5,4 4,3 3,1 2))&amp;#39;)));
 ST_NumPoints
--------------
            9
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Overlaps</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-overlaps/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-overlaps/</guid>
      <description>
        
        
        &lt;p&gt;Determines if a GEOMETRY object shares space with another GEOMETRY object, but is not completely contained within that object. They must overlap at their interiors. If two objects touch at a single point or intersect only along a boundary, they do not overlap. Both parameters must have the same dimension; otherwise, ST_Overlaps returns FALSE.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Overlaps ( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;BOOLEAN&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;Data Type&lt;/dt&gt;
&lt;dd&gt;GEOMETRY&lt;/dd&gt;
&lt;dt&gt;Point&lt;/dt&gt;
&lt;dd&gt;Yes&lt;/dd&gt;
&lt;dt&gt;Multipoint&lt;/dt&gt;
&lt;dd&gt;Yes&lt;/dd&gt;
&lt;dt&gt;Linestring&lt;/dt&gt;
&lt;dd&gt;Yes&lt;/dd&gt;
&lt;dt&gt;Multilinestring&lt;/dt&gt;
&lt;dd&gt;Yes&lt;/dd&gt;
&lt;dt&gt;Polygon&lt;/dt&gt;
&lt;dd&gt;Yes&lt;/dd&gt;
&lt;dt&gt;Multipolygon&lt;/dt&gt;
&lt;dd&gt;Yes&lt;/dd&gt;
&lt;dt&gt;GeometryCollection&lt;/dt&gt;
&lt;dd&gt;Yes&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Overlaps.&lt;/p&gt;
&lt;p&gt;Polygon_1 overlaps but does not completely contain Polygon_2:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-is-valid/st-is-valid-pol-4.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Overlaps(ST_GeomFromText(&amp;#39;POLYGON((0 0, 0 1, 1 1, 0 0))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((0.5 0.5, 0.7 0.5, 0.7 0.7, 0.5 0.7, 0.5 0.5))&amp;#39;));
 ST_Overlaps
-------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Two objects with different dimensions:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Overlaps(ST_GeomFromText(&amp;#39;LINESTRING(2 2,4 4)&amp;#39;),
   ST_GeomFromText(&amp;#39;POINT(3 3)&amp;#39;));
 ST_Overlaps
-------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_PointFromGeoHash</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-pointfromgeohash/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-pointfromgeohash/</guid>
      <description>
        
        
        &lt;p&gt;Returns the center point of the specified GeoHash.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_PointFromGeoHash(&lt;span class=&#34;code-variable&#34;&gt;GeoHash&lt;/span&gt;)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;em&gt;&lt;code&gt;GeoHash&lt;/code&gt;&lt;/em&gt;&lt;/dt&gt;
&lt;dd&gt;A valid GeoHash string of arbitrary length.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOGRAPHY POINT&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_PointFromGeoHash.&lt;/p&gt;
&lt;p&gt;Returns the geography point of a high-level GeoHash and uses &lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-astext/#&#34;&gt;ST_AsText&lt;/a&gt; to convert that point into Well-Known Text:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt;  SELECT ST_AsText(ST_PointFromGeoHash(&amp;#39;dr&amp;#39;));
ST_AsText
-------------------------
POINT (-73.125 42.1875)
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Returns the geography point of a detailed GeoHash and uses ST_AsText to convert that point into Well-Known Text:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt;  SELECT ST_AsText(ST_PointFromGeoHash(&amp;#39;1234567890bcdefhjkmn&amp;#39;));
ST_AsText
---------------------------------------
POINT (-122.196077187 -88.2297377551)
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_PointN</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-pointn/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-pointn/</guid>
      <description>
        
        
        &lt;p&gt;Finds the &lt;em&gt;&lt;code&gt;n&lt;/code&gt;&lt;/em&gt;&lt;sup&gt;th&lt;/sup&gt; point of a spatial object. If you pass a negative number, zero, or a number larger than the total number of points on the linestring, ST_PointN returns NULL.&lt;/p&gt;
&lt;p&gt;The vertex order is based on the Well-Known Text (WKT) representation of the spatial object.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_PointN( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;n&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object to search, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;n&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Point in the spatial object to be returned. The index is one-based, type INTEGER&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY or GEOGRAPHY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_PointN.&lt;/p&gt;
&lt;p&gt;Returns the fifth point:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_PointN(ST_GeomFromText(&amp;#39;
          POLYGON(( 2 6, 2 9, 6 9, 7 7, 4 6, 2 6))&amp;#39;), 5));
  ST_AsText
-------------
 POINT (4 6)
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Returns the second point:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_PointN(ST_GeographyFromText(&amp;#39;
          LINESTRING(23.41 24.93,34.2 32.98,40.7 41.19)&amp;#39;), 2));
     ST_AsText
--------------------
 POINT (34.2 32.98)
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Relate</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-relate/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-relate/</guid>
      <description>
        
        
        &lt;p&gt;Determines if a given GEOMETRY object is spatially related to another GEOMETRY object, based on the specified DE-9IM pattern matrix string.&lt;/p&gt;
&lt;p&gt;The DE-9IM standard identifies how two objects are spatially related to each other.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Relate( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;matrix&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;matrix&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;DE-9IM pattern matrix string, type CHAR(9). This string represents a 3 x 3 matrix of restrictions on the dimensions of the respective intersections of the interior, boundary, and exterior of the two geometries. Must contain exactly 9 of the following characters:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;T&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;F&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;0&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;1&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;2&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;&lt;code&gt;*&lt;/code&gt;&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;BOOLEAN&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Relate.&lt;/p&gt;
&lt;p&gt;The DE-9IM pattern for &amp;quot;equals&amp;quot; is &lt;code&gt;&#39;T*F**FFF2&#39;&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Relate(ST_GeomFromText(&amp;#39;LINESTRING(0 1,2 2)&amp;#39;),
   ST_GeomFromText(&amp;#39;LINESTRING(2 2,0 1)&amp;#39;), &amp;#39;T*F**FFF2&amp;#39;);
 ST_Relate
--------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The DE-9IM pattern for &amp;quot;overlaps&amp;quot; is &lt;code&gt;&#39;T*T***T**&#39;&lt;/code&gt;:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Relate(ST_GeomFromText(&amp;#39;POLYGON((-1 -1,0 1,2 2,-1 -1))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((0 1,1 -1,1 1,0 1))&amp;#39;), &amp;#39;T*T***T**&amp;#39;);
 ST_Relate
-----------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_SRID</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-srid/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-srid/</guid>
      <description>
        
        
        &lt;p&gt;Identifies the spatial reference system identifier (SRID) stored with a spatial object.&lt;/p&gt;
&lt;p&gt;The SRID of a GEOMETRY object can only be determined when passing an SRID to either ST_GeomFromText or ST_GeomFromWKB. ST_SRID returns this stored value. SRID values of 0 to 2&lt;sup&gt;32-1&lt;/sup&gt; are valid.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_SRID( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want the SRID, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;INTEGER&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_SRID.&lt;/p&gt;
&lt;p&gt;The default SRID of a GEOMETRY object is 0:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_SRID(ST_GeomFromText(
      &amp;#39;POLYGON((-1 -1,2 2,0 1,-1 -1))&amp;#39;));
 ST_SRID
---------
 0
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The default SRID of a GEOGRAPHY object is 4326:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_SRID(ST_GeographyFromText(
      &amp;#39;POLYGON((22 35,24 35,26 32,22 35))&amp;#39;));
 ST_SRID
---------
 4326
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_SymDifference</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-symdifference/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-symdifference/</guid>
      <description>
        
        
        &lt;p&gt;Calculates all the points in two GEOMETRY objects except for the points they have in common, but including the boundaries of both objects.&lt;/p&gt;
&lt;p&gt;This result is called the symmetric difference and is represented mathematically as: Closure (&lt;em&gt;g1&lt;/em&gt; – &lt;em&gt;g2&lt;/em&gt;) È Closure (&lt;em&gt;g2&lt;/em&gt; – &lt;em&gt;g1&lt;/em&gt;)&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_SymDifference( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_SymDifference.&lt;/p&gt;
&lt;p&gt;Returns the two linestrings:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-sym-difference/st-sym-difference-pol-2.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_SymDifference(ST_GeomFromText(&amp;#39;LINESTRING(30 40,
   30 55)&amp;#39;),ST_GeomFromText(&amp;#39;LINESTRING(30 32.5,30 47.5)&amp;#39;)));
    ST_AsText
-----------------
MULTILINESTRING ((30 47.5, 30 55),(30 32.5,30 40))
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Returns four squares:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-sym-difference/st-sym-difference-pol-1.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_SymDifference(ST_GeomFromText(&amp;#39;POLYGON((2 1,2 4,3 4,
   3 1,2 1))&amp;#39;),ST_GeomFromText(&amp;#39;POLYGON((1 2,1 3,4 3,4 2,1 2))&amp;#39;)));
                                ST_AsText
-------------------------------------------------------------------------
 MULTIPOLYGON (((2 1, 2 2, 3 2, 3 1, 2 1)), ((1 2, 1 3, 2 3, 2 2, 1 2)),
 ((2 3, 2 4, 3 4, 3 3, 2 3)), ((3 2, 3 3, 4 3, 4 2, 3 2)))
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Touches</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-touches/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-touches/</guid>
      <description>
        
        
        &lt;p&gt;Determines if two GEOMETRY objects touch at a single point or along a boundary, but do not have interiors that intersect.&lt;/p&gt;
&lt;p&gt;GEOGRAPHY Polygons with a vertex or border on the International Date Line (IDL) or the North or South pole are not supported.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Touches( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;
                        [USING PARAMETERS spheroid={true | false}] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, value of type GEOMETRY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, value of type GEOMETRY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;spheroid = {true | false}&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;(Optional) BOOLEAN that specifies whether to use a perfect sphere or WGS84.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default&lt;/strong&gt;: False&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;BOOLEAN&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Compatible GEOGRAPHY pairs:

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point-Point&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring-Point&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon-Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon-Point&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Touches.&lt;/p&gt;
&lt;p&gt;Two polygons touch at a single point:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Touches(ST_GeomFromText(&amp;#39;POLYGON((-1 2,0 3,0 1,-1 2))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((1 3,0 3,1 2,1 3))&amp;#39;));
 ST_Touches
------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Two polygons touch only along part of the boundary:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Touches(ST_GeomFromText(&amp;#39;POLYGON((-1 2,0 3,0 1,-1 2))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((1 2,0 3,0 1,1 2))&amp;#39;));
 ST_Touches
------------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Two polygons do not touch at any point:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Touches(ST_GeomFromText(&amp;#39;POLYGON((-1 2,0 3,0 1,-1 2))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((0 2,-1 3,-2 0,0 2))&amp;#39;));
 ST_Touches
------------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Transform</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-transform/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-transform/</guid>
      <description>
        
        
        &lt;p&gt;Returns a new GEOMETRY with its coordinates converted to the spatial reference system identifier (SRID) used by the &lt;code&gt;srid&lt;/code&gt; argument.&lt;/p&gt;
&lt;p&gt;This function supports the following transformations:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;EPSG 4326 (WGS84) to EPSG 3857 (Web Mercator)&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;EPSG 3857 (Web Mercator) to EPSG 4326 (WGS84)&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;p&gt;For EPSG 4326 (WGS84), unless the coordinates fall within the following ranges, conversion results in failure:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Longitude limits: -572 to +572&lt;/li&gt;
&lt;li&gt;Latitude limits: -89.9999999 to +89.9999999&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Transform( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;srid&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object of type GEOMETRY.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;srid&lt;/span&gt; &lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial reference system identifier (SRID) to which you want to convert your spatial object, of type INTEGER.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how you can transform data from Web Mercator (3857) to WGS84 (4326):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Transform(STV_GeometryPoint(7910240.56433, 5215074.23966, 3857), 4326));
        ST_AsText
-------------------------
 POINT (71.0589 42.3601)
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following example shows how you can transform linestring data in a table from WGS84 (4326) to Web Mercator (3857):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE transform_line_example (g GEOMETRY);
CREATE TABLE
=&amp;gt; COPY transform_line_example (gx FILLER LONG VARCHAR, g AS ST_GeomFromText(gx, 4326)) FROM STDIN;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
&amp;gt;&amp;gt; LINESTRING(0 0, 1 1, 2 2, 3 4)
&amp;gt;&amp;gt; \.
=&amp;gt; SELECT ST_AsText(ST_Transform(g, 3857)) FROM transform_line_example;
                                                        ST_AsText
-------------------------------------------------------------------------------------------------------------------------
 LINESTRING (0 -7.08115455161e-10, 111319.490793 111325.142866, 222638.981587 222684.208506, 333958.47238 445640.109656)
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The following example shows how you can transform point data in a table from WGS84 (4326) to Web Mercator (3857):&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE transform_example (x FLOAT, y FLOAT, srid INT);
CREATE TABLE
=&amp;gt; COPY transform_example FROM STDIN;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
&amp;gt;&amp;gt; 42.3601|71.0589|4326
&amp;gt;&amp;gt; 122.4194|37.7749|4326
&amp;gt;&amp;gt; 94.5786|39.0997|4326
&amp;gt;&amp;gt; \.
=&amp;gt; SELECT ST_AsText(ST_Transform(STV_GeometryPoint(x, y, srid), 3857)) FROM transform_example;
              ST_AsText
-------------------------------------
 POINT (4715504.76195 11422441.5961)
 POINT (13627665.2712 4547675.35434)
 POINT (10528441.5919 4735962.8206)
(3 rows)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Union</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-union/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-union/</guid>
      <description>
        
        
        &lt;p&gt;Calculates the union of all points in two spatial objects.&lt;/p&gt;
&lt;p&gt;This result is represented mathematically by: &lt;em&gt;g1&lt;/em&gt; È &lt;em&gt;g2&lt;/em&gt;&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Union( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;GEOMETRY&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following example shows how to use ST_Union.&lt;/p&gt;
&lt;p&gt;Returns a polygon that represents all the points contained in these two polygons:&lt;/p&gt;
&lt;p&gt;&lt;img src=&#34;../../../../images/place/st-union/st-union-pol-1.png&#34; alt=&#34;&#34;&gt;&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_AsText(ST_Union(ST_GeomFromText(&amp;#39;POLYGON((0 2,1 1,0 -1,-1 1,0 2))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((-1 2, 0 0, -2 0, -1 2))&amp;#39;)));
                                     ST_AsText
------------------------------------------------------------------------------
 POLYGON ((0 2, 1 1, 0 -1, -0.5 0, -2 0, -1 2, -0.666666666667 1.33333333333, 0 2))
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Within</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-within/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-within/</guid>
      <description>
        
        
        &lt;p&gt;If spatial object &lt;code&gt;g1&lt;/code&gt; is completely inside of spatial object &lt;code&gt;g2&lt;/code&gt;, then ST_Within returns true. Both parameters must be the same spatial data type. Either specify two GEOMETRY objects or two GEOGRAPHY objects.&lt;/p&gt;
&lt;p&gt;If an object such as a point or linestring only exists along a polygon&#39;s boundary, then ST_Within returns false. The interior of a linestring is all the points along the linestring except the start and end points.&lt;/p&gt;
&lt;p&gt;ST_Within(&lt;code&gt;g``g&lt;/code&gt; is functionally equivalent to ST_Contains(&lt;code&gt;g``g&lt;/code&gt;.&lt;/p&gt;
&lt;p&gt;GEOGRAPHY Polygons with a vertex or border on the International Date Line (IDL) or the North or South pole are not supported.&lt;/p&gt;

&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Within( &lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;
                      [USING PARAMETERS spheroid={true | false}] )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g1&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g2&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object, type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;spheroid = {true | false}&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;(Optional) BOOLEAN that specifies whether to use a perfect sphere or WGS84.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default&lt;/strong&gt;: False&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;BOOLEAN&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;p&gt;Compatible GEOGRAPHY pairs:

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point-Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point-Linestring&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point-Polygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point-Multipolygon&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Within.&lt;/p&gt;
&lt;p&gt;The first polygon is completely contained within the second polygon:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Within(ST_GeomFromText(&amp;#39;POLYGON((0 2,1 1,0 -1,0 2))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((-1 3,2 1,0 -3,-1 3))&amp;#39;));
 ST_Within
-----------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;The point is on a vertex of the polygon, but not in its interior:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Within (ST_GeographyFromText(&amp;#39;POINT(30 25)&amp;#39;),
   ST_GeographyFromText(&amp;#39;POLYGON((25 25,25 35,32.2 35,30 25,25 25))&amp;#39;));
 ST_Within
-----------
 f
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Two polygons are spatially equivalent:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Within (ST_GeomFromText(&amp;#39;POLYGON((-1 2, 0 3, 0 1, -1 2))&amp;#39;),
   ST_GeomFromText(&amp;#39;POLYGON((0 3, -1 2, 0 1, 0 3))&amp;#39;));
 ST_Within
-----------
 t
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-contains/#&#34;&gt;ST_Contains&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/st-overlaps/#&#34;&gt;ST_Overlaps&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_X</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-x/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-x/</guid>
      <description>
        
        
        &lt;p&gt;Determines the &lt;em&gt;&lt;code&gt;x&lt;/code&gt;&lt;/em&gt;- coordinate for a GEOMETRY point or the longitude value for a GEOGRAPHY point.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_X( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Point of type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;FLOAT&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_X.&lt;/p&gt;
&lt;p&gt;Returns the &lt;em&gt;&lt;code&gt;x&lt;/code&gt;&lt;/em&gt;-coordinate:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_X(ST_GeomFromText(&amp;#39;POINT(3.4 1.25)&amp;#39;));
 ST_X
-----
 3.4
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Returns the longitude value:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_X(ST_GeographyFromText(&amp;#39;POINT(25.34 45.67)&amp;#39;));
 ST_X
-------
 25.34
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_XMax</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-xmax/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-xmax/</guid>
      <description>
        
        
        &lt;p&gt;Returns the maximum &lt;em&gt;&lt;code&gt;x&lt;/code&gt;&lt;/em&gt;-coordinate of the minimum bounding rectangle of the GEOMETRY or GEOGRAPHY object.&lt;/p&gt;
&lt;p&gt;For GEOGRAPHY types, OpenText™ Analytics Database Place computes maximum coordinates by calculating the maximum longitude of the great circle arc from (MAX(longitude), ST_YMin(GEOGRAPHY)) to (MAX(longitude), ST_YMax(GEOGRAPHY)). In this case, MAX(longitude) is the maximum longitude value of the geography object.&lt;/p&gt;
&lt;p&gt;If either latitude or longitude is out of range, ST_XMax returns the maximum plain value of the geography object.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_XMax( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want to find the maximum &lt;em&gt;&lt;code&gt;x&lt;/code&gt;&lt;/em&gt;-coordinate, type GEOMETRY or GEOGRAPHY.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;FLOAT&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
&lt;strong&gt;Data Type&lt;/strong&gt;&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_XMax.&lt;/p&gt;
&lt;p&gt;Returns the maximum &lt;em&gt;&lt;code&gt;x&lt;/code&gt;&lt;/em&gt;-coordinate within a rectangle:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_XMax(ST_GeomFromText(&amp;#39;POLYGON((0 1,0 2,1 2,1 1,0 1))&amp;#39;));
  ST_XMax
-----------
     1
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Returns the maximum longitude value within a rectangle:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_XMax(ST_GeographyFromText(
    &amp;#39;POLYGON((-71.50 42.35, -71.00 42.35, -71.00 42.38, -71.50 42.38, -71.50 42.35))&amp;#39;));
  ST_XMax
---------
     -71
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_XMin</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-xmin/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-xmin/</guid>
      <description>
        
        
        &lt;p&gt;Returns the minimum &lt;em&gt;&lt;code&gt;x&lt;/code&gt;&lt;/em&gt;-coordinate of the minimum bounding rectangle of the GEOMETRY or GEOGRAPHY object.&lt;/p&gt;
&lt;p&gt;For GEOGRAPHY types, OpenText™ Analytics Database Place computes minimum coordinates by calculating the minimum longitude of the great circle arc from (MIN(longitude), ST_YMin(GEOGRAPHY)) to (MIN(longitude), ST_YMax(GEOGRAPHY)). In this case, MIN(latitude) represents the minimum longitude value of the geography object&lt;/p&gt;
&lt;p&gt;If either latitude or longitude is out of range, ST_XMin returns the minimum plain value of the geography object.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_XMin( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want to find the minimum &lt;em&gt;&lt;code&gt;x&lt;/code&gt;&lt;/em&gt;-coordinate, type GEOMETRY or GEOGRAPHY.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;FLOAT&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
&lt;strong&gt;Data Type&lt;/strong&gt;&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_XMin.&lt;/p&gt;
&lt;p&gt;Returns the minimum &lt;em&gt;&lt;code&gt;x&lt;/code&gt;&lt;/em&gt;-coordinate within a rectangle:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_XMin(ST_GeomFromText(&amp;#39;POLYGON((0 1,0 2,1 2,1 1,0 1))&amp;#39;));
  ST_XMin
----------
       0
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Returns the minimum longitude value within a rectangle:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_XMin(ST_GeographyFromText(
    &amp;#39;POLYGON((-71.50 42.35, -71.00 42.35, -71.00 42.38, -71.50 42.38, -71.50 42.35))&amp;#39;));
  ST_XMin
----------
    -71.5
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_Y</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-y/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-y/</guid>
      <description>
        
        
        &lt;p&gt;Determines the &lt;em&gt;&lt;code&gt;y&lt;/code&gt;&lt;/em&gt;-coordinate for a GEOMETRY point or the latitude value for a GEOGRAPHY point.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_Y( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Point of type GEOMETRY or GEOGRAPHY&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;FLOAT&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_Y.&lt;/p&gt;
&lt;p&gt;Returns the &lt;em&gt;&lt;code&gt;y&lt;/code&gt;&lt;/em&gt;-coordinate:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Y(ST_GeomFromText(&amp;#39;POINT(3 5.25)&amp;#39;));
 ST_Y
------
 5.25
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Returns the latitude value:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_Y(ST_GeographyFromText(&amp;#39;POINT(35.44 51.04)&amp;#39;));
 ST_Y
-------
 51.04
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_YMax</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-ymax/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-ymax/</guid>
      <description>
        
        
        &lt;p&gt;Returns the maximum &lt;em&gt;&lt;code&gt;y&lt;/code&gt;&lt;/em&gt;-coordinate of the minimum bounding rectangle of the GEOMETRY or GEOGRAPHY object.&lt;/p&gt;
&lt;p&gt;For GEOGRAPHY types, OpenText™ Analytics Database Place computes maximum coordinates by calculating the maximum latitude of the great circle arc from (ST_XMin(GEOGRAPHY), MAX(latitude)) to (ST_XMax(GEOGRAPHY), MAX(latitude)). In this case, MAX(latitude) is the maximum latitude value of the geography object.&lt;/p&gt;
&lt;p&gt;If either latitude or longitude is out of range, ST_YMax returns the maximum plain value of the geography object.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_YMax( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want to find the maximum &lt;em&gt;&lt;code&gt;y&lt;/code&gt;&lt;/em&gt;-coordinate, type GEOMETRY or GEOGRAPHY.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;FLOAT&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
&lt;strong&gt;Data Type&lt;/strong&gt;&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_YMax.&lt;/p&gt;
&lt;p&gt;Returns the maximum &lt;em&gt;&lt;code&gt;y&lt;/code&gt;&lt;/em&gt;-coordinate within a rectangle:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_YMax(ST_GeomFromText(&amp;#39;POLYGON((0 1,0 4,1 4,1 1,0 1))&amp;#39;));
  ST_YMax
-----------
     4
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Returns the maximum latitude value within a rectangle:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_YMax(ST_GeographyFromText(
    &amp;#39;POLYGON((-71.50 42.35, -71.00 42.35, -71.00 42.38, -71.50 42.38, -71.50 42.35))&amp;#39;));
   ST_YMax
------------------
 42.3802715689979
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: ST_YMin</title>
      <link>/en/sql-reference/functions/geospatial-functions/st-ymin/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/st-ymin/</guid>
      <description>
        
        
        &lt;p&gt;Returns the minimum &lt;em&gt;&lt;code&gt;y&lt;/code&gt;&lt;/em&gt;-coordinate of the minimum bounding rectangle of the GEOMETRY or GEOGRAPHY object.&lt;/p&gt;
&lt;p&gt;For GEOGRAPHY types, OpenText™ Analytics Database Place computes minimum coordinates by calculating the minimum latitude of the great circle arc from (ST_XMin(GEOGRAPHY), MIN(latitude)) to (ST_XMax(GEOGRAPHY), MIN(latitude)). In this case, MIN(latitude) represents the minimum latitude value of the geography object.&lt;/p&gt;
&lt;p&gt;If either latitude or longitude is out of range, ST_YMin returns the minimum plain value of the geography object.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;ST_YMin( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt; )
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial object for which you want to find the minimum &lt;em&gt;&lt;code&gt;y&lt;/code&gt;&lt;/em&gt;-coordinate, type GEOMETRY or GEOGRAPHY.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;FLOAT&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 

&lt;th &gt;
&lt;strong&gt;Data Type&lt;/strong&gt;&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Point&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Multipoint&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Linestring&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Multilinestring&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Polygon&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
Multipolygon&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;th &gt;
GeometryCollection&lt;/th&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use ST_YMin.&lt;/p&gt;
&lt;p&gt;Returns the minimum &lt;em&gt;&lt;code&gt;y&lt;/code&gt;&lt;/em&gt;-coordinate within a rectangle:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_YMin(ST_GeomFromText(&amp;#39;POLYGON((0 1,0 4,1 4,1 1,0 1))&amp;#39;));
  ST_YMin
-----------
     1
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Returns the minimum latitude value within a rectangle:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT ST_YMin(ST_GeographyFromText(
    &amp;#39;POLYGON((-71.50 42.35, -71.00 42.35, -71.00 42.38, -71.50 42.38, -71.50 42.35))&amp;#39;));
  ST_YMin
------------------
 42.35
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: STV_AsGeoJSON</title>
      <link>/en/sql-reference/functions/geospatial-functions/stv-asgeojson/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/stv-asgeojson/</guid>
      <description>
        
        
        &lt;p&gt;Returns the geometry or geography argument as a Geometry Javascript Object Notation (GeoJSON) object.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;STV_AsGeoJSON( &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;, [USING PARAMETERS maxdecimals=[&lt;span class=&#34;code-variable&#34;&gt;dec_value&lt;/span&gt;]])
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Spatial object of type GEOMETRY or GEOGRAPHY&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;maxdecimals = &lt;span class=&#34;code-variable&#34;&gt;dec_value&lt;/span&gt; &lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;(Optional) Integer value. Determines the maximum number of digits to output after the decimal of floating point coordinates.
&lt;p&gt;&lt;strong&gt;Valid values&lt;/strong&gt;**:** Between 0 and 15.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default&lt;/strong&gt;** value****:** 6&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;p&gt;LONG VARCHAR&lt;/p&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (Perfect Sphere)&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how you can use STV_AsGeoJSON.&lt;/p&gt;
&lt;p&gt;Convert a geometry polygon to GeoJSON:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT STV_AsGeoJSON(ST_GeomFromText(&amp;#39;POLYGON((3 2, 4 3, 5 1, 3 2), (3.5 2, 4 2.5, 4.5 1.5, 3.5 2))&amp;#39;));
                                            STV_AsGeoJSON
--------------------------------------------------------------------------------------------------
 {&amp;#34;type&amp;#34;:&amp;#34;Polygon&amp;#34;,&amp;#34;coordinates&amp;#34;:[[[3,2],[4,3],[5,1],[3,2]],[[3.5,2],[4,2.5],[4.5,1.5],[3.5,2]]]}
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Convert a geography point to GeoJSON:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT STV_AsGeoJSON(ST_GeographyFromText(&amp;#39;POINT(42.36011 71.05899)&amp;#39;) USING PARAMETERS maxdecimals=4);
                   STV_AsGeoJSON
-------------------------------------------------
 {&amp;#34;type&amp;#34;:&amp;#34;Point&amp;#34;,&amp;#34;coordinates&amp;#34;:[42.3601,71.059]}
(1 row)
&lt;/code&gt;&lt;/pre&gt;
      </description>
    </item>
    
    <item>
      <title>Sql-Reference: STV_Create_Index</title>
      <link>/en/sql-reference/functions/geospatial-functions/stv-create-index/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/stv-create-index/</guid>
      <description>
        
        
        &lt;p&gt;Creates a spatial index on a set of polygons to speed up spatial intersection with a set of points.&lt;/p&gt;
&lt;p&gt;A spatial index is created from an input polygon set, which can be the result of a query. Spatial indexes are created in a global name space. OpenText™ Analytics Database uses a distributed plan whenever the input table or projection is segmented across nodes of the cluster.&lt;/p&gt;
&lt;p&gt;The OVER() clause must be empty.

&lt;div class=&#34;admonition important&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Important&lt;/h4&gt;
You cannot access spatial indexes on newly added nodes without rebalancing your cluster. For more information, see &lt;a href=&#34;../../../../en/sql-reference/functions/management-functions/cluster-functions/rebalance-cluster/#&#34;&gt;REBALANCE_CLUSTER&lt;/a&gt;.
&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;p&gt;&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;

&lt;div class=&#34;alert admonition note&#34; role=&#34;alert&#34;&gt;
&lt;h4 class=&#34;admonition-head&#34;&gt;Note&lt;/h4&gt;

Indexes are not connected to any specific table. Subsequent DML commands on the underlying table or tables of the input data source do not modify the index.

&lt;/div&gt;&lt;/p&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;STV_Create_Index( &lt;span class=&#34;code-variable&#34;&gt;gid&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;
                   USING PARAMETERS index=&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;index_name&lt;/span&gt;&amp;#39;
                                    [, overwrite={ true | false } ]
                                    [, max_mem_mb=&lt;span class=&#34;code-variable&#34;&gt;maxmem_value&lt;/span&gt;]
                     [, skip_nonindexable_polygons={true | false } ] )
                 OVER()
                    [ AS (&lt;span class=&#34;code-variable&#34;&gt;polygons&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;srid&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;min_x&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;min_y&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;max_x&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;max_y&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;info&lt;/span&gt;) ]
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;gid&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of an integer column that uniquely identifies the polygon. The gid cannot be NULL.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;g&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of a geometry or geography (WGS84) column or expression that contains polygons and multipolygons. Only polygon and multipolygon can be indexed. Other shape types are excluded from the index.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;parameters&#34;&gt;Parameters&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;index = &lt;span class=&#34;code-variable&#34;&gt;&#39;index_name&#39;&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the index, type VARCHAR. Index names cannot exceed 110 characters. The slash, backslash, and tab characters are not allowed in index names.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;overwrite = [ true | false ]&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;Boolean, whether to overwrite the index, if an index exists. This parameter cannot be NULL.&lt;/p&gt;
&lt;p&gt;&lt;strong&gt;Default:&lt;/strong&gt; False&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;max_mem_mb = &lt;span class=&#34;code-variable&#34;&gt;maxmem_value&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;A positive integer that assigns a limit to the amount of memory in megabytes that &lt;code&gt;STV_Create_Index&lt;/code&gt; can allocate during index construction. On a multi-node database this is the memory limit per node. The default value is 256. Do not assign a value higher than the amount of memory in the GENERAL resource pool. For more information about this pool, see &lt;a href=&#34;../../../../en/admin/monitoring/monitoring-resource-pools/#&#34;&gt;Monitoring resource pools&lt;/a&gt;.
&lt;p&gt;Setting a value for max_mem_mb that is at or near the maximum memory available on the node can negatively affect your system&#39;s performance. For example, it could cause other queries to time out waiting for memory resources during index construction.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;skip_nonindexable_polygons&lt;/span&gt; = [ true | false ]&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;(Optional) BOOLEAN&lt;/p&gt;
&lt;p&gt;In rare cases, intricate polygons (for instance, with too high resolution or anomalous spikes) cannot be indexed. These polygons are considered non-indexable. When set to False, non-indexable polygons cause the index creation to fail. When set to True, index creation can succeed by excluding non-indexable polygons from the index.&lt;/p&gt;
&lt;p&gt;To review the polygons that were not able to be indexed, use STV_Describe_Index with the parameter list_polygon.&lt;/p&gt;
&lt;p&gt;Default: False&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt; &lt;span class=&#34;code-variable&#34;&gt;polygons&lt;/span&gt; &lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of polygons indexed.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt; &lt;span class=&#34;code-variable&#34;&gt;SRID&lt;/span&gt; &lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial reference system identifier.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;min_x, min_y, max_x, max_y&lt;/span&gt; &lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Coordinates of the minimum bounding rectangle (MBR) of the indexed geometries. (&lt;code&gt;min_x&lt;/code&gt;, &lt;code&gt;min_y&lt;/code&gt;) are the south-west coordinates, and (&lt;code&gt;max_x&lt;/code&gt;, &lt;code&gt;max_y&lt;/code&gt;) are the north-east coordinates.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;info&lt;/span&gt; &lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Lists the number of excluded spatial objects as well as their type that were excluded from the index.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;supported-data-types&#34;&gt;Supported data types&lt;/h2&gt;

&lt;table class=&#34;table table-bordered&#34; &gt;



&lt;tr&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
Data Type&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOMETRY&lt;/th&gt; 


&lt;th  class=&#34;cellbold&#34; &gt;
GEOGRAPHY (WGS84)&lt;/th&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Point&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipoint&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Linestring&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multilinestring&lt;/td&gt; 

&lt;td &gt;


No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Polygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
Yes&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
Multipolygon&lt;/td&gt; 

&lt;td &gt;


Yes&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;

&lt;tr&gt; 

&lt;td &gt;
GeometryCollection&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt; 

&lt;td &gt;
No&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;

&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Any user with access to the STV_*_Index functions can describe, rename, or drop indexes created by any other user.&lt;/p&gt;
&lt;h2 id=&#34;recommendations&#34;&gt;Recommendations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Segment large polygon tables across multiple nodes. Table segmentation causes index creation to run in parallel, leveraging the Massively Parallel Processing (MPP) architecture. This significantly reduces execution time on large tables.&lt;/p&gt;
&lt;p&gt;OpenText recommends that you segment the table from which you are building the index when the total number of polygons is large.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;STV_Create_Index can consume large amounts of processing time and memory.&lt;/p&gt;
&lt;p&gt;OpenText recommends that when indexing new data for the first time, you monitor memory usage to be sure it stays within safe limits. Memory usage depends on number of polygons, number of vertices, and the amount of overlap among polygons.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;STV_Create_Index tries to allocate memory before it starts creating the index. If it cannot allocate enough memory, the function fails. If not enough memory is available, try the following:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Create the index at a time of less load on the system.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Avoid concurrent index creation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Try segmenting the input table across the nodes of the cluster.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Ensure that all of the polygons you plan to index are valid polygons. STV_Create_Index and STV_Refresh_Index do not check polygon validity when building an index.&lt;br /&gt;&lt;br /&gt;For more information, see &lt;a href=&#34;../../../../en/data-analysis/geospatial-analytics/working-with-spatial-objects-tables/spatial-joins-with-st-intersects-and-stv-intersect/ensuring-polygon-validity-before-creating-or-refreshing-an-index/#&#34;&gt;Ensuring polygon validity before creating or refreshing an index&lt;/a&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;limitations&#34;&gt;Limitations&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Any indexes created prior to 26.2.x need to re-created.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Index creation fails if there are WGS84 polygons with vertices on the International Date Line (IDL) or the North and South Poles.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The backslash or tab characters are not allowed in index names.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Indexes cannot have names greater than 110 characters.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The following geometries are excluded from the index:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Non-polygons&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Geometries with NULL identifiers&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;NULL (multi) polygon&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;EMPTY (multi) polygon&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Invalid (multi) polygon&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;The following geographies are excluded from the index:&lt;/p&gt;
&lt;ul&gt;
&lt;li&gt;Polygons with holes&lt;/li&gt;
&lt;li&gt;Polygons crossing the International Date Line&lt;/li&gt;
&lt;li&gt;Polygons covering the north or south pole&lt;/li&gt;
&lt;li&gt;Antipodal polygons&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;usage-tips&#34;&gt;Usage tips&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;To cancel an STV_Create_Index run, use &lt;strong&gt;Ctrl&lt;/strong&gt; + &lt;strong&gt;C&lt;/strong&gt;.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If there are no valid polygons in the geom column, STV_Create_Index reports an error in vertica.log and stops index creation.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;If index creation uses a large amount of memory, consider segmenting your data to utilize parallel index creation.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use STV_Create_Index.&lt;/p&gt;
&lt;p&gt;Create an index with a single literal argument:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;
=&amp;gt; SELECT STV_Create_Index(1, ST_GeomFromText(&amp;#39;POLYGON((0 0,0 15.2,3.9 15.2,3.9 0,0 0))&amp;#39;)
     USING PARAMETERS index=&amp;#39;my_polygon&amp;#39;) OVER();
polygons  | SRID | min_x | min_y | max_x | max_y | info
----------+------+-------+-------+-------+-------+------
        1 |    0 |     0 |     0 |   3.9 |  15.2 |
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Create an index from a table:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE pols (gid INT, geom GEOMETRY(1000));
CREATE TABLE
=&amp;gt; COPY pols(gid, gx filler LONG VARCHAR, geom AS ST_GeomFromText(gx)) FROM stdin delimiter &amp;#39;|&amp;#39;;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
&amp;gt;&amp;gt; 1|POLYGON((-31 74,8 70,8 50,-36 53,-31 74))
&amp;gt;&amp;gt; 2|POLYGON((-38 50,4 13,11 45,0 65,-38 50))
&amp;gt;&amp;gt; 3|POLYGON((10 20,15 60,20 45,46 15,10 20))
&amp;gt;&amp;gt; 4|POLYGON((5 20,9 30,20 45,36 35,5 20))
&amp;gt;&amp;gt; 5|POLYGON((12 23,9 30,20 45,36 35,37 67,45 80,50 20,12 23))
&amp;gt;&amp;gt; \.
=&amp;gt; SELECT STV_Create_Index(gid, geom USING PARAMETERS index=&amp;#39;my_polygons_1&amp;#39;, overwrite=true,
    max_mem_mb=256) OVER() FROM pols;
 polygons | SRID | min_x | min_y | max_x | max_y | info
----------+------+-------+-------+-------+-------+------
        5 |    0 |   -38 |    13 |    50 |    80 |
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Create an index in parallel from a partitioned table:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE pols (p INT, gid INT, geom GEOMETRY(1000)) SEGMENTED BY HASH(p) ALL NODES;
CREATE TABLE
=&amp;gt; COPY pols (p, gid, gx filler LONG VARCHAR, geom AS ST_GeomFromText(gx)) FROM stdin delimiter &amp;#39;|&amp;#39;;
Enter data to be copied followed by a newline.
End with a backslash and a period on a line by itself.
&amp;gt;&amp;gt; 1|10|POLYGON((-31 74,8 70,8 50,-36 53,-31 74))
&amp;gt;&amp;gt; 1|11|POLYGON((-38 50,4 13,11 45,0 65,-38 50))
&amp;gt;&amp;gt; 3|12|POLYGON((-12 42,-12 42,27 48,14 26,-12 42))
&amp;gt;&amp;gt; \.
=&amp;gt; SELECT STV_Create_Index(gid, geom USING PARAMETERS index=&amp;#39;my_polygons&amp;#39;, overwrite=true,
    max_mem_mb=256) OVER() FROM pols;
 polygons | SRID | min_x | min_y | max_x | max_y | info
----------+------+-------+-------+-------+-------+------
        3 |    0 |   -38 |    13 |    27 |    74 |
(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/data-analysis/geospatial-analytics/working-with-spatial-objects-tables/spatial-joins-with-st-intersects-and-stv-intersect/#&#34;&gt;Spatial joins with ST_Intersects and STV_Intersect&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/stv-intersect-scalar-function/#&#34;&gt;STV_Intersect scalar function&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/stv-intersect-transform-function/#&#34;&gt;STV_Intersect transform function&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/stv-describe-index/#&#34;&gt;STV_Describe_Index&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/stv-drop-index/#&#34;&gt;STV_Drop_Index&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/stv-rename-index/#&#34;&gt;STV_Rename_Index&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/data-analysis/geospatial-analytics/working-with-spatial-objects-tables/spatial-joins-with-st-intersects-and-stv-intersect/ensuring-polygon-validity-before-creating-or-refreshing-an-index/#&#34;&gt;Ensuring polygon validity before creating or refreshing an index&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
    <item>
      <title>Sql-Reference: STV_Describe_Index</title>
      <link>/en/sql-reference/functions/geospatial-functions/stv-describe-index/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/sql-reference/functions/geospatial-functions/stv-describe-index/</guid>
      <description>
        
        
        &lt;p&gt;Retrieves information about an index that contains a set of polygons. If you do not pass any parameters, STV_Describe_Index returns all of the defined indexes.&lt;/p&gt;
&lt;p&gt;The OVER() clause must be empty.&lt;/p&gt;
&lt;h2 id=&#34;behavior-type&#34;&gt;Behavior type&lt;/h2&gt;
&lt;a class=&#34;glosslink&#34; href=&#34;../../../../en/glossary/immutable-invariant-functions/&#34; title=&#34;&#34;&gt;Immutable&lt;/a&gt;
&lt;h2 id=&#34;syntax&#34;&gt;Syntax&lt;/h2&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;STV_Describe_Index ( [ USING PARAMETERS [index=&amp;#39;&lt;span class=&#34;code-variable&#34;&gt;index_name&lt;/span&gt;&amp;#39;]
                                        [, list_polygons={true | false } ]] ) OVER ()
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;arguments&#34;&gt;Arguments&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;index = &lt;span class=&#34;code-variable&#34;&gt;&#39;index_name&#39;&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of the index, type VARCHAR. Index names cannot exceed 110 characters. The slash, backslash, and tab characters are not allowed in index names.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;list_polygon&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;(Optional) BOOLEAN that specifies whether to list the polygons in the index. The index argument must be used with this argument.&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;returns&#34;&gt;Returns&lt;/h2&gt;
&lt;dl&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;polygons&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Number of polygons indexed.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;SRID&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Spatial reference system identifier.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;min_x&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;min_y&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;max_x&lt;/span&gt;, &lt;span class=&#34;code-variable&#34;&gt;max_y&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Coordinates of the minimum bounding rectangle (MBR) of the indexed geometries. (&lt;code&gt;min_x&lt;/code&gt;, &lt;code&gt;min_y&lt;/code&gt;) are the south-west coordinates, and (&lt;code&gt;max_x&lt;/code&gt;, &lt;code&gt;max_y&lt;/code&gt;) are the north-east coordinates.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;name&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The name of the spatial index(es).&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;gid&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;Name of an integer column that uniquely identifies the polygon. The gid cannot be NULL.&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;state&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;The spatial object&#39;s state in the index. Possible values are:
&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;INDEXED - The spatial object was successfully indexed.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;SELF_INTERSECT - (WGS84 Only) The spatial object was not indexed because one of its edges intersects with another of its edges.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;EDGE_CROSS_IDL - (WGS84 Only) The spatial object was not indexed because one of its edges crosses the International Date Line.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;EDGE_HALF_CIRCLE - (WGS84 Only) The spatial object was not indexed because it contains two adjacent vertices that are antipodal.&lt;/p&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;NON_INDEXABLE - The spatial object was not able to be indexed.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;geography&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The Well-Known Binary (WKB) representation of the spatial object.&lt;/p&gt;
&lt;/dd&gt;
&lt;dt&gt;&lt;code&gt;&lt;span class=&#34;code-variable&#34;&gt;geometry&lt;/span&gt;&lt;/code&gt;&lt;/dt&gt;
&lt;dd&gt;&lt;p&gt;The Well-Known Binary (WKB) representation of the spatial object.&lt;/p&gt;
&lt;/dd&gt;
&lt;/dl&gt;
&lt;h2 id=&#34;privileges&#34;&gt;Privileges&lt;/h2&gt;
&lt;p&gt;Any user with access to the STV_*_Index functions can describe, rename, or drop indexes created by any other user.&lt;/p&gt;
&lt;h2 id=&#34;limitations&#34;&gt;Limitations&lt;/h2&gt;
&lt;p&gt;Some functionality will require the index to be rebuilt if the index was created with 26.2.x or earlier.&lt;/p&gt;
&lt;h2 id=&#34;examples&#34;&gt;Examples&lt;/h2&gt;
&lt;p&gt;The following examples show how to use STV_Describe_Index.&lt;/p&gt;
&lt;p&gt;Retrieve information about the index:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT STV_Describe_Index (USING PARAMETERS index=&amp;#39;my_polygons&amp;#39;) OVER ();
   type   | polygons | SRID | min_x | min_y | max_x | max_y
----------+----------+------+-------+-------+-------+-------
 GEOMETRY |        4 |    0 |    -1 |    -1 |    12 |    12

(1 row)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Return the names of all the defined indexes:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT STV_Describe_Index() OVER ();
       name
------------------
MA_counties_index
my_polygons
NY_counties_index
US_States_Index
(4 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;Return the polygons included in an index:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; SELECT STV_Describe_Index(USING PARAMETERS index=&amp;#39;my_polygons&amp;#39;, list_polygons=TRUE) OVER ();
 gid |     state     |            geometry
-----+---------------+----------------------------------
  12 | INDEXED       | \260\000\000\000\000\000\000\ ...
  14 | INDEXED       | \200\000\000\000\000\000\000\ ...
  10 | NON_INDEXABLE | \274\000\000\000\000\000\000\ ...
  11 | INDEXED       | \260\000\000\000\000\000\000\ ...
(4 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;h2 id=&#34;see-also&#34;&gt;See also&lt;/h2&gt;
&lt;ul&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/data-analysis/geospatial-analytics/working-with-spatial-objects-tables/spatial-joins-with-st-intersects-and-stv-intersect/#&#34;&gt;Spatial joins with ST_Intersects and STV_Intersect&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/stv-intersect-scalar-function/#&#34;&gt;STV_Intersect scalar function&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/stv-intersect-transform-function/#&#34;&gt;STV_Intersect transform function&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/stv-drop-index/#&#34;&gt;STV_Drop_Index&lt;/a&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;a href=&#34;../../../../en/sql-reference/functions/geospatial-functions/stv-rename-index/#&#34;&gt;STV_Rename_Index&lt;/a&gt;
&lt;/li&gt;
&lt;/ul&gt;

      </description>
    </item>
    
  </channel>
</rss>
