Issue17

Functions ported from tilebelt plus new commands for the mercantile program.