Skip to content

Instantly share code, notes, and snippets.

@bitner
Last active October 25, 2021 17:17
Show Gist options
  • Save bitner/9d1c877517aae598d686a5ded8892144 to your computer and use it in GitHub Desktop.
Save bitner/9d1c877517aae598d686a5ded8892144 to your computer and use it in GitHub Desktop.
smallsats_items.sql
SELECT
jsonb_build_object(
'id', items.id,
'datetime', items.datetime,
'collection', items.collection,
'geometry', public.st_asgeojson(items.geometry)::jsonb,
'properties', items.properties,
'assets', items.assets,
'links', items.links
) AS content
FROM items;
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment