=head1 NAME bbd - bbbike data format description =for category bbbike =head1 DESCRIPTION Sorry - parts of this documentation are still in German... C is a simple format for describing points and polylines for geographic information systems. Bbd files consist of newline-terminated records in the format: Name TAB Category SPACE x,y SPACE x,y ... =head2 Coordinate lines (data lines) =over =item Name A descriptive name, for example the street name, or (for attribute layers) a description of the attribute category. This field must not contain any TAB characters. If there is a main name and a descriptive part, then the latter should be separated by a C<|> character. This helps for intelligent labelling, i.e. leaving out unimportant parts if necessary. Example: B could be labelled as B or B. =item Category The category of this point or polyline. If the category matches C<#rrggbb> (where C, C and C are hexadecimal values), then this denotes a color for the representation in the Perl/Tk interface. A prefix of C denotes that the polyline should be treated as a polygon and filled with a solid color. Note that the polygon is always closed, but it is optional to make the first and last the same. If the category matches IC<;>I, then I applies to the street in forward direction and I applies to the street in backward direction. Either I or I may be empty; in this case the category applies only to the other direction. The B category should be used if there is no category. Other predefined categories are listed below. The category should not contain any spaces. DRAFT (not yet in use!): Change the category format to: = ; | = F=? (: (= )?)* = [^:;]+ = [^:;=]+ = [^:;=]+ Changes for data files: F:cat becomes F=cat ?::inwork becomes ?:inwork F:SW|IMG:church.gif|ANCHOR:s becomes F=SW:IMG=church.gif:ANCHOR=s Maybe (no, too much typing): #rrggbb becomes X:COLOR=#rrggbb cat is now really attr. Reflect in description, maybe also in variable names. =item x,y A coordinate. x and y should be integer or float values. The datum and grid of the coordinates should be handled by the software. It is recommended that x and y should denote the easting and northing in meters (as in GKK or UTM). A record may contain an unlimited number of coordinates, though there may be limitations in the interpreting software (currently the maximum number of points is hardcoded in L and checked in the rule C of F). See also below for the B directive in L. =back =head2 Directive lines If a line begines with a hash sign followed by a color (C<#:>), then the line is treated as a directive. There are global directives, line directives and block directives. Global directives should be specified at top of the file before the first data line and should be separated by the data lines with an empty directive line. Line directives are valid for the next line only. Block directives are valid for the specified block. Block directives are markes as such: #: directive_name directive_arguments ... vvv ... data lines #: directive_name ^^^ XXX make directive_name before ^^^ optional? XXX The C and C<^> markers could be repeated an indefinite number of times, but at least three times. An colon (:) after the directive_name is always optional. The following directives are defined: =over =item C> This global directive sets the type of the bbd file. If given then it should be put into the first line to serve as a kind of EmagicE. A possible type would be C or C, once I get rid of the .bbr format. =item C> This global directive sets the coordinate system of the bbd file. If no C directive is specified, then the proprietary bbbike coordinate system is used. For WGS84 coordinates specified as DDD use the maptype B. =item C> This global directive sets the title or some descriptive text for the file. =item C> This global directive introduces an RCS/CVS Id string. =item C> Denotes that the information in the next block or line was provided by I. This may be an email address or full name of an author, an URL providing more information, a Message-Id of a mail or posting, a date, or a combination of all. An alias for C is C. =item C> Same as Eby:E for unverified data. EUnverifiedE means that there's no communication channel back to the information provider. =item C The next block or line is just temporary. Typically the date information is included in the Name field of the data line, preferred in a ISO-date similar notation (e.g. YYYY-MM-DD - YYYY-MM-DD for a starting and an end date). =item C> The next block or line is unsure information. The I text specifies an additional comment. An alias for C is C. =item C> Define another known name for the next line. For now, only one alias is allowed. =item C: I> An old name for the next line. I is a time specification (best: some kind of ISO dates, but this is not yet specified). Multiple oldname directives are allowed for one record. =item C> The next block is part of a named section. Sections may be nested. =item C> Useful for preprocessing bbd data files to add a comment to each record in the block. =item C, ...> Define additional attributes for the following line or block. The attributes may be used in a preprocessing script to generate additional layers. An alias for C is C. =item C> A free text note, which shouldn't appear in the processed data. =item C> A free text note, which refers to more information. This should be typically a URL. =item C> Some postprocessing code may add the following line with the descriptive text I to the F file. =item C> A note if something is unclear about the following line. =back =head2 Comment lines If a line begins with a hash sign (C<#>), then it is treated as a comment. Empty lines are ignored. =head1 CATEGORIES Here's a list of special categories: =head2 STREETS Used in files: F, F, F. Usually F is used for city streets, F for streets in the region around the city, and F for streets in the wider region. But it is also possible to work only with one file F. =over =item BAB Freeways (Bundesautobahn) =item B Bundesstraßen =item HH Important main streets (wichtige Hauptstraßen). Entspricht von der Kfz-Dichte meist Bundesstraßen. =item H Main streets (Hauptstraßen) =item N Nebenstraßen =item NN Für Kfz gesperrte Straßen. =item Pl Places (Plätze). =item Br Bridges. =back =head2 BLOCKINGS Used in files: F, F. F is usually used for blocked streets relevant for cyclists, while F is for blocked streets for motorized vehicles. =over =item * C<1>: One way street. The blocking is in the direction of the polyline. =item * C<1s>: One way street, but not strictly for cyclists (means: it is non-legally possible to pass the street in the wrong direction). =item * C<2>: Blocked street (in both directions). =item * C<0>: The bicycle has to be carried. An optional penalty parameter expressed in seconds of lost time may be added after the category, with a C<:> as separator. Example: C<0:30> for a penalty of 30 seconds. This is only for point records. =item * C<3>: A blocked route (gesperrte Wegführung). This means that the whole path specified by the coordinates of this record are blocked, but parts of the path are not. =item * C: A narrow passage (EDrEngelgitterE etc.). An optional penalty parameter may be added, like for the C<0> category. =back =head2 CYCLE PATHS (RADWEGE) Used in files: F. =over =item C Kein Radweg. =item C Normaler nicht benutzungspflichtiger Radweg. =item C Benutzungspflichtiger Radweg. =item C Suggestivstreifen für Radfahrer. =item C Radstreifen. =item C Busspur (eventuell nur temporär), auch für Radfahrer frei. =item C Verkehrsberuhigte Straße. =item C Fahrradstraße. =item C Benutzungspflichtiger Zweirichtungsradweg, Gegenrichtung. =item C Nicht benutzungspflichtiger Zweirichtungsradweg, Gegenrichtung. =item C Hauptstraße mit zusätzlichem Nebenstreifen, aber auch von Kfz nutzbar (Beispiele in Berlin: Heerstr., Unter den Eichen am Botanischen Garten). =item C Radweg vorhanden, aber nicht weiter kategorisiert. =back =head2 RAILROADS Used in files: F, F, F, F, F, F. =over =item C Regionalbahnen außerhalb des Stadtgebiets. =item C Regionalbahnen Zone A. =item C Regionalbahnen Zone B. =item C Regionalbahnen Zone C. =item C Regionalbahnen außer Betrieb oder in Bau. =item C S-Bahnen außerhalb des Stadtgebiets. =item C S-Bahnen Zone A. =item C S-Bahnen Zone B. =item C S-Bahnen Zone C. =item C S-Bahnen außer Betrieb oder in Bau. =item C U-Bahnen außerhalb des Stadtgebiets. =item C U-Bahnen Zone A. =item C U-Bahnen Zone B. =item C U-Bahnen Zone C. =item C U-Bahnen außer Betrieb oder in Bau. =back =head2 QUALITY Qualität der Wege (Fahrbahnbeschaffenheit). Used in files: F, F. F is usually used for city streets, while F is for streets in the region around the city. =over =item C Beste Qualität, keine Einschränkungen. =item C Gute Kopfsteinpflasterstrecken, mäßiger Asphalt, etwa 25 km/h Höchstgeschwindigkeit. =item C Gewöhnliche Kopfsteinpflasterstrecken, schlechter Asphalt, Waldwege, etwa 18 km/h Höchstgeschwindigkeit. =item C Schlechte Kopfsteinpflasterstrecken, sandige Strecken, etwa 13 km/h Höchstgeschwindigkeit. =back Andere, nicht fahrbahnbezogene Handicaps, zum Beispiel Beeinträchtigungen durch Fußgänger oder enge Kurven. Used in files: F (used for city streets), F (used for streets in the region around the city). =over =item C Keine. =item C Auf 25 km/h. =item C Auf 18 km/h. =item C Auf 13 km/h. =item C Auf Schrittgeschwidigkeit (z.B. in FuEgEngerzonen). =back =head2 COMMENTS Used in files: F (alternative way to attribute cyclepaths), F (e.g. time-tables or fares of ferries), F (categorized amount of motorized traffic - Abschätzung des Kfz-Verkehrs), F (other comments), F (mounts with grades - Steigungen), F (path instructions), F (numbered cycle routes - ausgeschilderte Fahrradrouten), F (tramway on street). =over =item C Only for records with three points. Comment is valid for point B if driving from A to C. =item C Same as C, but valid for both directions. =item C Comment is valid for the whole route in this direction. =item C Comment is valid for the whole route in both directions. =item C Path instruction (genauere Wegbeschreibung). =item C Dieser Weg ist gesperrt (z.B. Abbiegen nicht möglich), aber eine Umfahrung ist möglich ... siehe auch Kategorie C<3> in L. =item C<-2> relativ ruhiger Kfz-Verkehr =item C<-1> =item C<+1> =item C<+2> relativ starker Kfz-Verkehr Relativ zu der Kategorie einer Straße (von Nebenstraße C bis zur Bundesstraße C) kann das subjektive Empfinden der Kfz-Dichte mit C<-2> bis C<+2> angepasst werden. =back =head2 AREAS Used in files: F. Mostly prefixed with C, see above. =over =item C

Parks. =item C Forests. =item C Cemeteries. =item C Airports. =item C Orchards; especially allotments (Kleingärten). =item C Sports fields. =item C Industrial area. =back =head2 CITIES AND PLACES The category interval span from C<0> to C<6> where C<0> denotes city parts, C<1> villages and C<6> metropolises. =head2 MISC =over =item C Haupt- oder Freizeitrouten. =item C Fähren. =item C The category will not be used in this case. =back =head2 OTHER STANDARD FILES =over =item ampeln File with point records for traffic lights (Ampeln). The category is set to B for railroad crossings, B for pedestrian-only traffic lights and B for drawbridges, otherwise not used. =item hoehe File with elevation points. The C fields denotes the elevation in meters, the category is not used. =back XXX To be continued =head1 EXAMPLES #: map: polar # a comment Dudenstr. H 13.3857982559056,52.4850047136888 13.3822671967909,52.4849893166144 13.3765591649622,52.4849797043717 13.3721313913775,52.4849830887141 13.3708964575072,52.4850055627098 Viktoriapark F:P 13.3770529147335,52.4891642850551 13.376956820767,52.4876188211697 13.3778829456197,52.4875997186591 And a detailed explanation... Start of a directive v #: map: polar ^ Coordinate system of this file is defined as WGS84, DDD Start of a comment v # a comment (Note that spaces are insignificant in the following examples, but C<< >> and C<< >> should be inserted) List of coordinates (x,y pairs) v Dudenstr. H 13.3857982559056,52.4850047136888 13.3822671967909,52.4849893166144 13.3765591649622,52.4849797043717 13.3721313913775,52.4849830887141 13.3708964575072,52.4850055627098 ^ ^ Street name Category (H = main street) List of coordinates for a polygon v Viktoriapark F:P 13.3770529147335,52.4891642850551 13.376956820767,52.4876188211697 13.3778829456197,52.4875997186591 ^ ^ Name of a park Category (F = area (polygon, Fläche), P = park) =head1 CAVEATS Some category values may change. It is likely that either the blocking and/or city category values will change, as both use digits. =head1 AUTHOR Slaven Rezic =head1 SEE ALSO L, L.