Skip to content

Commit 2c6eb3c

Browse files
authored
[BUG] fix queries (#314)
* fix queries Signed-off-by: Dana Bauer <dana.bauer@gmail.com> * fight the linter Signed-off-by: Dana Bauer <dana.bauer@gmail.com> --------- Signed-off-by: Dana Bauer <dana.bauer@gmail.com>
1 parent 19bfbf4 commit 2c6eb3c

3 files changed

Lines changed: 30 additions & 27 deletions

File tree

docs/getting-data/cloud-sources.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ The base paths above point to the core map datasets in a release. Overture parti
2424
Example S3 path to the `infrastructure` feature type in the `base` theme:
2525

2626
```
27-
s3://overturemaps-us-west-2/release/2026-02-18.0/theme=base/type=infrastructure/*.parquet
27+
s3://overturemaps-us-west-2/release/<RELEASE>/theme=base/type=infrastructure/*.parquet
2828
```
2929

3030
Path components:
@@ -55,14 +55,14 @@ For bulk downloads, use the [AWS CLI](https://docs.aws.amazon.com/cli/latest/use
5555

5656
```bash
5757
aws s3 cp --no-sign-request --recursive \
58-
s3://overturemaps-us-west-2/release/2026-02-18.0/theme=base/type=infrastructure/ .
58+
s3://overturemaps-us-west-2/release/<RELEASE>/theme=base/type=infrastructure/ .
5959
```
6060

6161
**AzCopy** — download all `place` data from Azure:
6262

6363
```bash
6464
azcopy copy \
65-
"https://overturemapswestus2.dfs.core.windows.net/release/2026-02-18.0/theme=places/type=place/" \
65+
"https://overturemapswestus2.dfs.core.windows.net/release/<RELEASE>/theme=places/type=place/" \
6666
"<local directory path>" --recursive
6767
```
6868

docs/getting-data/quick-start.mdx

Lines changed: 7 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,10 @@ slug: /getting-data/
55
pagination_label: Quickstart
66
---
77

8+
import TabItem from '@theme/TabItem';
9+
import QueryBuilder from '@site/src/components/queryBuilder';
10+
import PlacesWawa from '!!raw-loader!@site/src/queries/duckdb/places_wawa.sql';
11+
812

913
## Explore in the browser
1014

@@ -32,30 +36,9 @@ The tool reads directly from Overture's cloud-hosted GeoParquet and transfers on
3236

3337
[DuckDB](./duckdb) lets you query Overture's GeoParquet files with SQL. [Install DuckDB](https://duckdb.org/docs/installation/), then:
3438

35-
```sql
36-
INSTALL spatial;
37-
INSTALL httpfs;
38-
39-
LOAD spatial;
40-
41-
SET s3_region = 'us-west-2';
42-
43-
COPY(
44-
SELECT
45-
id,
46-
names.primary as name,
47-
categories.primary as category,
48-
addresses[1].freeform as address,
49-
geometry
50-
FROM read_parquet(
51-
's3://overturemaps-us-west-2/release/2026-02-18.0/theme=places/type=place/*',
52-
filename=true, hive_partitioning=1)
53-
WHERE
54-
names.primary ILIKE '%wawa%'
55-
AND bbox.xmin BETWEEN -76.5 AND -74.5
56-
AND bbox.ymin BETWEEN 39.5 AND 40.5
57-
) TO 'wawa_stores.geojson' WITH (FORMAT GDAL, DRIVER 'GeoJSON');
58-
```
39+
40+
<QueryBuilder query={PlacesWawa}></QueryBuilder>
41+
5942

6043
This extracts Wawa convenience stores in the Philadelphia area and saves them as GeoJSON.
6144

src/queries/duckdb/places_wawa.sql

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
LOAD spatial; --noqa
2+
LOAD httpfs; --noqa
3+
4+
SET s3_region = 'us-west-2';
5+
6+
COPY(
7+
SELECT
8+
id,
9+
names.primary as name,
10+
categories.primary as category,
11+
addresses[1].freeform as address,
12+
geometry
13+
FROM read_parquet(
14+
's3://overturemaps-us-west-2/release/__OVERTURE_RELEASE/theme=places/type=place/*',
15+
filename=true, hive_partitioning=1)
16+
WHERE
17+
names.primary ILIKE '%wawa%'
18+
AND bbox.xmin BETWEEN -76.5 AND -74.5
19+
AND bbox.ymin BETWEEN 39.5 AND 40.5
20+
) TO 'wawa_stores.geojson' WITH (FORMAT GDAL, DRIVER 'GeoJSON');

0 commit comments

Comments
 (0)