Spatial query structure
Performing any kind of query on geospatial data that interrogates the location information of the geometry can be referred to as a spatial query. Spatial queries unlock new opportunities and threats by adding the context of where the data exists. Not only can you determine where a particular feature sits on Earth but you can also find out what that feature is close to, contained within, or related to.
Spatial queries follow the similar SQL format of attribute queries but gain location awareness. When working with geospatial data, it is important to always know the coordinate reference system of your data. The coordinate system can be specified as an argument when converting latitude and longitude into a point geometry. Knowing the correct reference system will ensure that your location accuracy is maintained throughout conversions and transformations.
A common example of where spatial queries can provide unique insights can be seen with the ST_Contains...