   Sorting points
  Hi!Anybody knows, if there is an structure for sorting points?The purpose is to collect a set of points, and search the nearest point to an arbitraty.   
  You need to make your question more clearly. What is exactly the problem you are trying to solve?   ;  Sorry!In other words, is needed to mantain a set of points, that allows to do queries about which point is the nearest to the new one. Something like a hash-space, or a quad-tree.   ;  Use a tree, Octree/Quadtree or BSP   ;Quote:Original post by leoptimusSorry!In other words, is needed to mantain a set of points, that allows to do queries about which point is the nearest to the new one. Something like a hash-space, or a quad-tree.Let me try to rephrase your problem..You are given a set of locations of fire stations in a City. Now given a building which has caught fire, locate the nearest fire station.Am I guessing you right?For this you can use something called as Voronoi Diagram.Here is a link: Voronoi Diagram;  Wow, that's it!Thanks.   