Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

what is the meaning of && in PostgreSQL?

In PostGIS, what is the result of the && operation between two geometries? In my mind, && returns a boolean, but does return geometry this time. In the following example, the operation is between a LineString and a Polygon.

Firstly, I guess this is the relationship between inclusion and being included. Until I do the following example, I think this should be a relationship of type "intersection". Am I right?

select ST_geomfromtext('linestring(0.1 0.1,1.9 1.9)', 4326) && st_geomfromtext('POLYGON((0 0,0 1,1 1,1 0,0 0))', 4326)

The result is t which represents true.

like image 795
sh g Avatar asked Aug 02 '19 02:08

sh g


People also ask

What symbol means?

1 : something that stands for something else especially : something real that stands for or suggests another thing that cannot in itself be pictured or shown the lion is a symbol of courage. 2 : a letter, character, or sign used instead of a word or group of words the sign + is the symbol for addition. symbol. noun.

What of it meaning?

idiom informal. used to rudely say that you do not think something is important: "That's the third time you've done that!" "Yeah, what of it?"

Who is particular person?

If you say that someone is particular, you mean that they choose things and do things very carefully, and are not easily satisfied.

What does the word LOL means?

Lol is an acronym of laugh out loud. It can be used as an interjection and a verb. Lol is one of the most common slang terms in electronic communications. Even though it means laugh out loud, lol is mostly used to indicate smiling or slight amusement.


1 Answers

It's an intersection operator &&

boolean &&( geometry A , geometry B );

boolean &&( geography A , geography B );

The && operator returns TRUE if the 2D bounding box of geometry A intersects the 2D bounding box of geometry B.

How one could find it using google:

  1. Search for "postgis operators"
  2. On the first page https://postgis.net/docs/reference.html search for &&
like image 183
zerkms Avatar answered Oct 25 '22 01:10

zerkms