I am trying to design a grid system that can be applied to any forms of building/facility, and each squares in the grid system can be explained by 4 specific coordinates(bottomLeft/bottomRight/utopLeft/topRight). My bounding box coordinates for my facility are shown here,
bottomLeft = (5728532.582535409, -103910.03553330127)
bottomRight = (5728616.315470162, -103910.03553330127)
topLeft = (5728532.582535409, -103774.97966179297)
topRight = (5728616.315470162, -103774.97966179297)
the units are in meters for the coordinate system.
The facility's form is shown in the grid system as follows, and I want to know how I can give a coordinate attribute to each square in the grid system. More specifically, the bottomLeft/bottomRight/utopLeft/topRight coordinates for each square that is covered by the building in the grid. The number of rows and columns of the grid can be customized, so it does not necessarily need to be the same as my graph shows.
Or if there can be a simplier way, say, assigning numbers to all rows and all columns in the grid system. 11 will be the topLeft square, 12 will be the square right next to it assuming the first index pointing to row's number, and the second index pointing to the column's.
How can I implement this algorithm? Can anyone please help? Thanks!
I have tried to use np.linspace to simplely divide the x-axis and y-axis based on the bounding box coordinate into n pieces. However, I have no idea how to visualize the answer to the graph.
I am expecting a result that can give me the coordinates of each sqaure, and a numbers label for each row and column, so I can locate each square even faster. Knowing the coordinates will help me move forward in the next step of the project because I need to know what devices in each box when I have the devices' location. So knowing both each square's coordinates(bottomLeft/bottomRight/utopLeft/topRight) and its labeled row numbers(11,12,like a matrix,etc) will be great.