Spatial Operations

Components to compute operations and measures on geometries/geographies, or to alter geometry/geography size or shape.

Distance Matrix

Description

This component creates a new table with a distance matrix computed for the geometries contained in an input table.

The output table contains three columns: 'id1', 'id2' and 'distance'.

Inputs

  • Source table [Table]

  • Geo column [Column]

  • Id column [Column]

Outputs

  • Result table [Table]

ST Area

Description

This component creates a new table with an additional column containing the area of the geographies in the input table. This only applies to the case of polygon geographies. For other geography types, the value will be zero.

Inputs

  • Source polygons table [Table]

  • Geo column [Column]

Outputs

  • Result table [Table]

External links

BigQuery reference

Snowflake reference

Redshift reference

PostgreSQL reference

ST Buffer

Description

This component adds a new column with a buffer of the original input geography.

Inputs

  • Source table [Table]

  • Geo column [Column]

  • Distance [Number]

Outputs

  • Result table [Table]

External links

BigQuery reference

Redshift reference

PostgreSQL reference

ST Centroid

Description

This component creates a new table with a new column containing points representing the centroids of the original input geographies.

Inputs

  • Source table [Table]

  • Geo column [Column]

Outputs

  • Result table [Table]

External links

BigQuery reference

Snowflake reference

Redshift reference

PostgreSQL reference

ST Concave Hull

This component requires the CARTO Analytics Toolbox installed in the chosen connection to build the workflow.

Description

This component creates a new table containing a single row with the concave hull of geographies in the input table. The concave hull is stored in a column named 'geo'.

Inputs

  • Source table [Table]

  • Geo column [Column]

  • Max edge (km) [Number]

Outputs

  • Result table [Table]

External links

BigQuery reference

Snowflake reference

ST Convex Hull

Description

This component creates a new table containing a single row with the convex hull of geographies in the input table. The convex hull is stored in a column named 'geo'.

Inputs

  • Source table [Table]

  • Geo column [Column]

Outputs

  • Result table [Table]

External links

BigQuery reference

Redshift reference

PostgreSQL reference

ST Distance

Description

This component calculates the minimum distance between geographies of an input table and those of a second table.

It adds two new columns: 'nearest_id' and 'nearest_distance'.

Inputs

  • Main table [Table]

  • Secondary table [Table]

  • Geo column in main table [Column]

  • Geo column in secondary table [Column]

  • Id column in main table [Column]

  • Id column in secondary table [Column]

  • Radius [Number]

Outputs

  • Result table [Table]

External links

BigQuery reference

Snowflake reference

Redshift reference

PostgreSQL reference

ST Length

Description

This component creates a new table with an additional 'length' column containing the length of the lines in the input table.

Inputs

  • Source lines table [Table]

  • Geo column [Column]

Outputs

  • Result table [Table]

External links

BigQuery reference

Snowflake reference

Redshift reference

PostgreSQL reference

ST Line Interpolate Point

This component requires the CARTO Analytics Toolbox installed in the chosen connection to build the workflow.

Description

This component takes a table and columns containing lines and distances. It adds a new column with points computed measuring the corresponding distance along each line.

Inputs

  • Source table [Table]

  • Lines column [Column]

  • Distance [Number]

Outputs

  • Result table [Table]

External links

BigQuery reference

Snowflake reference

Redshift reference

PostgreSQL reference

ST Perimeter

Description

This component adds a new column containing the perimeter of the geographies in the input table. This only applies to the case of polygon geographies. For other geography types, the value will be zero.

Inputs

  • Source polygons table [Table]

  • Geo column [Column]

Outputs

  • Result table [Table]

External links

BigQuery reference

Snowflake reference

Redshift reference

PostgreSQL reference

ST Simplify

Description

This component adds a new column containing a simplified version of the original input geography.

Inputs

  • Source table [Table]

  • Geo column [Column]

  • Tolerance [Number]

Outputs

  • Result table [Table]

External links

BigQuery reference

Snowflake reference

Redshift reference

PostgreSQL reference

ST Snap to Grid

Description

This component takes an input table and creates a new one replacing its geo column by a new column containing the original input geography snapped to a grid a specified size (in degrees).

Arbitrary grid sizes are not supported. The grid_size parameter is rounded so that it is of the form 10^n, where -10 < n < 0.

Inputs

  • Source table [Table]

  • Geo column [Column]

  • Grid size (degrees) [Number]

Outputs

  • Result table [Table

External links

BigQuery reference

PostgreSQL reference

Last updated

Was this helpful?