русский

Specifications for indoor positioning and navigation

using WiFiLine

WiFiLine map-file structure

Here is an example of XML-file template for new empty map.

  <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
  <place xmlns="http://weborienteer.com/wifiline">
    <desc>
      <header>
        <id>US.NY</id>
        <name>Place name</name>
        <date>2012-06-10 14:00:00</date>
        <coordinates latitude="0.0" longitude="0.0" />
        <images default="1" scale="125">
          <image floor="-1" svgfile="filename1.svg" azimuth="-90">Floor description</image>
          <image floor="1" svgfile="filename2.svg" azimuth="45">Floor description</image>
        </images>
        <author>credits and copyrights</author>
        <contact>feedback</contact>
      </header>
    </desc>
  </place>
      
      

Provide an arbitrary but descriptive name of the place in the name tag.

Specify correct GPS coordinates of the place in the coordinates tag.

Make references to prepared image files inside the images tag, each image - in its own image tag.

The scale attribute should contain a number of meters in 1000 pixels of the images (all images should have the same scale).

Each image should have a unique floor identifier (integer number) in the floor attribute.

An image which should be shown first on the map (when the map is opened) is specified in the default attribute, this is one of the floors identifiers.

The azimuth attribute specifies an angle (in degrees) between direction to North and vertical axis from bottom to top on a given floor plan. For example, if a floor plan is drawn in such orientation that North is over top edge of the image, than azimuth is 0. If North is on the left edge of the image, than azimuth is 90.

The information about map author and his/her contacts is optional.

After a map is configured, i.e. WiFi data is obtained via scanning, the map file contains all information about scannig inside new child tags of the place tag.

Here is an example (fragments):

      
  <points count="99" lastid="99" scanperpoint="10">
    <point id="1" x="1088.0391" y="368.6574" z="0.0">
      <name>Scan N1</name>
      <neighbors>
        <ref id="58" />
        <ref id="57" />
        <ref id="2" />
        <ref id="3" />
        <ref id="4" />
      </neighbors>
      <measurements>
        <spot n="10" level="-88.833336">
          <mac>00:15:e9:40:16:09</mac>
          <name>default</name>
          <signals>
            <signal value="-67" />
            <signal value="-67" />
            <signal value="-68" />
            <signal value="-65" />
            <signal value="-65" />
            <signal value="-66" />
            <signal value="-66" />
            <signal value="-67" />
          </signals>
        </spot>
        <spot n="5" level="-86.111115">
          <mac>54:04:a6:bb:2f:54</mac>
          <name>yunkers_ASUS</name>
          <signals>
            <signal value="-79" />
            <signal value="-75" />
            <signal value="-81" />
            <signal value="-80" />
            <signal value="-74" />
          </signals>
        </spot>
        <spot n="9" level="-89.4">
          <mac>58:6d:8f:01:b0:0e</mac>
          <name>ktnefkm</name>
          <signals>
            <signal value="-82" />
            <signal value="-82" />
            <signal value="-81" />
            <signal value="-77" />
            <signal value="-82" />
            <signal value="-79" />
          </signals>
        </spot>
      </measurements>
    </point>
    <point ...
    </point>
    ...
  </points>
  <spots count="36">
    <spot>
      <mac>40:4a:03:ad:66:b6</mac>
      <name>4itai_gorod</name>
      <maxpoint id="55" x="1559.5547" y="654.6939" z="1.0" level="-83.5" />
      <pointcount n="5" />
    </spot>
    <spot>
      <mac>f0:7d:68:50:ec:5a</mac>
      <name>YR251</name>
      <maxpoint id="74" x="613.79333" y="611.5463" z="0.0" level="-66.5" />
      <pointcount n="26" />
    </spot>
    <spot>
      <mac>00:25:62:fb:cc:5e</mac>
      <name>Yota3069B1</name>
      <maxpoint id="7" x="753.86816" y="505.59424" z="0.0" level="-75.55556" />
      <pointcount n="11" />
    </spot>
    ...
  </spots>
      
      

Names of scanned points are empty by default (in versions prior to 1.1 they was Scan Nx, where x - is a number), but they can be changed to anything else, describing point location, such as "Main entrance", "back hallway", etc.

It should be noted that neighbors data, i.e. cross links between points (the neighbors tag with ref child tags) can be added or edited in an external text editor in order to reflect real-world relations between points. While doing this, it's useful to consult with graphical representation of the links on the map - they are shown as grey straight lines. But you can also generate and delete neighbors in the application (see the documentation).

Metadata for categories and descriptions in SVG-files

SVG format specification includes two general purpose tags - title and desc - which are used in WiFiLine for setting categories and extended descriptions of objects on the map.

An object name is shown on the map using text and/or tspan tags. If the name is multiline, it can be implemented as several tspans inside a single text, or as several texts inside a group tag g. So, either the text tag with tspans or the group tag g with texts is a container for the map object (only groups containing text tags are considered as objects, if a group contains other tag, it's skipped in indexing process). If the object name is a single line, the single text tag is the container itself.

In order to specify a category for the map object, just add a title tag inside corresponding container.

In order to specify a description (keyword) for the map object, just add a desc tag inside corresponding container.

You can provide several categories by adding more than one title tag, as well as several descriptions can be added by means of multiple desc tags.

Here is some examples:

      
  <text font-size="16" x="-671.37823" y="604.97064" id="text3091"
   transform="matrix(0,-1,1,0,0,0)">
   <title>cosmetics</title>
   <title>perfume</title>
   <tspan
     id="tspan3093"
     x="-671.37823"
     y="604.97064">yves</tspan>
   <tspan
     id="tspan3097"
     x="-677.33502"
     y="620.0462">rocher</tspan>
  </text>
  
  ...
      
  <text fill="#000000" stroke="#000000" stroke-width="0" x="505" y="659" id="svg_40"
    font-size="14" font-family="sans-serif" text-anchor="middle">
      telecom
    <title>electronics</title>
    <desc>mobile phones</desc>
    <desc>smartphones</desc>
    <desc>tablets</desc>
    <desc>laptops</desc>
  </text>
  
  ...
  
  <g>
    <text transform="rotate(-90 284,652)" text-anchor="middle" font-family="sans-serif"
    font-size="14" id="svg_19" y="657" x="284" stroke-width="0" stroke="#000000" fill="#000000">
      terra
    </text>
    <text transform="rotate(-90 296,651)" text-anchor="middle" font-family="sans-serif"
    font-size="14" id="svg_20" y="656" x="296" stroke-width="0" stroke="#000000" fill="#000000">
      del sol
    </text>
    <title>barber's shop</title>
    <title>beauty salon</title>
  </g>
  
      
      

Note, that title and desc tags can be added before or after main content of the container.

Both tags are optional.

Contents of each of these tags, including text of containers, are indexed by single words, as well as whole phrases.

Another possibility to specify categories and keywords is by means of metadata SVG tag, which should be first after the root svg tag or main title tag of entire image. Here is an example:

  <svg xmlns="http://www.w3.org/2000/svg"
       width="600px" height="400px"
       viewBox="0 0 600 400">
    <title>Main title</title>
    <metadata xmlns:wifi="http://weborienteer.com/wifiindex">
      <category idlist="t1,t2,t10,a21,b7,b17,b56">electronics</category>
      <keyword idlist="t1,b5">smartphones</keyword>
      <keyword idlist="t2">video</keyword>
      <category idlist="t3,a10,a11,a12,bc">clothes</category>
      <keyword idlist="t4">umbrellas</keyword>
    </metadata>
    <g>
      <text id="t1" x="100" y="100">Company</text>
      <text id="t1Line2" x="100" y="120">Name</text>
    </g>
    <text id="t2" x="500" y="50">Electra</text>
    <text id="t4" x="200" y="200">Duty free</text>
    <text id="t3" x="200" y="220">Boutique</text>
    
    ...
    
  </svg>
      

Inside metadata tag there can be category and keyword tags, both contain idlist attribute with IDs of text tags, which are bound to corresponding category or description text provided as inner content of the tags. The idlist's values are comma separated lists of text tag identifiers.

Every category or keyword wording is referenced only once, and is bound to all relevant text objects on map by their IDs.