fixErrorsIn function

Fix common errors in GIS layers, using terra