How to generate a matrix based on coordinates?
I have a map view in my application, and i want to draw an area of actuation based on the coordinates, for example: point A(x1,y1) to point B(x2,y2) to point C(x3, y3) to point D(x4, y4) and close on point A. I need to convert the distance between the points to meters, because each row and column of the matrix must have a distance of 1 meter on the world map scale between each one. If the X Y of the matrix is inside the drawn area on the map, get value = 1, else, get value = 0.