![]() |
![]()
| ![]() |
![]()
NAMEPandoraFMS::GIS - Geographic Information System functions of Pandora FMSVERSIONVersion 3.1SYNOPSISuse PandoraFMS::GIS; DESCRIPTIONThis module contains the GIS (Geographic Information System) related functions of Pandora FMSInterface Exported Functions:
METHODS"distance_moved ($pa_config, $last_longitude, $last_latitude, $last_altitude, $longitude, $latitude, $altitude)"Measures the distance between the last position and the previous one taking in acount the earth curvature The distance is based on Havesine formula and so far doesn't take on account the altitudeRefferences (Theory): * <http://franchu.net/2007/11/16/gis-calculo-de-distancias-sobre-la-tierra/> * <http://en.wikipedia.org/wiki/Haversine_formula> References (C implementation): * <http://blog.julien.cayzac.name/2008/10/arc-and-distance-between-two-points-on.html> "get_revesrse_geoip_sql ($pa_config, $ip_addr, $dbh)"Gets the GIS information obtained from the SQL Database:Returns: undef if there is not information available or a hash with: * country_code * country_code3 * country_name * region * city * postal_code * longitude * latitude * metro_code * area_code "get_reverse_geoip_file ($pa_config, $ip_addr)"Gets GIS information from the MaxMind GeooIP database on file using the GPL perl API from MaxMindGeoIPReturns: undef if there is not information available or a hash with: * country_code * country_code3 * country_name * region * city * postal_code * longitude * latitude * metro_code * area_code "get_random_close_point($pa_config, $center_longitude, $center_latitude)"Gets the Longitude and the Laitiutde of a random point in the surroundings of the coordintaes received ($center_longitude, $center_latitude).Returns "($longitude, $laitiutde)" DEPENDENCIESPandoraFMS::DB, PandoraFMS::Tools (Optional Geo::IP::PurePerl to use file reverse geolocation database that is faster than the SQL)LICENSEThis is released under the GNU Lesser General Public License.SEE ALSOPandoraFMS::DB, PandoraFMS::ToolsCOPYRIGHTCopyright (c) 2005-2010 Artica Soluciones Tecnologicas S.L
|