DrawnMapFormat.wiki
author almikes@aol.com
Sun, 07 Dec 2014 17:43:39 +0000
changeset 458 cd792ad85f3c
parent 432 e441f3f51dac
child 666 f38a002a0796
permissions -rw-r--r--
Rename header “Icon” to “`icon.png` and `icon@2x.png`”
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
432
e441f3f51dac Add summary
almikes@aol.com
parents: 226
diff changeset
     1
#summary Short description of the file format of hand-drawn maps
e441f3f51dac Add summary
almikes@aol.com
parents: 226
diff changeset
     2
226
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
     3
Drawn map is described by a list of points, which define polylines to draw and format of each polyline.
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
     4
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
     5
Point is defined as
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
     6
|| Big-endian int16 || Big-endian int16 || Byte ||
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
     7
|| *X* coordinate || *Y* coordinate || *flags* ||
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
     8
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
     9
where *flags* are:
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    10
|| 8th bit || 7th bit || 6th-1st bits ||
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    11
|| if set, this is a first point of polyline || if set, polyline is erasing || *width*(thickness) of line ||
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    12
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    13
where *width* defines `(width * 10) + 6` pixels width line to draw
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    14
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    15
Second and further points of polyline have 8th bit of *flags* unset, the content of others doesn't matter.
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    16
6ca639109e95 Created wiki page through web user interface.
unC0Rr@gmail.com
parents:
diff changeset
    17
Single-point polyline defines a circle (well, that's kinda obvious).