Add python functions to overlay grid on polygon