NAME
Geo::JSON::Utils - Util methods for Geo::JSON classes
VERSION
version 0.004
DESCRIPTION
Util methods for Geo::JSON
METHODS
compare_positions
if (Geo::JSON::Utils::compare_positions( $pt1, $pt2 )) {
# positions of points are the same
}
Compare two points. Compares in up to three dimensions. Any further dimensions are ignored.
compute_bbox
Geo::JSON::Utils::compute_bbox( \@positions );
Computes a bounding box for an arrayref of positions. Bounding box can have either two or three dimensions. Any further dimensions will be ignored. Assumes points will have same number of dimensions as the first.
TODO
Improve comparisons of floating point coordinates, look at stringification issues, etc.
AUTHOR
Michael Jemmeson <mjemmeson@cpan.org>
COPYRIGHT AND LICENSE
This software is copyright (c) 2013 by Michael Jemmeson <mjemmeson@cpan.org>.
This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.