Skip to content

Latest commit

 

History

History
50 lines (35 loc) · 968 Bytes

README.md

File metadata and controls

50 lines (35 loc) · 968 Bytes

DuckDB x Overture Maps Geoparquet

How to use:

  1. Install dependencies (duckdb)
$ npm install
  1. Configure the server
/** server.msj */
const PARQUET_PATH = '/yourpathto/overturemap/data';
// or for online direct query to Overture Map
const PARQUET_PATH = 's3://overturemaps-us-west-2/release/2024-04-16-beta.0';
const APP_PORT = 3000;

You will need to add a directory /cache to store requests results.

  1. Launch the server
$ node server.mjs
  1. Browse data

Go to http://localhost:3000/countries to get countries boundaries as geojson

This will create a countries.geojson with a collection of features.

  1. Add more routes

You can create more routes with custom queries.

/** server.mjs */
app.get('/my_new_route', async (req, res) => {
  const fileName = getFileName('mynewroute.json');
  const query = `
    ...complete query here...
  `;

  const data = await doRequest(query, fileName);
  res.send(data);
});