Skip to content

Commit

Permalink
Regenerate readmes. Fixes Turfjs#426 (Turfjs#427)
Browse files Browse the repository at this point in the history
  • Loading branch information
tmcw authored Jul 5, 2016
1 parent 216e30c commit 232737e
Show file tree
Hide file tree
Showing 52 changed files with 1,365 additions and 1,344 deletions.
5 changes: 4 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
"description": "a node.js library for performing geospatial operations with geojson",
"scripts": {
"test": "npm run lint && lerna bootstrap && lerna run test",
"lint": "eslint packages"
"lint": "eslint packages",
"prepublish": "./scripts/generate-readmes"
},
"repository": {
"type": "git",
Expand Down Expand Up @@ -44,6 +45,8 @@
},
"devDependencies": {
"browserify": "^13.0.0",
"d3-queue": "3.0.1",
"documentation": "4.0.0-beta5",
"eslint": "^2.0.0",
"eslint-config-mourner": "^2.0.0",
"lerna": "2.0.0-beta.20",
Expand Down
43 changes: 19 additions & 24 deletions packages/turf-along/README.md
Original file line number Diff line number Diff line change
@@ -1,27 +1,18 @@
# turf-along

[![build status](https://secure.travis-ci.org/Turfjs/turf-along.png)](http://travis-ci.org/Turfjs/turf-along)
# along

Takes a [line](LineString) and returns a [point](Point) at a specified distance along the line.

**Parameters**

- `line` **Feature<LineString>** input line
- `distance` **[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** distance along the line
- `units` **\[[String](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String)]** can be degrees, radians, miles, or kilometers (optional, default `miles`)

### `turf.along(line, distance, [units=miles])`
**Examples**

Takes a LineString|line and returns a Point|point at a specified distance along the line.


### Parameters

| parameter | type | description |
| --------------- | ----------------------- | --------------------------------------------------------- |
| `line` | Feature\.\<LineString\> | input line |
| `distance` | Number | distance along the line |
| `[units=miles]` | String | _optional:_ can be degrees, radians, miles, or kilometers |


### Example

```js
```javascript
var line = {
"type": "Feature",
"properties": {},
Expand All @@ -48,21 +39,25 @@ var result = {
//=result
```

Returns **Feature&lt;Point>** Point `distance` `units` along the line

---

**Returns** `Feature.<Point>`, Point `distance` `units` along the line
This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

## Installation
### Installation

Requires [nodejs](http://nodejs.org/).
Install this module individually:

```sh
$ npm install turf-along
```

## Tests
Or install the Turf module that includes it as a function:

```sh
$ npm test
$ npm install turf
```


37 changes: 16 additions & 21 deletions packages/turf-area/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
# turf-area

[![build status](https://secure.travis-ci.org/Turfjs/turf-area.png)](http://travis-ci.org/Turfjs/turf-area)

calculate the area of a polygon or multipolygon feature


### `turf.area(input)`
# area

Takes a one or more features and returns their area
in square meters.

**Parameters**

### Parameters

| parameter | type | description |
| --------- | -------------------------- | -------------- |
| `input` | Feature\,FeatureCollection | input features |
- `input` **(Feature | FeatureCollection)** input features

**Examples**

### Example

```js
```javascript
var polygons = {
"type": "FeatureCollection",
"features": [
Expand Down Expand Up @@ -59,21 +50,25 @@ var area = turf.area(polygons);
//=area
```

Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** area in square meters

---

**Returns** `Number`, area in square meters
This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

## Installation
### Installation

Requires [nodejs](http://nodejs.org/).
Install this module individually:

```sh
$ npm install turf-area
```

## Tests
Or install the Turf module that includes it as a function:

```sh
$ npm test
$ npm install turf
```


39 changes: 17 additions & 22 deletions packages/turf-bbox-polygon/README.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,42 @@
# turf-bbox-polygon

[![build status](https://secure.travis-ci.org/Turfjs/turf-bboxPolygon.png)](http://travis-ci.org/Turfjs/turf-bboxPolygon)
# bboxPolygon

turf bboxPolygon module
Takes a bbox and returns an equivalent [polygon](Polygon).

**Parameters**

### `turf.bbox-polygon(bbox)`
- `bbox` **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>** an Array of bounding box coordinates in the form: `[xLow, yLow, xHigh, yHigh]`

Takes a bbox and returns an equivalent Polygon|polygon.
**Examples**


### Parameters

| parameter | type | description |
| --------- | ----------------- | ---------------------------------------------------------------------------------- |
| `bbox` | Array\.\<number\> | an Array of bounding box coordinates in the form: ```[xLow, yLow, xHigh, yHigh]``` |


### Example

```js
```javascript
var bbox = [0, 0, 10, 10];

var poly = turf.bboxPolygon(bbox);

//=poly
```

Returns **Feature&lt;Polygon>** a Polygon representation of the bounding box

---

**Returns** `Feature.<Polygon>`, a Polygon representation of the bounding box
This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

## Installation
### Installation

Requires [nodejs](http://nodejs.org/).
Install this module individually:

```sh
$ npm install turf-bbox-polygon
```

## Tests
Or install the Turf module that includes it as a function:

```sh
$ npm test
$ npm install turf
```


38 changes: 17 additions & 21 deletions packages/turf-bbox/README.md
Original file line number Diff line number Diff line change
@@ -1,25 +1,16 @@
# turf-bbox

[![build status](https://secure.travis-ci.org/Turfjs/turf-bbox.png)](http://travis-ci.org/Turfjs/turf-bbox)

turf bbox module


### `turf.bbox(input)`
# bbox

Takes a set of features, calculates the bbox of all input features, and returns a bounding box.

**Parameters**

### Parameters

| parameter | type | description |
| --------- | -------------------------- | -------------- |
| `input` | Feature\,FeatureCollection | input features |
- `geojson` **(Feature | FeatureCollection)** input features

**Examples**

### Example

```js
```javascript
var input = {
"type": "FeatureCollection",
"features": [
Expand Down Expand Up @@ -68,21 +59,26 @@ var result = {
//=result
```

Returns **[Array](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array)&lt;[number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)>** the bounding box of `input` given
as an array in WSEN order (west, south, east, north)

---

**Returns** `Array.<number>`, the bounding box of `input` given as an array in WSEN order (west, south, east, north)
This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

## Installation
### Installation

Requires [nodejs](http://nodejs.org/).
Install this module individually:

```sh
$ npm install turf-bbox
```

## Tests
Or install the Turf module that includes it as a function:

```sh
$ npm test
$ npm install turf
```


43 changes: 0 additions & 43 deletions packages/turf-bbox/bench.js

This file was deleted.

41 changes: 18 additions & 23 deletions packages/turf-bearing/README.md
Original file line number Diff line number Diff line change
@@ -1,26 +1,17 @@
# turf-bearing

[![build status](https://secure.travis-ci.org/Turfjs/turf-bearing.png)](http://travis-ci.org/Turfjs/turf-bearing)
# bearing

turf bearing module
Takes two [points](Point) and finds the geographic bearing between them.

**Parameters**

### `turf.bearing(start, end)`
- `start` **Feature&lt;Point>** starting Point
- `end` **Feature&lt;Point>** ending Point

Takes two Point|points and finds the geographic bearing between them.
**Examples**


### Parameters

| parameter | type | description |
| --------- | ------------------ | -------------- |
| `start` | Feature\.\<Point\> | starting Point |
| `end` | Feature\.\<Point\> | ending Point |


### Example

```js
```javascript
var point1 = {
"type": "Feature",
"properties": {
Expand Down Expand Up @@ -54,21 +45,25 @@ var bearing = turf.bearing(point1, point2);
//=bearing
```

Returns **[Number](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Number)** bearing in decimal degrees

---

**Returns** `Number`, bearing in decimal degrees
This module is part of the [Turfjs project](http://turfjs.org/), an open source
module collection dedicated to geographic algorithms. It is maintained in the
[Turfjs/turf](https://github.com/Turfjs/turf) repository, where you can create
PRs and issues.

## Installation
### Installation

Requires [nodejs](http://nodejs.org/).
Install this module individually:

```sh
$ npm install turf-bearing
```

## Tests
Or install the Turf module that includes it as a function:

```sh
$ npm test
$ npm install turf
```


Loading

0 comments on commit 232737e

Please sign in to comment.