Jadpo is experimental and not ready for production. These docs follow the compiler's main branch as of 5 Nov 2026. What's built · Install 0.3.0
jadpo
ReferenceGeospatial

LanguageValues and typesStandard typesGeospatial

FeatureCollection

On this page

A list of features, all with the same shape and properties types, as a map layer.

Use it to send many shapes to a map library in one response. For one shape, use Feature.

Shape

Field Type Required?
features List<Feature<G, P>> Yes

Example

example
type LayerStop = Object {    name: Text}var layer: FeatureCollection<Point, LayerStop> = FeatureCollection { features: [] }assert layer.features == []

Good to know

  • Name both types when you use it: FeatureCollection<Point, LayerStop>.
  • == tells you whether two are the same. < and list.sort_by don't take it, so sort by one of its parts instead.

In JSON

A GeoJSON object of its geometry and properties, in a request, a response or json.write:

json
{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[-0.1276,51.5072]},"properties":{"name":"Site A"}}]}{"type":"FeatureCollection","features":[]}

Details

Text form, storage, how it is shown, and operations

FeatureCollection is in the group Geospatial, and has been in Jadpo since 0.1.0.

Text form

It has no single text form, so text.from and text.parse don't take it.

How it is stored

It is stored in one column named for the field, of type jsonb. {"type":"FeatureCollection","features":[]} is stored as '{"type":"FeatureCollection","features":[]}'::jsonb.

How it is shown to people

text.format(value, locale:) shows it to people in their locale.

With locale: Locale.en_gb:

Value Shown
{"type":"FeatureCollection","features":[{"type":"Feature","geometry":{"type":"Point","coordinates":[-0.1276,51.5072]},"properties":{"name":"Site A"}}]} ""
{"type":"FeatureCollection","features":[]} ""

Operations

It also takes text.format, json.read, json.write and ==. How every standard type behaves says how they work.

Markdown for agents: /docs/types/type-feature-collection.md.Built from Jadpo main at aee2e8f.