<commit_before>Geo I/O WKB Generator
=====================

[![Build Status](https://travis-ci.org/geo-io/wkb-generator.svg?branch=master)](https://travis-ci.org/geo-io/wkb-generator)
[![Coverage Status](https://img.shields.io/coveralls/geo-io/wkb-generator.svg)](https://coveralls.io/r/geo-io/wkb-generator)

Generates [Well-known binary (WKB)](http://en.wikipedia.org/wiki/Well-known_text#Well-known_binary)
representations from geometric objects.

```php
class MyExtractor implements GeoIO\Extractor
{
    public function extractType($geometry)
    {
        if ($geometry instanceof MyPoint) {
            return self::TYPE_POINT;
        }

        // ...
    }

    public function extractCoordinatesFromPoint($point)
    {
        return array(
            'x' => $point->getX(),
            'y' => $point->getY(),
            'z' => null,
            'm' => null,
        );
    }

    // ...
}

$extractor = MyExtractor();
$generator = new GeoIO\WKB\Generator($extractor, array(
    'hex' => true
));

echo $generator->generate(new MyPoint(1, 2));
// Outputs:
// 0101000000000000000000f03f0000000000000040
```

Installation
------------

Install [through composer](http://getcomposer.org). Check the
[packagist page](https://packagist.org/packages/geo-io/wkb-generator) for all
available versions.

```json
{
    "require": {
        "geo-io/wkb-generator": "0.1.*@dev"
    }
}
```

License
-------

Geo I/O WKB Generator is released under the [MIT License](LICENSE).
<commit_msg>Use flat style for coveralls badge<commit_after>Geo I/O WKB Generator
=====================

[![Build Status](https://travis-ci.org/geo-io/wkb-generator.svg?branch=master)](https://travis-ci.org/geo-io/wkb-generator)
[![Coverage Status](https://img.shields.io/coveralls/geo-io/wkb-generator.svg?style=flat)](https://coveralls.io/r/geo-io/wkb-generator)

Generates [Well-known binary (WKB)](http://en.wikipedia.org/wiki/Well-known_text#Well-known_binary)
representations from geometric objects.

```php
class MyExtractor implements GeoIO\Extractor
{
    public function extractType($geometry)
    {
        if ($geometry instanceof MyPoint) {
            return self::TYPE_POINT;
        }

        // ...
    }

    public function extractCoordinatesFromPoint($point)
    {
        return array(
            'x' => $point->getX(),
            'y' => $point->getY(),
            'z' => null,
            'm' => null,
        );
    }

    // ...
}

$extractor = MyExtractor();
$generator = new GeoIO\WKB\Generator($extractor, array(
    'hex' => true
));

echo $generator->generate(new MyPoint(1, 2));
// Outputs:
// 0101000000000000000000f03f0000000000000040
```

Installation
------------

Install [through composer](http://getcomposer.org). Check the
[packagist page](https://packagist.org/packages/geo-io/wkb-generator) for all
available versions.

```json
{
    "require": {
        "geo-io/wkb-generator": "0.1.*@dev"
    }
}
```

License
-------

Geo I/O WKB Generator is released under the [MIT License](LICENSE).

{'fraction_non_alphanumeric': 0.18604651162790697, 'fraction_numerical': 0.029235880398671095, 'mean_word_length': 2.9103896103896103, 'pattern_counts': {'":': 4, '<': 3, '<?xml version=': 0, '>': 19, 'https://': 10, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 4, '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': '5030640', 'n_tokens_mistral': 1084, 'n_tokens_neox': 974, 'n_words': 173}