A more precise polygon_overlap()
От | Kenneth Chan |
---|---|
Тема | A more precise polygon_overlap() |
Дата | |
Msg-id | 20020522192335.50500.qmail@iname.com обсуждение исходный текст |
Список | pgsql-hackers |
Gents, I am looking for a more precise polygon overlap test and any comment/pointers/suggestions are appreciated. Attached is themodified poly_overlap in geoops.c. If the polygons pass the bounding box check, the following tests will be carried out. The tests are terminated as soon asone of them returns true: 1) At least one of the vertex in polygon a is inside polygon b 2) At least one of the vertex in polygon b is inside polygon a 3) At least one edge of polygon a intersects with an edge on polygon b All these tests could be expensive for polygons with lots of vertices. Would anyone know where I can find information ona more efficient way of determining polygon overlap. Efficiency aside, is there anything obivious I have missed which could lead to an incorrect result? The end game for me is to be able to test if a path enters a polygon and this is a first step as I am new to postgresql. Looks like postgresql converts the path to a polygon and call poly_overlap(), which could lead to incorrect result. At some stage, I might add an overlap operator that accepts a path and a polygon. TIA Kenneth Chan. -- _______________________________________________ Sign-up for your own FREE Personalized E-mail at Mail.com http://www.mail.com/?sr=signup
Вложения
В списке pgsql-hackers по дате отправления: