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) = latlong_aspair('Hungary');
}

DESCRIPTION

This module provides mean latitude and longitude for a large number of countries named in English.

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.

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

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

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

EXPORT

countries
latlong
latlong_aspair

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.

latlong_aspair ($country_name)

Returns as two strings the latitude and longitude for the country supplied as the sole argument, or undef if the country is not supported.

supports ($country)

Returns a true value if the sole argument is a country name supported by this module; otherwise, returns undef.

unsupported

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

country

Just Geography::Countries's routine.

UNSUPPORTED NAMES

It is no reflection on the countries listed: I just don't have the data at the time of writing.

Africa
Americas
Areas not elsewhere specified
Areas not specified
Asia
Australia and New Zealand
Brunei Darussalam
Caribbean
Central America
Channel Islands
Czechoslovakia
Côte d'Ivoire
Democratic Kampuchea
Eastern Africa
Eastern Asia
Eastern Europe
Europe
Faeroe Islands
French Guiana
French Southern Territories
German Democratic Republic
Guinea
Holy See
Isle of Man
Latin America and the Caribbean
Mayotte
Melanesia
Micronesia, Federated States of
Micronesia-Polynesia
Middle Africa
Myanmar
Niger
Northern Africa
Northern America
Northern Europe
Occupied Palestinian Territory
Oceania
Pacific Islands (Trust Territory)
Polynesia
Réunion
Samoa
Socialist Federal Republic of Yugoslavia
South America
South-central Asia
South-eastern Asia
Southern Africa
Southern Europe
Svalbard and Jan Mayen Islands
Tokelau
Turks and Caicos Islands
Union of Soviet Socialist Republics
United States Minor Outlying Islands
Upper Volta
Wallis and Futuna Islands
Western Africa
Western Asia
Western Europe
Yugoslavia

AUTHOR

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

SEE ALSO

perl, Geography::Countries.

COPYRIGHT

Copyright (C) Lee Goddard, 2003, 2006. All Rights Reserved. Made publically available under the same terms as Perl itself.

1 POD Error

The following errors were encountered while parsing the POD:

Around line 448:

Non-ASCII character seen before =encoding in 'Côte'. Assuming CP1252