[postgis-tickets] r17728 - [doc] geometry polygon ST_Intersects example

Darafei komzpa at gmail.com
Sun Aug 18 05:55:02 PDT 2019


Author: komzpa
Date: 2019-08-18 05:55:01 -0700 (Sun, 18 Aug 2019)
New Revision: 17728

Modified:
   trunk/doc/reference_relationship.xml
Log:
[doc] geometry polygon ST_Intersects example

Closes #4248


Modified: trunk/doc/reference_relationship.xml
===================================================================
--- trunk/doc/reference_relationship.xml	2019-08-18 12:18:59 UTC (rev 17727)
+++ trunk/doc/reference_relationship.xml	2019-08-18 12:55:01 UTC (rev 17728)
@@ -1116,7 +1116,14 @@
 ---------------
  t
 (1 row)
-		</programlisting>
+
+-- Look up in table. Make sure table has a GiST index on geometry column for faster lookup.
+SELECT id, name FROM cities WHERE ST_Intersects(geom, 'SRID=4326;POLYGON((28 53,27.707 52.293,27 52,26.293 52.293,26 53,26.293 53.707,27 54,27.707 53.707,28 53))');
+ id | name
+----+-------
+  2 | Minsk
+(1 row)
+</programlisting>
 		</refsection>
 		<refsection>
 		<title>Geography Examples</title>



More information about the postgis-tickets mailing list