Skip to content

Commit

Permalink
Merge pull request #8 from OvertureMaps/upgrade-docusaurus
Browse files Browse the repository at this point in the history
upgrading-docusaurus-to-3.1.0
  • Loading branch information
jenningsanderson authored Feb 7, 2024
2 parents 0854bd4 + b420fdd commit 02a6b44
Show file tree
Hide file tree
Showing 6 changed files with 28,233 additions and 5,300 deletions.
10 changes: 7 additions & 3 deletions docs/accessing-the-data/cloud-services.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ title: Cloud Services
2. Ensure that you are operating in the `us-west-2` region.
3. Run the following command in the Athena Query Console:

<details><summary>Click to view complete `CREATE` command</summary>
<details>
<summary>Click to view complete `CREATE` command</summary>

```sql
CREATE EXTERNAL TABLE `overture`(
Expand Down Expand Up @@ -56,16 +57,18 @@ title: Cloud Services
LOCATION
's3://overturemaps-us-west-2/release/2023-10-19-alpha.0'
```

</details>

4. Load the partitions by running `MSCK REPAIR TABLE overture` or choosing "Load Partitions" from the table options menu.


## Microsft Synapse

1. You will need an Azure account.
2. Create a [Synapse workspace](https://learn.microsoft.com/en-us/azure/synapse-analytics/get-started-create-workspace).

3. <details><summary>Example SQL query to read places in Seattle</summary>
3. <details>
<summary>Example SQL query to read places in Seattle</summary>

```sql
SELECT TOP 10 *
Expand All @@ -91,4 +94,5 @@ title: Cloud Services
AND TRY_CONVERT(FLOAT, JSON_VALUE(bbox, '$.miny')) > 47.5621587
AND TRY_CONVERT(FLOAT, JSON_VALUE(bbox, '$.maxy')) < 47.7120663
```

</details>
27 changes: 18 additions & 9 deletions docs/using-the-data/build-a-map.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ The places data theme represents business and points of interest in the real wor
tippecanoe -fo places.pmtiles -Z13 -z13 -l places places.geojson
```

<details><summary>Tippecanoe flag explanation</summary>
<details>
<summary>Tippecanoe flag explanation</summary>

- `-fo places.pmtiles` The output file will be places.pmtiles. It will be overwritten if it exists.
- `-Z13` and `-z13` will produce a tileset starting at zoom 13 and going up to zoom 13 (only 1 zoom level).
Expand Down Expand Up @@ -98,7 +99,8 @@ The admins theme contains named localities and their administrative boundaries.
tippecanoe -o placenames.pmtiles -Z5 -z10 -l placenames placenames.geojson
```

<details><summary>Tippecanoe flag explanation</summary>
<details>
<summary>Tippecanoe flag explanation</summary>

- `-fo buildings.pmtiles` is our output file. It will be overwritten if it exists.
- `-Z5` and `-z10` will produce a tileset starting at zoom 5 and going up to zoom 13.
Expand Down Expand Up @@ -171,7 +173,8 @@ Overture contains more than 1.3B buildings. While we can use DuckDB again to acc
tippecanoe -fo buildings.pmtiles -Z13 -z13 -l buildings -P buildings.geojsonseq
```

<details><summary>Tippecanoe flag explanation</summary>
<details>
<summary>Tippecanoe flag explanation</summary>

- `-fo buildings.pmtiles` is our output file. It will be overwritten if it exists.
- `-Z13` and `-z13` will produce a tileset starting at zoom 13 and going up to zoom 13 (so only 1 zoom level).
Expand Down Expand Up @@ -223,7 +226,8 @@ Similarly to buildings, we can first use Amazon Athena to generate a CSV of only
tippecanoe -fo roads.pmtiles -Z10 -B10 -z13 -l roads -P roads.geojsonseq
```

<details><summary>Tippecanoe flag explanation</summary>
<details>
<summary>Tippecanoe flag explanation</summary>

- `-fo roads.pmtiles` is our output file. It will be overwritten if it exists.
- `-Z10` and `-z13` will produce a tileset starting at zoom 10 and going up to zoom 13.
Expand All @@ -241,7 +245,8 @@ Similarly to buildings, we can first use Amazon Athena to generate a CSV of only

1. `Land`, `Landuse`, and `Water` are the three types available in the `Base` theme. We can use 3 separate queries to obtain the features and then we can combine them into a single pmtiles archive with different layers.

<details><summary>Athena query to produce `land.csv`</summary>
<details>
<summary>Athena query to produce `land.csv`</summary>

```sql
SELECT subType,
Expand All @@ -267,7 +272,8 @@ Similarly to buildings, we can first use Amazon Athena to generate a CSV of only
```
</details>

<details><summary>Athena query to produce `landuse.csv`</summary>
<details>
<summary>Athena query to produce `landuse.csv`</summary>

```sql
SELECT subType,
Expand All @@ -294,7 +300,8 @@ Similarly to buildings, we can first use Amazon Athena to generate a CSV of only
```
</details>

<details><summary>Athena query to produce `water.csv`</summary>
<details>
<summary>Athena query to produce `water.csv`</summary>

```sql
SELECT subType,
Expand Down Expand Up @@ -322,7 +329,8 @@ Similarly to buildings, we can first use Amazon Athena to generate a CSV of only

2. Use DuckDB to convert the `csv` files into `GeoJSONSeq` files.

<details><summary>DuckDB Query (SQL)</summary>
<details>
<summary>DuckDB Query (SQL)</summary>

```sql
LOAD SPATIAL;
Expand Down Expand Up @@ -363,7 +371,8 @@ Similarly to buildings, we can first use Amazon Athena to generate a CSV of only
--named-layer=water:water.geojsonseq
```

<details><summary>Tippecanoe flag explanation</summary>
<details>
<summary>Tippecanoe flag explanation</summary>

- `-fo tiles/base.pmtiles` is our output file. It will be overwritten if it exists.
- `-Z8` and `-z13` will produce a tileset starting at zoom 8 going up to zoom 13.
Expand Down
7 changes: 5 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
// @ts-check
// Note: type annotations allow type checking and IDEs autocompletion

const lightCodeTheme = require('prism-react-renderer/themes/github');
const darkCodeTheme = require('prism-react-renderer/themes/dracula');
const {themes} = require('prism-react-renderer');

const lightCodeTheme = themes.github;
const darkCodeTheme = themes.dracula;

const defaultUrl = 'https://labs.overturemaps.org/';
const defaultBaseUrl = 'how-to/';
Expand Down Expand Up @@ -98,6 +100,7 @@ const config = {
prism: {
theme: lightCodeTheme,
darkTheme: darkCodeTheme,
additionalLanguages: ['bash', 'diff', 'json'],
},
}),
};
Expand Down
Loading

0 comments on commit 02a6b44

Please sign in to comment.