GeoDB.3pm

Langue: en

Autres versions - même langue

Version: 2009-11-10 (fedora - 01/12/10)

Section: 3 (Bibliothèques de fonctions)

NAME

GeoDB - Geographical waypoint database manipulation

SYNOPSIS

   my $geodb = new GeoDB();
   $geodb->init_dbh('sqlite2','mysqlitedb','localhost',
                    'dbuser','dbpassword', '9999');
 
   setup_db(); # XXX: currently this exists only in geoqo and needs to be moved
 
   $geodb->update_db('sqlite2');  # update to current db schema.
 
   # import a bunch of waypoints from a gpx file
   $geodb->import_it('myfile.gpx');
 
   # Extremely complex searches are available:
   #   (this loads a 'waypoint' and 'cache' module and passes the
   #   associated search parameters to them)
   my $resultset = $geodb->search('waypoint:type=Geocache&&cache:terrain>2');
 
   # modify the data
   #   (in this case, it calculates a distance from GCABCD and stores
   #   it in the distance data node)
   $geodb->modify($resultset, 'distance:from=GCABCD');
 
   # tag the waypoints as "cool"
   $geodb->modify($resultset, 'tag:cool');
 
   # search by tag:
   my $newsearchset = $geodb->search('tag:cool');
 
   # display the results in a list:
   $geodb->display($newsearchset, 'list:');
 
   # display with particular list format
   $geodb->display($newsearchset,
                   'list:format=%{8:ident} %{6:subtype} %{40:urlname}');
 
   # export the results to a file:
   $geodb->export_it(['myextract.gpx', 'mylocfile.loc'], $newsearchset);
 
   # finally it has it's own scripting language as well:
   # (see the geoqo manual page for how to write scripts)
   $geodb->run_script('file:myscript','arg1=foo,arg2=42');
 
 

DESCRIPTION

The GeoDB perl module is the foundation for the geoqo application. It is designed to load, query, modify, search for, etc geographical waypoints within an SQL database. The GeoDB module is the very top module of a hierarchy of supporting modules needed. The GeoDB module itself can serve as the primary interface to most of those other modules, however.

For complete details on the geoqo application and this module, please refer to the geoqo web site:

   http://www.geoqo.org/
 
 

MODULE INTERFACE

The GeoDB system is very extensible and new Display, Export, Import, Modify, Search, and Waypoint types can be easily added to the system. For details on writing plugins, see the documentation for GeoDB::Display, ...

SEE ALSO

geoqo(1) --- this is a MUCH MUCH more extensive manual on the power of the system

AUTHOR

Wes Hardaker AKA Yamar <yamar@geoqo.org> GPLv2