plotTerrainID fix

Moved the defining of it to before it is first used inside
Plot_AddMainFeatures