GeoSQL.PostGIS.VectorTiles.Layer (GeoSQL v1.4.2)

View Source

A vector tile layer.

Summary

Types

The columns to load from a table to populate the geometry, id, and tags fields in the resulting vector tile layer.

t()

Defines how to a vector tile layer shoudl be loaded from the database.

Types

column_name()

@type column_name() :: atom()

columns_definition()

@type columns_definition() :: %{
  geometry: column_name(),
  id: column_name(),
  tags: column_name()
}

The columns to load from a table to populate the geometry, id, and tags fields in the resulting vector tile layer.

For instance, if the geometry is in a column named footprint, the tag map is stored in a column named details, and the id is building_id, this can be defined as:

  %{geometry: :footprint, id: :building_id, tags: :details}

t()

@type t() :: %GeoSQL.PostGIS.VectorTiles.Layer{
  columns: columns_definition(),
  compose_query_fn: (Ecto.Query.t() -> Ecto.Query.t()),
  name: String.t(),
  prefix: String.t() | nil,
  source: String.t(),
  srid: integer()
}

Defines how to a vector tile layer shoudl be loaded from the database.

  • name: what the layer will be named in the resulting tile
  • source: the table to populate the layer from
  • prefix: the schema prefix for the table, or nil to use the default schema
  • columns: the columns to load from this table. See columns_definition/0
  • srid: the spatial reference ID to return the layer in (defaults to 4326, aka WGS 84)
  • compose_query_fn: an optional function that allows adding custom clauses to the resulting Ecto query