The original map:

The map with code to cut the edges off: