A practical method to determine the spatial resolution of GEM detector