Skip to main content

GIS Layers

GIS Layers define how data is queried, joined, and displayed within a GIS View.

Each layer represents a single logical dataset sourced from one base table, with optional joins, selected fields, and geometry configuration.


What Is a GIS Layer?

A GIS Layer:

  • Pulls data from a base database table
  • Optionally joins related tables
  • Selects which fields are exposed
  • Defines the geometry used for mapping

Layers are composable and query-driven, not static datasets.


Creating a GIS Layer

Layers are created using the Create GIS Layer popup.

A layer must belong to an existing GIS View.


Core Concepts

Base Table (t0)

The base table is the starting point for the layer query.

  • Acts as FROM table AS t0
  • All joins originate from this table
  • Required to load column metadata

Selected Columns

Selected columns define:

  • What data is returned
  • What attributes are available to the map
  • What fields can be labeled or styled

Unchecked columns are not queried.


Foreign Key Expansion

If a selected column represents a foreign key:

  • The system detects it automatically
  • You may pull specific fields from the related table
  • Joins are created implicitly

Each related field:

  • Can be renamed using an output alias
  • Produces a deterministic SQL join

Geometry Selection

Each layer must resolve exactly one geometry column.

Geometry can come from:

  • A column on the base table
  • A column on a joined (foreign key) table

Only one geometry field may be active at a time.

Geometry selection determines how features are rendered on the map.


Layer Fields

Layer Name (required)

A unique identifier for the layer within the view.

  • Used internally and in URLs
  • Should be stable
  • Not user-facing map text

Examples

  • projects
  • client_properties
  • utilities_water

Visibility

Controls whether the layer is shown by default.

  • Can be toggled later in the UI
  • Does not affect query validity

Z-Index (optional)

Controls render order.

  • Higher values draw on top
  • Useful for overlays and annotations

Opacity (optional)

Visual transparency of the layer.

  • Range: 0.0 to 1.0
  • Does not affect data queries

Zoom Constraints (optional)

Limit layer visibility by zoom level.

  • Useful for performance optimization
  • Common for large datasets

Joins & Query Safety

Joins are:

  • Deterministic
  • Automatically deduplicated
  • Always LEFT JOINs (by default)

This prevents:

  • Accidental row loss
  • Ambiguous geometry resolution
  • Invalid SQL generation

Editing Layers

Editing a layer:

  • Rebuilds its query definition
  • Immediately updates dependent views
  • Preserves layer identity

Relationship to Views

  • Layers must belong to a view
  • A view may contain multiple layers
  • Layers are ordered within the view

Deleting a layer only affects that layer — not the view.


Summary

GIS Layers are the engine of the GIS system.

They define:

  • Where data comes from
  • How tables relate
  • What fields are exposed
  • Which geometry is mapped

Use layers to build powerful, reusable, and safe spatial queries without writing SQL.