<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
  <channel>
    <title>OpenText Analytics Database 26.2.x – When to use ST_Intersects vs. STV_Intersect</title>
    <link>/en/data-analysis/geospatial-analytics/working-with-spatial-objects-tables/spatial-joins-with-st-intersects-and-stv-intersect/when-to-use-st-intersects-vs-stv-intersect/</link>
    <description>Recent content in When to use ST_Intersects vs. STV_Intersect on OpenText Analytics Database 26.2.x</description>
    <generator>Hugo -- gohugo.io</generator>
    
	  <atom:link href="/en/data-analysis/geospatial-analytics/working-with-spatial-objects-tables/spatial-joins-with-st-intersects-and-stv-intersect/when-to-use-st-intersects-vs-stv-intersect/index.xml" rel="self" type="application/rss+xml" />
    
    
      
        
      
    
    
    <item>
      <title>Data-Analysis: Performing spatial joins with ST_Intersects</title>
      <link>/en/data-analysis/geospatial-analytics/working-with-spatial-objects-tables/spatial-joins-with-st-intersects-and-stv-intersect/when-to-use-st-intersects-vs-stv-intersect/performing-spatial-joins-with-st-intersects/</link>
      <pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
      
      <guid>/en/data-analysis/geospatial-analytics/working-with-spatial-objects-tables/spatial-joins-with-st-intersects-and-stv-intersect/when-to-use-st-intersects-vs-stv-intersect/performing-spatial-joins-with-st-intersects/</guid>
      <description>
        
        
        &lt;p&gt;The ST_Intersects function determines if two GEOMETRY objects intersect or touch at a single point.&lt;/p&gt;
&lt;p&gt;Use ST_Intersects when you want to identify if a small set of geometries in a column intersect with a given geometry.&lt;/p&gt;
&lt;h2 id=&#34;example&#34;&gt;Example&lt;/h2&gt;
&lt;p&gt;The following example uses ST_Intersects to compare a column of point geometries to a single polygon. The table that contains the points has 1 million rows.&lt;/p&gt;
&lt;p&gt;ST_Intersects returns only the points that intersect with the polygon. Those points represent about 0.01% of the points in the table:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;=&amp;gt; CREATE TABLE points_1m(gid IDENTITY, g GEOMETRY(100)) ORDER BY g;
=&amp;gt; COPY points_1m(wkt FILLER LONG VARCHAR(100), g AS ST_GeomFromText(wkt))
   FROM LOCAL &amp;#39;/data/points.dat&amp;#39;;
 Rows Loaded
-------------
     1000000
(1 row)
=&amp;gt; SELECT ST_AsText(g) FROM points_1m WHERE
   ST_Intersects
     (
      g,
      ST_GeomFromText(&amp;#39;POLYGON((-71 42, -70.9 42, -70.9 42.1, -71 42.1, -71 42))&amp;#39;)
      );
         st_astext
----------------------------
 POINT (-70.97532 42.03538)
 POINT (-70.97421 42.0376)
 POINT (-70.99004 42.07538)
 POINT (-70.99477 42.08454)
 POINT (-70.99088 42.08177)
 POINT (-70.98643 42.07593)
 POINT (-70.98032 42.07982)
 POINT (-70.95921 42.00982)
 POINT (-70.95115 42.02177)
...
(116 rows)
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;OpenText recommends that you test the intersections of two columns of geometries by creating a spatial index. Use one of the STV_Intersect functions as described in &lt;a href=&#34;../../../../../../en/data-analysis/geospatial-analytics/working-with-spatial-objects-tables/spatial-joins-with-st-intersects-and-stv-intersect/stv-intersect-scalar-function-vs-transform-function/#&#34;&gt;STV_Intersect: scalar function vs. transform function&lt;/a&gt;.&lt;/p&gt;

      </description>
    </item>
    
  </channel>
</rss>
