Mapper

User Documentation

Output File

The output file of Mapper is in the same XML format used for the input file. In effect, Mapper transforms a file having incomplete or inaccurate position information (incomplete or inaccurate because it does not have the correct coordinates of places) to a file having complete information with the inaccuracy minimised.

Mapper writes error messages to standard error output.

Technically speaking, the output file format is an XML application, called Map-Data, and defined in a Document Type Definition (DTD) called Map-Data.dtd. The definitive source of information about the Mapper file format is that DTD. This section gives an easier to understand introduction to the format.

If the file described on the page about the input format were provided to Mapper, it would calculate the point positions and then output a similar file that includes the calculated point positions. Several of the elements would have additional attributes, which indicate the calculation results or explicitly state implied data. Here is the output file it would produce:

<?xml version="1.0" standalone="no"?>
<Map-Data x="0.000000" y="21.108714" width="21.285365" height="23.403744" precision="6">
   <Units angle="degrees" length="m"/>
   <Point x="21.285365" y="18.813459" id="ne"/>
   <Point x="18.693655" y="-2.295030" id="se"/>
   <Point x="0.000000" y="0.000000" id="sw"/>
   <Point x="2.591519" y="21.108714" id="nw"/>
   <Fixed-point x="0" y="0" point="sw"/>

   <Constraint-group angle-uncertainty="5" length-uncertainty="1 + 10%">
      <Cite>Measurements on Sunday 30 June 2002</Cite>
      <Angle d="90" e="0.00" at="ne" to="se" from="nw"/>
      <Angle d="90" e="0.00" at="se" to="sw" from="ne"/>
      <Angle d="90" e="0.00" at="sw" to="nw" from="se"/>
      <Angle d="90" e="0.00" at="nw" to="ne" from="sw"/>
      <Bearing d="007" e="0.00" to="ne" from="se"/>
      <Distance d="18" e="0.00" to="nw" from="ne"/>
      <Distance d="16" e="0.00" to="se" from="ne"/>
   </Constraint-group>

   <Area-feature class="building">
      <Name lang="en">My House</Name>
      <Node x="21.285365" y="18.813459" point="ne"/>
      <Line-segment x="18.693655" y="-2.295030" point="se"/>
      <Line-segment x="0.000000" y="0.000000" point="sw"/>
      <Line-segment x="2.591519" y="21.108714" point="nw"/>
   </Area-feature>
</Map-Data>

Mapper outputs the calculated coordinates of all the points, using x and y attributes, thus:

   <Point x="21.285365" y="18.813459" id="ne"/>

Mapper outputs a measure of how well is satisfied each constraint, using e attributes. Each indicates how consistent each constraint (measurement) is with the other constraints (measurements). This output is as a dimensionless error, with values less than or equal to one indicating that the constraint was adequately satisfied, zero indicating precise satisfaction of the constraint (rare in practice), and larger values indicating less well satisfied constraints. Mapper outputs this data thus:

      <Angle d="90" e="0.00" at="ne" to="se" from="nw"/>

Mapper repeats the point coordinates wherever the points are referred to in definitions of terrain features. This makes subsequent transformation of the output to SVG easier. For example:

   <Area-feature class="building">
      <Name lang="en">My House</Name>
      <Node x="21.285365" y="18.813459" point="ne"/>
      <Line-segment x="18.693655" y="-2.295030" point="se"/>
      <Line-segment x="0.000000" y="0.000000" point="sw"/>
      <Line-segment x="2.591519" y="21.108714" point="nw"/>
   </Area-feature>

This documentation is still being written, and is therefore incomplete.
$Revision: 6.5 $ $Date: 2002/07/06 15:38:35 $