api.stays_geojson_view
Description
List stays as geojson
Table Definition
CREATE VIEW stays_geojson_view AS (
SELECT (st_asgeojson(tbl.*))::jsonb AS geojson
FROM ( SELECT stay_explore_view.stay_id,
stay_explore_view.moorage_id,
stay_explore_view.moorage_name,
stay_explore_view.stay_name,
stay_explore_view.arrived,
stay_explore_view.stay_code,
stay_explore_view.latitude,
stay_explore_view.longitude,
stay_explore_view.stay_notes,
stay_explore_view.moorage_notes,
stay_explore_view.has_images,
stay_explore_view.images,
st_makepoint(stay_explore_view.longitude, stay_explore_view.latitude) AS st_makepoint
FROM api.stay_explore_view) tbl
)
Columns
| Name | Type | Default | Nullable |
|---|---|---|---|
| geojson | jsonb | true |
Referenced Tables
| Name | Columns | Comment | Type |
|---|---|---|---|
| api.stay_explore_view | 14 | List moorages notes order by stays | VIEW |
Relations
erDiagram
"api.stays_geojson_view" {
jsonb geojson ""
}
Generated by tbls