How to generate lines with specific direction from points

18 views Asked by At

I have a list of points, spaced roughly 2.5 meters apart. Some points are closer or farther from each other than this distance. I want to create lines in a northwest-southeast direction (as picture), with each line spaced 3.5 meters apart (the orange colour lines on the picture). Only points approximately 2.5 meters apart will be used to generate these lines; others much larger or smaller this 2.5 meters will be ignored (points with blue colour on the picture). How can I achieve this using Python?

Below are my points coordinates in NZTM ((New Zealand Transverse Mercator) coordinate system):

[(1894419.1676073996, 5763028.664140096), (1894422.2213155003, 5763024.046833784), (1894420.0587863764, 5763025.115224303), (1894423.6198921362, 5763026.953786211), (1894428.6673662942, 5763025.44441213), (1894433.6791538028, 5763023.84005034), (1894431.2709350334, 5763024.518364979), (1894424.4628495527, 5763019.741958309), (1894418.552026459, 5763020.977293945), (1894426.1201751372, 5763020.541515332), (1894425.098325993, 5763023.161571276), (1894421.4757215753, 5763020.084169364), (1894429.1731958333, 5763018.196336435), (1894431.0624828963, 5763021.150793614), (1894427.030502974, 5763018.575131353), (1894431.358736312, 5763017.042347838), (1894434.2830495937, 5763020.360075035), (1894427.63269562, 5763021.993720094), (1894434.4315248383, 5763016.4181067785), (1894429.3290980253, 5763022.375569618), (1894436.5130415447, 5763018.797155001), (1894430.2919487664, 5763020.59701773), (1894442.349830174, 5763020.382214543), (1894444.613833068, 5763019.55167036), (1894439.5182284731, 5763018.015789331), (1894443.119595849, 5763016.3434212115), (1894439.221634359, 5763021.666818723), (1894438.1652611047, 5763015.311326039), (1894437.2836783128, 5763019.3934357185), (1894439.1741247233, 5763023.30417553), (1894436.7832011608, 5763015.215020707), (1894447.550798541, 5763018.68991359), (1894449.8506622687, 5763014.1431029895), (1894453.0226453207, 5763017.377600503), (1894449.69216738, 5763017.904890895), (1894446.8563310057, 5763015.145445534), (1894450.3979221154, 5763018.293394697), (1894455.816006057, 5763016.24536609), (1894458.0750947343, 5763015.325456924), (1894461.1790076736, 5763014.36164566), (1894442.2540249284, 5763012.611625285), (1894445.3683168935, 5763011.326336556), (1894445.1707855416, 5763010.111739053), (1894438.5502295122, 5763014.022023426), (1894447.4462702433, 5763010.54086871), (1894452.8437993815, 5763009.307925301), (1894450.4492029678, 5763009.814127336), (1894452.8499273518, 5763012.848422013), (1894464.789408084, 5763005.320750063), (1894459.8805866744, 5763007.160673708), (1894458.4096890287, 5763011.538647735), (1894462.6474522278, 5763006.100286745), (1894464.0276780194, 5763013.434098876), (1894461.3182516545, 5763010.504632506), (1894458.1730329096, 5763007.341462506), (1894464.1083376976, 5763009.950540608), (1894455.8643732145, 5763012.339883302), (1894461.1549719162, 5763006.205525867), (1894410.2756318608, 5763034.764022888), (1894415.1489418708, 5763030.3554201), (1894414.8469242072, 5763027.367206241), (1894411.2591219312, 5763029.693712353), (1894409.2758570546, 5763031.6195787955), (1894417.044738615, 5763025.852944607), (1894412.7090903986, 5763032.185084512), (1894413.1687709, 5763028.492344245), (1894413.3173584584, 5763022.003086638), (1894416.135296831, 5763021.759962137), (1894455.752431132, 5763008.228598645), (1894467.4588890132, 5763008.448857379), (1894467.8260459353, 5763012.015524623), (1894469.2422226348, 5763006.665523757), (1894470.6583993346, 5763003.570915414), (1894470.5534973568, 5763009.865034079), (1894472.6515369117, 5763006.770425735), (1894467.563790991, 5763002.679248603)]

enter image description here

0

There are 0 answers