=head1 NAME

Geo::Geos::WKBReader - Reads a Geometry from Well-Known Binary format.

=head1 SYNOPSIS

    use Geo::Geos::GeometryFactory;
    use Geo::Geos::PrecisionModel qw/TYPE_FLOATING/;
    use Geo::Geos::WKBReader;
    use Geo::Geos::WKBWriter;
    use Geo::Geos::WKBConstants qw/TYPE_BYTEORDER_BE/;

    my $pm = Geo::Geos::PrecisionModel->new(TYPE_FLOATING);
    my $gf = Geo::Geos::GeometryFactory::create($pm, 3857);
    my $c  = Geo::Geos::Coordinate->new(1,2);
    my $p  = $gf->createPoint($c);

    my $dimensions   = 2;
    my $include_SRID = 1;
    my $w = Geo::Geos::WKBWriter->new($dimensions, TYPE_BYTEORDER_BE, $include_SRID);
    my $s1 = $w->write($p);
    my $s2 = $w->writeHEX($p);

    Geo::Geos::WKBReader::read($s1, $gf);       # => isa 'Geo::Geos::Geometry'
    Geo::Geos::WKBReader::read($s1, $gf);       # => isa 'Geo::Geos::Point'
    Geo::Geos::WKBReader::readHEX($s2, $gf);    # => isa 'Geo::Geos::Geometry'
    Geo::Geos::WKBReader::readHEX($s2, $gf);    # => isa 'Geo::Geos::Point'

    my $g = Geo::Geos::WKBReader::readHEX($s2, $gf);
    $g->compareTo($p);      # => 0


=head1 SEE ALSO (C++ classes docs)

L<GEOS C++ Library|https://trac.osgeo.org/geos>

geos::io::WKBReader

L<Geo::Geos>

L<Geo::Geos::Geometry>

L<Geo::Geos::WKBConstants>

L<Geo::Geos::WKBWriter>

=head1 AUTHOR

Ivan Baidakou <i.baydakov@crazypanda.ru>, Crazy Panda, CP Decision LTD

=head1 LICENSE

You may distribute this code under the same terms as Perl itself.

=cut
