Documentation for mapcss-mapping.csv
This commit is contained in:
parent
1dfe1db045
commit
9d4fc6f6be
1 changed files with 21 additions and 0 deletions
|
@ -80,6 +80,27 @@ def komap_mapswithme(options):
|
|||
# Build classificator tree from mapcss-mapping.csv file
|
||||
types_file = open(os.path.join(ddir, 'types.txt'), "w")
|
||||
|
||||
# Mapcss-mapping format
|
||||
#
|
||||
# A CSV table mapping tags to types. Some types can be deemed obsolete, either completely or replaced with a different type.
|
||||
#
|
||||
# Example row: highway|bus_stop;[highway=bus_stop];;name;int_name;22; (mind the last semicolon!)
|
||||
# It contains:
|
||||
# - type name: "highway|bus_stop" ('|' is converted to '-' internally)
|
||||
# - mapcss selector for tags: "[highway=bus_stop]" (you can group selectors and use e.g. [oneway?])
|
||||
# - "x" for an obsolete type or an empty cell otherwise
|
||||
# - primary title tag (usually "name")
|
||||
# - secondary title tag (usually "int_name")
|
||||
# - type id, sequential starting from 1
|
||||
# - replacement type for an obsolete tag, if exists
|
||||
#
|
||||
# A shorter format for above example: highway|bus_stop;22;
|
||||
# It leaves only columns 1, 6 and 7. For obsolete types with no replacement put "x" into the last column.
|
||||
# Obviously it works only for simple types that are produced from tags replacing '=' with '|'.
|
||||
#
|
||||
# An example of type with replacement:
|
||||
# highway|unsurfaced|disused;[highway=unsurfaced][disused?];x;name;int_name;838;highway|unclassified
|
||||
|
||||
cnt = 1
|
||||
for row in csv.reader(open(os.path.join(ddir, 'mapcss-mapping.csv')), delimiter=';'):
|
||||
if len(row) <= 1:
|
||||
|
|
Loading…
Add table
Reference in a new issue