Skip to content

Commit 4e6b9b6

Browse files
committed
Review WASM Readme
1 parent 07052cb commit 4e6b9b6

3 files changed

Lines changed: 21 additions & 12 deletions

File tree

underpass-wasm/README.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,26 @@ In other word, an engin able to execute (part of) Overpass Query without the nee
66

77
Yes, it works.
88

9-
## How to use it
9+
## Build
1010

11-
Have a remote OpenStreetMap Parquet file produced by [QuackOSM](https://github.com/kraina-ai/quackosm).
11+
```
12+
yarn build
13+
```
14+
15+
## Prepare data
16+
17+
Folow data setup from [../src/duckdb_quackosm/README.md], but do not run the server.
1218

19+
## Run
20+
21+
Run the demo
22+
```
23+
yarn dev
24+
```
25+
26+
Then go to http://localhost:5173/
27+
28+
## Reuse the lib
1329

1430
```bash
1531
yarn add @teritorio/underpass
@@ -18,21 +34,13 @@ yarn add @teritorio/underpass
1834
```ts
1935
import Underpass from '@teritorio/underpass'
2036

21-
Underpass.getConnection('http://localhost:5173/extract_nofilter_noclip_compact.parquet', (connection: Underpass.Connection) => {
37+
Underpass.getConnection('http://localhost:5173/data/extract_nofilter_noclip_compact.parquet', (connection: Underpass.Connection) => {
2238
connection.query('node[amenity=drinking_water];out;', (osm_object) => {
2339
console.log(osm_object);
2440
});
2541
});
2642
```
2743

28-
## Dev
29-
30-
Build
31-
```
32-
yarn build
33-
yarn dev
34-
```
35-
3644
## Licence
3745

3846
Teritorio, Frédéric Rodrigo, 2025, AGPL.

underpass-wasm/data

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
/home/fred/teritorio/code/Underpass-API/data

underpass-wasm/index.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ <h2>Demo</h2>
1919
<form>
2020
<label for="parquet">QuackOSM Parquet file URL</label></br>
2121
<input type="text" id="parquet" name="parquet" size="60"
22-
value="http://localhost:5173/extract_nofilter_noclip_compact.parquet" /><br>
22+
value="http://localhost:5173/data/extract_nofilter_noclip_compact.parquet" /><br>
2323

2424
<label for="overpass-query">Overpass Query</label></br>
2525
<textarea id="overpass-query" rows="10" cols="60" placeholder="Enter your Overpass query here">

0 commit comments

Comments
 (0)