https://github.com/giscience/ohsome-js-utils
This library contains JavaScript functions to help clients to use the Ohsome-Api for analyzing historical OpenStreetMap data.
https://github.com/giscience/ohsome-js-utils
Last synced: 5 months ago
JSON representation
This library contains JavaScript functions to help clients to use the Ohsome-Api for analyzing historical OpenStreetMap data.
- Host: GitHub
- URL: https://github.com/giscience/ohsome-js-utils
- Owner: GIScience
- License: apache-2.0
- Created: 2023-06-13T12:00:21.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2023-06-20T08:42:33.000Z (over 2 years ago)
- Last Synced: 2024-04-09T15:12:03.542Z (almost 2 years ago)
- Language: TypeScript
- Size: 249 KB
- Stars: 1
- Watchers: 7
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[](https://github.com/GIScience/badges#experimental)
Why is it experimental?
It not yet fully supports all response types that the [ohsome API](https://api.ohsome.org/v1/swagger-ui.html) can return.
So currently it mainly supports the functionality needed in the [ohsome Dashboard](https://dashboard.ohsome.org) app.
# Info
This library contains JavaScript functions to help clients to use the Ohsome-Api for analyzing historical OpenStreetMap data.
Functionality includes
+ parsing and validation of request params
+ type-guards, functions to access result values, conversion functions to create CSV output from JSON results
# Usage
## Installation
```shell
$> npm install @giscience/ohsome-js-utils
```
You can use this library in different ways.
## 1. UMD single file bundle for browsers or nodejs scripts
```html
```
```javascript
// nodejs
var OhsomeJsUtils = require( '@giscience/ohsome-js-utils' );
```
## 2. ES2020 modules
```javascript
import * as OhsomeJsUtils from '@giscience/ohsome-js-utils'
// or
import { OhsomeApi } from '@giscience/ohsome-js-utils'
```