K
KO 88
Guest
KO 88 Asks: Dividing a square into smaller squares by using their shapes rather than their bounding boxes in R
I want to dividing a square into 25 smaller squares. The square layer has a UTM coordinate system, so when plotted, it doesn't have flat bottoms and tops. When I try
I'm providing a set of coordinates in "BGS2005_UTM_zone_35N" coordinate system, which you can use to reproduce the original data. Five sets of coordinates are provided for direct use of the
I want to dividing a square into 25 smaller squares. The square layer has a UTM coordinate system, so when plotted, it doesn't have flat bottoms and tops. When I try
st_make_grid()
function to overlay a grid on top of it, it uses bounding box to do that, and I get a grid doesn't perfectly overlap with the initial square. Kindly see the figure below where the red square is the initial, target square and the grid is the one created by the st_make_grid()
function. I want to know if there is a way to divide the squares into equal-sized, smaller squares without getting this misalignment problem. I'm providing a set of coordinates in "BGS2005_UTM_zone_35N" coordinate system, which you can use to reproduce the original data. Five sets of coordinates are provided for direct use of the
st_polygon()
function.
Code:
data.frame(x = c(924081.5, 920804.9, 970816.1, 974096.0, 924081.5), y = c(4260553, 4310549, 4313844, 4263815, 4260553))
SolveForum.com may not be responsible for the answers or solutions given to any question asked by the users. All Answers or responses are user generated answers and we do not have proof of its validity or correctness. Please vote for the answer that helped you in order to help others find out which is the most helpful answer. Questions labeled as solved may be solved or may not be solved depending on the type of question and the date posted for some posts may be scheduled to be deleted periodically. Do not hesitate to share your response here to help other visitors like you. Thank you, solveforum.