Working with Geospatial Data in Sigma Computing
Geospatial Analysis in Sigma Computing – Working with location-based data.
Geospatial data is everywhere—from mapping a delivery route to tracking weather patterns. With Sigma Computing, we can take advantage of geospatial data to uncover location-based insights quickly and easily.
What Is Geospatial Data?
Sigma Computing supports a special data type known as geography. This data type is designed to store structured spatial data that represents geographic locations or features. Here’s what we need to know:
- Structured Spatial Data:
- Contains information like points, lines, and areas that represent real-world locations.
- Can be used to map customer locations, distribution centers, or even regions of influence.
- Primary Uses:
- Creating maps for visualization.
- Performing spatial joins to compare and contrast different geographic features.
- Supported Data Sources:
- Sigma directly supports the geography data type when connected to Snowflake and BigQuery.
- When using other connections (like different cloud data warehouses or DBMS), Sigma retrieves data in standard geospatial formats such as Well-Known Text (WKT), though it presents them as plain text.
Understanding Geography Data Formats
Geography data can be represented in multiple formats, each of which visually or textually describes different kinds of geographic features. Here are the key formats and what they represent:
- Well-Known Text (WKT): A textual markup language for representing vector geometry objects.
Examples:
- POINT: POINT (10 20)
Represents a single location defined by X (longitude) and Y (latitude) coordinates.
- LINESTRING: LINESTRING (30 40, 50 60, 70 80)
Describes a sequence of points connected by straight lines, useful for mapping roads or paths.
- POLYGON: POLYGON ((0 0, 10 0, 10 10, 0 10, 0 0))
Defines an area with a boundary, such as a city or a country.
- MULTIPOINT, MULTILINESTRING, and MULTIPOLYGON:
These formats combine multiple points, lines, or polygons into a single entity. They’re useful when we need to represent several related features together.
- Why Use These Formats?
- They standardize how geographic information is stored and shared.
- They allow for a wide range of spatial operations (like distance calculations, overlaps, or containment tests).
Building Geography Map Charts in Sigma
Creating a visual map that shows our geospatial data can add significant value to our analysis. Let’s walk through how we can build a geography map in Sigma.
SIgma Computing offers 3 types of Map charts-
- Map - Points
- Point maps require a numerical column on both the map's LATITUDE and LONGITUDE fields.
- Point maps require a numerical column on both the map's LATITUDE and LONGITUDE fields.

- Map - Region
- Region maps require a single text Columns in the Region property. Column values must match one of the following region types and be consistent within the column.


- Map - Geography
- WKT and JSON formats allow the storage of more complex geographical data than simple numeric lat/long columns.
- Sigma's Map - Geography chart requires a geography or variant data column on the map's Geography field. If our WKT or GeoJSON data is stored as a text column (abc), we can convert it using the Geography or Variant function.
- GeoJSON data must also have "coordinates" nested within a "geometry" key in order to be plotted. In GeoJSON and our geography type, the coordinate order is always longitude, latitude.
Examples
For example, given the following GeoJSON data:

Below is a non-working example, even though it is valid GeoJSON, as it lacks the "geometry" key:

Steps to Build Your Map
- Step 1: Connect to Your Data Source
- Confirm the data source (e.g., Snowflake or BigQuery) supports the geography data type.
- For other connections, geospatial data might appear as text—use Sigma’s Geography or Variant functions to convert it.
- Step 2: Prepare Your Data
- Clean the data and ensure that geography columns are in the proper format (WKT or correctly structured GeoJSON).
- Validate and convert text-based geospatial data using Sigma’s built-in functions if needed.
- Step 3: Create a New Worksheet in Sigma
- Open a new worksheet dedicated to your map.
- Drag and drop the converted geography field into the visualization area.
- Step 4: Configure the Map Visualization
- Choose the map type that suits your data:
- Region Map: For text-based identifiers like state or country names.
- Point Map: For numeric latitude and longitude columns.
- Geography Map: For complex WKT or GeoJSON data.
- Choose the map type that suits your data:
- Adjust layers, colors, and labels to enhance clarity.
Geospatial Joins in Sigma: Intersect and Within
One of the standout features in Sigma Computing is the ability to perform geospatial joins. Geospatial joins helps us answer questions like “Which customer locations lie within a sales region?” or “Which roads cross a specific area?” Sigma offers two main operators for these tasks:
- Intersect Operator:
- What It Does:
- Returns rows from both datasets when their geospatial objects overlap or intersect.
- How to Think About It:
- Imagine two circles on a map. If they overlap, the intersect operator finds those overlapping areas.
- When to Use It:
- Finding common areas between two spatial datasets.
- Mapping where two different features (like service zones and delivery areas) touch.
- What It Does:
- Within Operator:
- What It Does:
- Returns rows where geospatial objects from one dataset are entirely contained within those of another.
- How to Think About It:
- Picture a small park inside a larger city boundary. The “within” operator would show that the park is entirely within the city.
- When to Use It:
- Identifying if a point (like a store location) falls completely inside a predefined boundary (such as a service area).
- What It Does:
Practical Example:
Imagining we have two datasets:
- Dataset A: Contains customer addresses as points.
- Dataset B: Contains sales territories as polygons.
Using the within operator, we can easily find which customers are served by which sales territory. Alternatively , if we want to see areas where customer clusters and sales territories overlap, the intersect operator comes into play.

Explanation:
- Customer Data & Sales Territory Data : Represent the two datasets.
- ST_WITHIN (or) INTERSECT: The join operation where the spatial function (either ST_WITHIN or INTERSECT) is applied.
- Output: The final output, which lists customers along with their corresponding sales territory.
Conclusion
Working with geospatial data in Sigma Computing opens up a new dimension of analysis by allowing us to incorporate real-world location data into our decision-making process.
Whether we’re mapping retail locations, planning distribution routes, or analyzing regional trends, Sigma’s geospatial capabilities make the process efficient and accessible—even for users with limited technical expertise.