Split overlapped segments into non-overlapped segments using “foverlap” function in R [on hold]












-5












$begingroup$


I am a beginner in R programming. I need help to split overlapped segments and create the new non-overlapped segmentation after dividing. I have two data frames, Roadway_seg and Curve_seg
Roadway_segCurve_seg



I want to add curve_rad value from Curve_seg data frame into Roadway_seg data frame for matching ROAD_INV, BEGMP and ENDMP. The segments in the data frames might be overlapping for some segments. I want to split the roadway segments which are overlapped with curve segments.



For example, the results of the above after running the algorithm would be:
result



I used the code



setkey(curve, INV, BEGMP, ENDMP)
seg_curve2=foverlaps(segments,curve,type="within")
write.csv(seg_curve2, file = "segwithcurve2.csv", row.names = TRUE)


But this not dividing the segments, What extra steps do I need for splitting in unique non-overlapped segments?










share|improve this question









New contributor




Sadia Sharmin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$



put on hold as off-topic by Ludisposed, Toby Speight, 200_success, BCdotWEB, πάντα ῥεῖ 6 hours ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Ludisposed, Toby Speight, 200_success, BCdotWEB, πάντα ῥεῖ

If this question can be reworded to fit the rules in the help center, please edit the question.
















  • $begingroup$
    Questions asking for advice about code not yet written are off-topic. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
    $endgroup$
    – BCdotWEB
    9 hours ago
















-5












$begingroup$


I am a beginner in R programming. I need help to split overlapped segments and create the new non-overlapped segmentation after dividing. I have two data frames, Roadway_seg and Curve_seg
Roadway_segCurve_seg



I want to add curve_rad value from Curve_seg data frame into Roadway_seg data frame for matching ROAD_INV, BEGMP and ENDMP. The segments in the data frames might be overlapping for some segments. I want to split the roadway segments which are overlapped with curve segments.



For example, the results of the above after running the algorithm would be:
result



I used the code



setkey(curve, INV, BEGMP, ENDMP)
seg_curve2=foverlaps(segments,curve,type="within")
write.csv(seg_curve2, file = "segwithcurve2.csv", row.names = TRUE)


But this not dividing the segments, What extra steps do I need for splitting in unique non-overlapped segments?










share|improve this question









New contributor




Sadia Sharmin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$



put on hold as off-topic by Ludisposed, Toby Speight, 200_success, BCdotWEB, πάντα ῥεῖ 6 hours ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Ludisposed, Toby Speight, 200_success, BCdotWEB, πάντα ῥεῖ

If this question can be reworded to fit the rules in the help center, please edit the question.
















  • $begingroup$
    Questions asking for advice about code not yet written are off-topic. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
    $endgroup$
    – BCdotWEB
    9 hours ago














-5












-5








-5


1



$begingroup$


I am a beginner in R programming. I need help to split overlapped segments and create the new non-overlapped segmentation after dividing. I have two data frames, Roadway_seg and Curve_seg
Roadway_segCurve_seg



I want to add curve_rad value from Curve_seg data frame into Roadway_seg data frame for matching ROAD_INV, BEGMP and ENDMP. The segments in the data frames might be overlapping for some segments. I want to split the roadway segments which are overlapped with curve segments.



For example, the results of the above after running the algorithm would be:
result



I used the code



setkey(curve, INV, BEGMP, ENDMP)
seg_curve2=foverlaps(segments,curve,type="within")
write.csv(seg_curve2, file = "segwithcurve2.csv", row.names = TRUE)


But this not dividing the segments, What extra steps do I need for splitting in unique non-overlapped segments?










share|improve this question









New contributor




Sadia Sharmin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.







$endgroup$




I am a beginner in R programming. I need help to split overlapped segments and create the new non-overlapped segmentation after dividing. I have two data frames, Roadway_seg and Curve_seg
Roadway_segCurve_seg



I want to add curve_rad value from Curve_seg data frame into Roadway_seg data frame for matching ROAD_INV, BEGMP and ENDMP. The segments in the data frames might be overlapping for some segments. I want to split the roadway segments which are overlapped with curve segments.



For example, the results of the above after running the algorithm would be:
result



I used the code



setkey(curve, INV, BEGMP, ENDMP)
seg_curve2=foverlaps(segments,curve,type="within")
write.csv(seg_curve2, file = "segwithcurve2.csv", row.names = TRUE)


But this not dividing the segments, What extra steps do I need for splitting in unique non-overlapped segments?







beginner r






share|improve this question









New contributor




Sadia Sharmin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.











share|improve this question









New contributor




Sadia Sharmin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









share|improve this question




share|improve this question








edited 2 hours ago







Sadia Sharmin













New contributor




Sadia Sharmin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.









asked 15 hours ago









Sadia SharminSadia Sharmin

11




11




New contributor




Sadia Sharmin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.





New contributor





Sadia Sharmin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.






Sadia Sharmin is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.




put on hold as off-topic by Ludisposed, Toby Speight, 200_success, BCdotWEB, πάντα ῥεῖ 6 hours ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Ludisposed, Toby Speight, 200_success, BCdotWEB, πάντα ῥεῖ

If this question can be reworded to fit the rules in the help center, please edit the question.







put on hold as off-topic by Ludisposed, Toby Speight, 200_success, BCdotWEB, πάντα ῥεῖ 6 hours ago


This question appears to be off-topic. The users who voted to close gave this specific reason:


  • "Code not implemented or not working as intended: Code Review is a community where programmers peer-review your working code to address issues such as security, maintainability, performance, and scalability. We require that the code be working correctly, to the best of the author's knowledge, before proceeding with a review." – Ludisposed, Toby Speight, 200_success, BCdotWEB, πάντα ῥεῖ

If this question can be reworded to fit the rules in the help center, please edit the question.












  • $begingroup$
    Questions asking for advice about code not yet written are off-topic. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
    $endgroup$
    – BCdotWEB
    9 hours ago


















  • $begingroup$
    Questions asking for advice about code not yet written are off-topic. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
    $endgroup$
    – BCdotWEB
    9 hours ago
















$begingroup$
Questions asking for advice about code not yet written are off-topic. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
$endgroup$
– BCdotWEB
9 hours ago




$begingroup$
Questions asking for advice about code not yet written are off-topic. Please follow the tour and read "How do I ask a good question?", "What topics can I ask about here?" and "What types of questions should I avoid asking?".
$endgroup$
– BCdotWEB
9 hours ago










0






active

oldest

votes

















0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes

Popular posts from this blog

How to make a Squid Proxy server?

第一次世界大戦

Touch on Surface Book