Read vector maps from text files

The vmapfile driver reads a vector map from a text file and provides the map to others via the interface_map interface.

The text file should contain lines in the format

x1 y1 x2 y2

where (x1,y1) and (x2,y2) are the cartesian coordinates representing the endpoints of each vector. The endpoints are read in as floating point numbers, so they can have decimal values.

Compile-time dependencies
  • None
Provides
  • interface_map
Requires
  • None
Configuration requests
  • PLAYER_MAP_REQ_GET_VECTOR
Configuration file options
  • filename (string)
    • Default: NULL
    • The file to read.
  • scale (tuple [double double])
    • Default [1.0 1.0]
    • Multipliers for X,Y of each vector, for the final result to be in meters
Example
driver
(
  name "vmapfile"
  provides ["map:0"]
  filename "mymap.wld"
  scale [1.0 1.0]
)
Author
Brian Gerkey