Commit 1eaceeaf authored by Michael Auer's avatar Michael Auer
Browse files

fix README.md for syntax highlighting

parent 438f91c0
......@@ -18,11 +18,11 @@ This software is developed by [HeiGIT](https://heigit.org):
## Install
For use as library in Node.js:
```bash
```sh
$ npm install ohsome2x
```
To run the command-line wizard:
```bash
```sh
$ npx ohsome2x-cli
```
......@@ -34,10 +34,10 @@ There are two ways how you can use ohsome2x.
2. Use the interactive command line interface.
Run:
```
npx ohsome2x-cli
```sh
$ npx ohsome2x-cli
OR
node ./ohsome2x-cli/ohsome2x-cli.js
$ node ./ohsome2x-cli/ohsome2x-cli.js
```
## Example
......@@ -45,7 +45,7 @@ There are two ways how you can use ohsome2x.
### Query the number of buildings in a bbox around Heidelberg in a yearly resolution from 2008 to 2020
##### Step 1. You need some input (one or many polygons): heidelberg.geojson
```
```json
{
"type": "FeatureCollection",
"features": [
......@@ -64,28 +64,28 @@ There are two ways how you can use ohsome2x.
```
##### Step 2. Specify your query as JSON (you can use the commandline wizard to create this): myquery.json
```
```json
{
ohsomeQuery: {
queryType: 'elements/count/groupBy/boundary',
keys: 'building',
values: '',
types: 'polygon',
time: '2008/2020/P1Y'
"ohsomeQuery": {
"queryType": "elements/count/groupBy/boundary",
"keys": "building",
"values": "",
"types": "polygon",
"time": "2008/2020/P1Y"
},
source: {
geometryId: 'id',
name: 'heidelberg.geojson',
store: { path: 'heidelberg.geojson', type: 'geojson' }
"source": {
"geometryId": "id",
"name": "heidelberg.geojson",
"store": { "path": "heidelberg.geojson", "type": "geojson" }
},
target: {
horizontalTimestampColumns: false,
createGeometry: true,
transformToWebmercator: false,
storeZeroValues: true,
computeValuePerArea: true,
name: 'heidelberg_buildings_count.geojson',
store: { path: 'heidelberg_buildings_count.geojson', type: 'geojson' }
"target": {
"horizontalTimestampColumns": false,
"createGeometry": true,
"transformToWebmercator": false,
"storeZeroValues": true,
"computeValuePerArea": true,
"name": "heidelberg_buildings_count.geojson",
"store": { "path": "heidelberg_buildings_count.geojson", "type": "geojson" }
}
}
```
......@@ -100,7 +100,7 @@ $ npx ohsome2x-cli run --conf myquery.json
## API
Node:
```ecmascript 6
```js
const Ohsome2X = require('ohsome2x');
// you can create this config using the command-line wizard, run: npx ohsome2x-cli
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment