# Draw the GenaMap export file streets.EE into a PNG file.
#
newpage "eps", "tutorialdatasets2.eps", 60, 60
dataset "textfile", "streets.EE", ""
worlds 324846, 1257086, 325300, 1257476
while Mapyrus.fetch.more
do
  # Header line for each feature contains coordinate count.
  #
  fetch
  let nCoords = substr($0, 51, 5)

  # Fetch first point of feature and add it to path.
  #
  clearpath
  fetch
  move $1, $2

  repeat (nCoords - 1)
  do
    # Add the rest of feature's coordinates to the path.
    #
    fetch
    draw $1, $2
  done

  # Draw each line in red.
  #
  color 'red'
  stroke
done
