in Education by
I need a datastructure to find all segments falling in a rectangle (in C#, even if it is not the main problem). For exemple, the segment [(0,0) , (10,10)] must be in the rectangle begining at (5,5) with the size (1,1). I tried kdtree, but it returns only segment when one of his point is exactly in the rectangle. It doesn't see the segment as a continous line. What sort of datastructure do I need to do this search efficiently? I search but didn't find anything for this case, even if it seems very standard! Problem Dimension : 6000 segments, average 20 line segment are in the rectangle Sort of duplicate : How to best store lines in a kd-tree Data structure for fast line queries? JavaScript questions and answers, JavaScript questions pdf, JavaScript question bank, JavaScript questions and answers pdf, mcq on JavaScript pdf, JavaScript questions and solutions, JavaScript mcq Test , Interview JavaScript questions, JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)

1 Answer

0 votes
by
For non-point objects (line segment is not a point object) R-tree may be better suited than kd-tree. If you have a small number of line segments (<50), storing them in a vector and always test all of them may be the fastest way.

Related questions

0 votes
    What are the 3 important segments for routing in MVC?...
asked Jun 14, 2021 in Technology by JackTerrance
0 votes
    The best stub selection for the transmission line will be (a) Series open (b) Series short ... proposed by,electromagnetic theory engineering physics,electromagnetic theory nptel...
asked Nov 6, 2021 in Education by JackTerrance
0 votes
    I have a simple method to search a pandas dataframe column for a list of keywords; however, I'd like to create a ... do everyth 28,passei o dia com o meu amor comemo demai...
asked Apr 13, 2022 in Education by JackTerrance
0 votes
    looking for a bit of advice on SQL indexing. Whats the best type of index to create on a non- ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Feb 20, 2022 in Education by JackTerrance
0 votes
    Which of the following function is used for searching text strings by means of regular expression? (a) grepd ... and answers pdf, Data Science interview questions for beginners...
asked Oct 29, 2021 in Education by JackTerrance
0 votes
    Which of the following contains output segments of AI programming? (a) Printed language and synthesized (b) Manipulation ... All of the mentioned Please answer the above question....
asked Sep 21, 2022 in Education by JackTerrance
0 votes
    Ticks are short lines that mark off an axis into segments of equal size. True False Select the correct answer from above options...
asked Dec 14, 2021 in Education by JackTerrance
0 votes
    The __________ downloads segments from Deep Storage, and responds to queries about these segments. (1)MiddleManager ... )Broker process (3)Historical process (4)Router process...
asked Aug 17, 2021 in Technology by JackTerrance
0 votes
    There Are Three Customer Segments in the Superstore Dataset. What Percent of the Total Profits Are Associated with the Corporate Segment?...
asked Mar 29, 2021 in Technology by JackTerrance
0 votes
    There Are Three Customer Segments in the Superstore Dataset. What Percent of the Total Profits Are Associated with the Corporate Segment?...
asked Nov 1, 2020 in Technology by JackTerrance
0 votes
    I have 2 large files (each about 500k lines or 85mb) containing the checksum of the file and the ... JavaScript Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Apr 16, 2022 in Education by JackTerrance
0 votes
    In practice, Line of best fit or regression line is found when _____________ (a) Sum of residuals (∑(Y ... Regression of R Programming Select the correct answer from above options...
asked Feb 9, 2022 in Education by JackTerrance
0 votes
    I have an XML file which is structured as follows: place1 location1 place2 location2 place3 location3 These ... Questions for Interview, JavaScript MCQ (Multiple Choice Questions)...
asked Mar 2, 2022 in Education by JackTerrance
0 votes
    Name the different searching techniques used to retrieve information on Internet. Select the correct answer from above options...
asked Nov 30, 2021 in Education by JackTerrance
...