GIS::Distance::Formula::Haversine::Fast - C implementation of GIS::Distance::Formula::Haversine.


GIS-Distance-Fast documentation Contained in the GIS-Distance-Fast distribution.

Index


Code Index:

NAME

Top

GIS::Distance::Formula::Haversine::Fast - C implementation of GIS::Distance::Formula::Haversine.

DESCRIPTION

Top

This module is used by GIS::Distance and has the same API as GIS::Distance::Formula::Haversine.

AUTHOR

Top

Aran Clary Deltac <bluefeet@cpan.org>

LICENSE

Top

This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself.


GIS-Distance-Fast documentation Contained in the GIS-Distance-Fast distribution.

package GIS::Distance::Formula::Haversine::Fast;

use Any::Moose;
extends 'GIS::Distance::Formula::Haversine';

use GIS::Distance::Fast;
use Class::Measure::Length qw( length );

sub distance {
    my $self = shift;

    my $c = GIS::Distance::Fast::haversine_distance( @_ );

    return length( $self->kilometer_rho() * $c, 'km' );
}

1;