Saltar al contenido principal
Esta página no tiene versión en español, así que te la mostramos en inglés.

openstreetmap Adaptor developer README.md

Source: https://github.com/OpenFn/adaptors/tree/main/packages/openstreetmap

language-openstreetmap

OpenStreetMap and the OpenStreetMap magnifying glass logo are trademarks of the OpenStreetMap Foundation, and are used with their permission. This adaptor is not endorsed by or affiliated with the OpenStreetMap Foundation.

An OpenFn adaptor for reading OpenStreetMap data through the Overpass API. It is read-only: it does not edit OpenStreetMap.

Documentation​

View the docs site for full technical documentation.

Overpass API documentation:

Configuration​

No credentials are needed. By default the adaptor uses the public instance at overpass-api.de, with the base URL https://overpass-api.de/api (an API path, not a web page). Set baseUrl to the /api base URL of another or a self-hosted Overpass instance.

View the configuration-schema for required and optional configuration properties.

The configuration schema uses JSON Schema draft-07. Run pnpm validate:schemas from the adaptors repo root after editing it.

Usage limits​

The public Overpass instances are shared and free. Regular automated use should stay well within the public instance usage limits (at the time of writing, fewer than 10,000 queries and less than 1 GB of downloads per day). For production workloads, self-host Overpass and set baseUrl.

Overpass has no pagination, so each query returns its whole result in one response. If Overpass gives up on a query (for example it times out or runs out of memory) the adaptor throws Overpass's own error rather than returning partial data. For large extracts, narrow the area, raise queryTimeoutSeconds, or use changedSince to fetch only recent changes.

Data license​

OpenStreetMap data is © OpenStreetMap contributors and available under the Open Database License (ODbL). Any data published downstream, including maps, registries and exports, must credit "© OpenStreetMap contributors".

Development​

Clone the adaptors monorepo. Follow the "Getting Started" guide inside to get set up.

Run tests using pnpm run test or pnpm run test:watch

Build the project using pnpm build.

To build only the docs run pnpm build docs.