SQL analysis

SQL Interface

EOS Vision provides SQL-based Interface to work with your geodata.

How it works:

The applied SQL queries automatically update the data in the layers and the outcome results immediately show up on the map. The interface supports all the PostGIS functions for spatial processing and analytics.

How to use:

  • Use SQL alias to make queries more readable (the name of the dataset is given with the schema name prefix by default).
  • Use alias to define geometry column while selecting custom attributes.
  • Start typing in to use the word completion feature.
  • Сonvert data into into projected coordinate sysytem, if you need to measure distances or areas or transform it to Geography.
  • Use all the added layers in a single query for advanced processing and analytics.

 

Filtering

Use the WHERE clause to filter records in your dataset, according to how the attributive data is constructed. The syntax of the function is as follows:

SELECT eos_id, column1, column2, … geometry

FROM table_name

WHERE condition;

 

Measurements

You can use the spatial component of your data to measure values for the spatial analysis:

  • Return the area of the polygon or the length of linear object; you can add a custom Measure filter to complete advanced tasks.
  • Convert Geometry to Geography to get accurate results.
  • Filter the noise, which occured while converting raster to vector format and calculate the area of detected fields

The “ST_Area” function would have the following syntax:

ST_Area(geometry::geography)

Measuring distances for Birds Movement Data using “ST_Length” function:

Intersections

SQL allows to check spatial relations between two datasets. To find the spatial correlations use a number of spatial predicates based on DE-9IM.

To answer the question “Are there industrial zones within protected areas?”, make the query, using the following syntax:

SELECT a.eos_id, column1, column2, … a.geometry

FROM schema_name.table_name a, schema_name.table_name2 b

WHERE ST_INTERSECTS(a.geometry, b.geometry)