| « 4. GERS | Home | » |
Contents
Overture’s Base theme contains other geospatial data that someone building a map service needs for a complete map. Currently, this includes:
This data is sourced primarily from OpenStreetMap and Overture performs basic classification of the features based on their OSM tags. This data undergoes many QA checks in this process.
First, refer to the setup instructions here.
If you’re running through these queries locally using DuckDB, be sure to specify a database, such as duckdb workshop.dbb, so that you save tables and views that will persist in a future session. Another option is to attach the following database in DuckDB to access the latest Overture data.
LOAD spatial;
ATTACH 'https://labs.overturemaps.org/data/latest.ddb' as overture;
-- Now you can just reference `overture.land` for type=land features
SELECT count(1) from overture.land;
You can also run these queries in a Github codespace. See the Codespace instructions here
LOAD spatial;
CREATE TABLE na_peaks AS (
SELECT
names.primary as name,
elevation,
geometry,
bbox
FROM overture.land
WHERE
subtype = 'physical'
AND class IN ('peak','volcano')
AND names.primary IS NOT NULL
AND elevation IS NOT NULL
AND bbox.xmin BETWEEN -175 AND -48
AND bbox.ymin BETWEEN 10 AND 85
);
COPY(
SELECT
name,
elevation,
geometry
FROM na_peaks
) TO 'na_peaks.geojson' WITH (FORMAT GDAL, DRIVER GeoJSON);
COPY(
SELECT
h3_latlng_to_cell_string(bbox.ymin, bbox.xmin, 7) as h3,
max(elevation) as _max,
min(elevation) as _min,
avg(elevation) as _avg
FROM na_peaks
GROUP BY 1
) TO 'na_dem_h3_hi.csv';
