Next: README | Previous: bbbike_internals | [Index] |
bbd - bbbike data format description
Sorry - parts of this documentation are still in German...
bbd
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 ...
If there is a main name and a descriptive part, then the latter should
be separated by a |
character. This helps for intelligent
labelling, i.e. leaving out unimportant parts if necessary. Example:
Ringenwalde|(Uckermark) could be labelled as Ringenwalde or
Ringenwalde (Uckermark).
#rrggbb
(where rr
, gg
and bb
are hexadecimal values), then
this denotes a color for the representation in the Perl/Tk interface.
A prefix of F:
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 forwardcat;
backwardcat, then
forwardcat applies to the street in forward direction and
backwardcat applies to the street in backward direction. Either
forwardcat or backwardcat may be empty; in this case the
category applies only to the other direction.
The X 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: <cat> = <onewaycat> ; <onewaycat> | <onewaycat> <onewaycat> = F=? <basiccat> (: <attrkey> (= <attrval>)?)* <basiccat> = [^:;]+ <attrkey> = [^:;=]+ <attrval> = [^:;=]+ 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.
check-line-lengths
of
data/Makefile
). See also below for the map directive in
Directive lines.
If a line begines with a hash sign followed by a color (#:
), 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 v
and ^
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:
type: bbd_type
bbr
or bbbike
route
, once I get rid of the .bbr format.
map: maptype
map
directive is specified, then the proprietary bbbike
coordinate system is used. For WGS84 coordinates specified as DDD use
the maptype polar.
title: title string
version: RCS or CVS identifier string
by: source
by:
is according_to:
.
unverified_by: source
temporary:
unsure: why
unsure:
is XXX
.
alias: name
oldname: when: name
section: section name
append_comment: comment
attributes: attribute, ...
attributes
is attrs
.
note: string
see_also: string
add_fragezeichen: string
fragezeichen
file.
XXX: string
If a line begins with a hash sign (#
), then it is treated as a
comment. Empty lines are ignored.
Here's a list of special categories:
Used in files: strassen
, landstrassen
, landstrassen2
.
Usually strassen
is used for city streets, landstrassen
for
streets in the region around the city, and landstrassen2
for
streets in the wider region. But it is also possible to work only with
one file strassen
.
Used in files: gesperrt
, gesperrt_car
. gesperrt
is usually
used for blocked streets relevant for cyclists, while gesperrt_car
is for blocked streets for motorized vehicles.
1
:
One way street. The blocking is in the direction of the polyline.
1s
:
One way street, but not strictly for cyclists (means: it is non-legally possible to pass the street in the wrong direction).
2
:
Blocked street (in both directions).
:
The bicycle has to be carried. An optional penalty parameter expressed
in seconds of lost time may be added after the category, with a :
as separator. Example: 0:30
for a penalty of 30 seconds. This is
only for point records.
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.
BNP
:
A narrow passage ("Drängelgitter" etc.). An optional
penalty parameter may be added, like for the category.
Used in files: radwege_exact
.
RW0
RW1
RW2
RW3
RW4
RW5
RW6
RW7
RW8
RW9
RW10
RW
Used in files: ubahn
, sbahn
, rbahn
, ubahnhof
, sbahnhof
,
rbahnhof
.
R
RA
RB
RC
R0
S
SA
SB
SC
S0
U
UA
UB
UC
U0
Qualität der Wege (Fahrbahnbeschaffenheit).
Used in files: quality_s
, quality_l
. quality_s
is usually
used for city streets, while quality_l
is for streets in the region
around the city.
Q0
Q1
Q2
Q3
Andere, nicht fahrbahnbezogene Handicaps, zum Beispiel Beeinträchtigungen
durch Fußgänger oder enge Kurven. Used in files: handicap_s
(used
for city streets), handicap_l
(used for streets in the region
around the city).
q0
q1
q2
q3
q4
Used in files: comments_cyclepath
(alternative way to attribute
cyclepaths), comments_ferry
(e.g. time-tables or fares of ferries),
comments_kfzverkehr
(categorized amount of motorized traffic -
Abschätzung des Kfz-Verkehrs), comments_misc
(other comments),
comments_mount
(mounts with grades - Steigungen), comments_path
(path instructions), comments_route
(numbered cycle routes -
ausgeschilderte Fahrradrouten), comments_tram
(tramway on street).
CP;
CP
CP;
, but valid for both directions.
CS;
CS
PI
P0
3
in BLOCKINGS.
-2
relativ ruhiger Kfz-Verkehr
-1
+1
+2
relativ starker Kfz-Verkehr
NN
bis zur
Bundesstraße B
) kann das subjektive Empfinden der Kfz-Dichte mit
-2
bis +2
angepasst werden.
Used in files: flaechen
. Mostly prefixed with F:
, see above.
P
Forest
Cemetery
Ae
Orchard
Sport
Industrial
The category interval span from to
6
where denotes city
parts,
1
villages and 6
metropolises.
radroute
Q
X
Name
fields denotes the elevation
in meters, the category is not used.
XXX To be continued
#: 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
<TAB>
and <SPACE>
should be inserted)
List of coordinates (x,y pairs) v Dudenstr. <TAB> H <SPACE> 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 <TAB> F:P <SPACE> 13.3770529147335,52.4891642850551 13.376956820767,52.4876188211697 13.3778829456197,52.4875997186591 ^ ^ Name of a park Category (F = area (polygon, Fläche), P = park)
Some category values may change. It is likely that either the blocking and/or city category values will change, as both use digits.
Slaven Rezic <slaven@rezic.de>
bbbike, Strassen.