convert convex line information into grid cell before computing grid cell