<commit_before># arc.js

Calculate great circles routes as lines in GeoJSON or WKT format.

Algorithms from http://williams.best.vwh.net/avform.htm#Intermediate

Includes basic support for splitting lines that cross the dateline, based on
a partial port of code from OGR.


# Usage

Require the library in node.js like:

    var arc = require('arc');

Use in the browser like:

    <script src="./arc.js"></script>


# API

**1)** Create start and end coordinates

First we need to declare where the arc should start and end

    var start = { x: -122, y: 48 };
    var end = { x: -77, y: 39 };

Note that `x` here is longitude in degrees and `y` is latitude in degrees.

**2)** Create GreatCircle object

Next we pass the start/end to the `GreatCircle` constructor, along with an optional object representing the properties for this future line.

    var generator = new arc.GreatCircle(start, end, {'name': 'Seattle to DC'});<commit_msg>Add Install section to README.md<commit_after># arc.js
> Calculate great circles routes as lines in GeoJSON or WKT format.

Algorithms from http://williams.best.vwh.net/avform.htm#Intermediate

Includes basic support for splitting lines that cross the dateline, based on
a partial port of code from OGR.

## Install

```bash
$ npm install --save arc.js
```


## Usage

Require the library in node.js like:
```js
var arc = require('arc');
```

Use in the browser like:
```html
<script src="./arc.js"></script>
```

## API

**1)** Create start and end coordinates

First we need to declare where the arc should start and end

    var start = { x: -122, y: 48 };
    var end = { x: -77, y: 39 };

Note that `x` here is longitude in degrees and `y` is latitude in degrees.

**2)** Create GreatCircle object

Next we pass the start/end to the `GreatCircle` constructor, along with an optional object representing the properties for this future line.

    var generator = new arc.GreatCircle(start, end, {'name': 'Seattle to DC'});
{'fraction_non_alphanumeric': 0.10488798370672098, 'fraction_numerical': 0.01120162932790224, 'mean_word_length': 3.781021897810219, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4240745', 'n_tokens_mistral': 624, 'n_tokens_neox': 576, 'n_words': 273}