GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
GIS::Distance::Formula(3) User Contributed Perl Documentation GIS::Distance::Formula(3)

GIS::Distance::Formula - Formula base class.

This is the parent class for all GIS::Distance formula classes such as those listed at "FORMULAS" in GIS::Distance.

To author your own formula class:

    package My::Formula;
    
    use parent 'GIS::Distance::Formula';
    
    sub _distance {
        my ($lat1, $lon1, $lat2, $lon2) = @_;
        
        # ...
        
        return $kilometers;
    }
    
    1;

Then use it:

    my $gis = GIS::Distance->new('My::Formula');
    my $km = $gis->distance( @coords );

The global $GIS::Distance::Formula::SELF is available when your "_distance()" subroutine is called if, and only if, the entry point was "distance" in GIS::Distance and NOT "distance_metal" in GIS::Distance or otherwise.

Much of the interface described in GIS::Distance is actually implemented by this module.

See "SUPPORT" in GIS::Distance.

See "AUTHORS" in GIS::Distance.

See "LICENSE" in GIS::Distance.
2021-01-30 perl v5.32.1

Search for    or go to Top of page |  Section 3 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.