=head1 NAME BBBikeRouting - frontend for using BBBike routing =for category BBBike =head1 SYNOPSIS use BBBikeRouting; use Data::Dumper; my $routing = BBBikeRouting->new; $routing->init_context; $routing->Start->Street("from street"); $routing->Goal->Street("to street"); $routing->search; print Dumper $routing->RouteInfo; =head1 DESCRIPTION This is a wrapper around L to make simple routing scripts easier. The basic approach is described as code in L and looks as following: =over 4 =item * construct the C object =item * initialize the C member with C and maybe change some C parameters =item * set C and C members =item * perform the route search =item * output the route information =back =head2 METHODS =over 4 =item new The constructor of C takes no arguments. =item init_context This method sets the C member to initial values (bike routing in city scope. For the routing, maximum caching and speed (by using the C variant of the A* algorithm) will be used. See L<"MEMBERS"> for a list of C members. =item search Perform a search from the start to the goal position. =item continue($position) After a performed search, prepare the module to continue the existing route using the $position (a C object) as new goal. The old goal is pushed to the C array. The actual search is performed by calling search() again. =item delete_to_last_via The opposite of continue(). This method will delete the path and routeinfo added by the last continue()/search() calls. =back =head2 MEMBERS =over 4 =item C Hold a C object. The members of this object are: =over 4 =item Vehicle Can be C, C, C or C (public transport). =item Velocity The average speed in km/h. Default is 20 km/h. =item Scope Can be C (only Berlin) or C (Berlin and Brandenburg). =item UseXS Use the XS extension, if possible. This will speed up the net creation. =item UseCache Use caches, if possible. This will speed up the creation of some internal data structures. =item UseNetServer Use the net server started by the C script. This can be used instead of the XS and Cache speedups. =item SearchArgs An array reference with more search arguments. See the L documentation for the method C. =item Algorithm The algorihm which should be used. Possible values are: C (an ancient slower own search algorithm), C (a pure-perl implementation of A*), or C (a C/perl combination of A*, only available if the L module is installed and a C compiler is available). =item CGI Only for CGI scripts: the CGI query object. =item BrowserInfo Only for CGI scripts: the BrowserInfo object. =item Verbose Be verbose (output statistics to stderr etc.). =item MultipleChoices Fill the StartChoices/ViaChoices/GoalChoices members if a search for a start/via/goal has multiple results. =item MultipleChoicesLimit Limit the number of entries in the *Choices members. By default this is C, which means unlimited. =back =item C, C Hold C objects for the start and goal position. The members of this object are: =over 4 =item Street The street of the position (without house numbers). =item Citypart The citypart of the position. =item Coord The coordinate (standard coordinate system) of the position. =item Multi Not used now. =back =item RouteInfo After finding a route, this member will contain an array reference of the route "elements". Please refer to the L documentation for the format of a route element. XXX For now, the goal node is *not* part of the RouteInfo. This may change in future. =back Other members of C are not meant for public use. =head2 DATA FILES It is assumed that data is available in a F subdirectory of the current script. The F file is mandatory if routing on streets is used (this is true for the vehicles C, C and C), otherwise, for public transport, the files C (for undergrounds) and F (for city railway) are used. For public transport, also a file F is needed for railway junctions with different station names (e.g. in Berlin you can change between "Rathaus Spandau" (U-Bahn) and "Spandau" (S-Bahn)). For bike and car street routing, the file F should contain one-way streets, blocked streets, and blocked paths. Extra blocked streets for cars only should be put into the file F. It is assumed that there are no blocked streets for pedestrians at all. =head1 AUTHOR Slaven Rezic =head1 COPYRIGHT Copyright (c) 2001,2003 Slaven Rezic. All rights reserved. This module is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =head1 SEE ALSO L(1), L(3), L(3).