Help-Site Computer Manuals
Software
Hardware
Programming
Networking
  Algorithms & Data Structures   Programming Languages   Revision Control
  Protocols
  Cameras   Computers   Displays   Keyboards & Mice   Motherboards   Networking   Printers & Scanners   Storage
  Windows   Linux & Unix   Mac

Geography::Countries::LatLong
Mean latitude and longitude

Geography::Countries::LatLong - Mean latitude and longitude


NAME

Geography::Countries::LatLong - Mean latitude and longitude


SYNOPSIS


        use Geography::Countries::LatLong;

        if ( Geography::Countries::LatLong::supports('Hungary') ){

                my $array_ref    = latlong('Hungary');

                my ($lat, $long) = latlongr('Hungary');

        }


DESCRIPTION

This is version 1.0.

This module provides mean latitude and longitude for a large number of countries, named in English. Should translations become available, this module will happily move in Geography::Countries::EN::LatLong.

Regions and continents are not supported - please see the list below.

Look-up is by the English name of the country, as returned by the Geography::Countries module, of which this is a sub-class that exports none of its parent's properties or methods.


CHANGES SINCE VERSION 0.922

The mean values were once arrived at with the following MATLAB code, where name is a country name recognised by MATLAB:


        % You will need the Mapping Toolbox to run the above snippet.

        function [lat,lon] = country_latlon(name);

          load worldmtx;

          c=worldhi(name);

          lat = mean(c.latlim);

          lon = mean(c.longlim);

          fprintf( '"%s" => ["%.4f","%.4f"],', name,lat,lon);

        % end function country_latlon

The current dataset is derived from a variety of public-domain sources.

The data from the old $countries_latlong hash has been preserved in $countries_latlong_old. To force all routines to the old data, first call the Geography::Countries::LatLong::USE_OLD_DATA manpage.

DEPENDENCIES

This module requires this other modules:


  Geography::Countries

EXPORT

This module exports the following subroutines:


        countries

        latlong


SUBROUTINES

latlong ($country_name)

Returns as a 1x2 anonymous array the latitude and longitude for the country supplied as the sole argument, or undef if the country is not supported.

unsupported

warns to STDERR a list of Geography::Countries::countries that are not supported by this module.


full_status

Returns a hash that describes what is and is not supported by the Geography::Countries manpage, in relation to this module. Keys are code2 code3 numcode countries absent, of which all but the last relate to the lists returned by the countrY method (The ``country'' subroutine. in the Geography::Countries manpage). These entries may be on the 'todo' list of the relevant ISO groups, or of the the Geography::Countries manpage author, though my money is on the former.

The absent key lists country names that are not supported: these are on my own 'todo' list.

The current value of this hash is:


        {

          'code2' => [

                                   'Isle of Man'

                                 ],

          'code3' => [

                                   'Antarctica',

                                   'Christmas Island',

                                   'Mayotte',

                                   'Heard Island and McDonald Islands',

                                   'British Indian Ocean Territory',

                                   'Heard Island And Mcdonald Islands',

                                   'South Georgia and the South Sandwich Islands',

                                   'Cocos (Keeling) Islands',

                                   'Bouvet Island'

                                 ],

          'numcode' => [

                                         'Antarctica',

                                         'Christmas Island',

                                         'Mayotte',

                                         'Heard Island and McDonald Islands',

                                         'British Indian Ocean Territory',

                                         'Heard Island And Mcdonald Islands',

                                         'South Georgia and the South Sandwich Islands',

                                         'Cocos (Keeling) Islands',

                                         'Bouvet Island'

                                   ],

          'countries' => [],

          'absent' => [

                                  'Antipodean Islands',

                                  'Antipodes',

                                  'Antipodes Islands',

                                  'Brunei Darussalam',

                                  'Canary Islands',

                                  'EEC',

                                  'EU',

                                  'European Union',

                                  'Faroc Islands',

                                  'Galapagos Islands',

                                  'Guatamala',

                                  'Independent State of Samoa',

                                  'Kermadec Islands',

                                  'Madeira Islands',

                                  'Micronesia-Polynesia',

                                  'Prince Edward Islands',

                                  'Saint Helena',

                                  'Western Samoa',

                                  'Yugoslavia',

                                  'Zaire'

                        ],

        }

USE_OLD_DATA

Sets the module to use data from veresion 0.922.


AUTHOR

Lee Goddard - lgoddard -at- cpan -dot- org

THANKS

Many thanks to Morten Bjørnsvik for checking and supplying data.


SEE ALSO

perl, the Geography::Countries manpage.


COPYRIGHT

Made publically available under the same terms as Perl itself.

Programminig
Wy
Wy
yW
Wy
Programming
Wy
Wy
Wy
Wy