| От | Fabien COELHO |
|---|---|
| Тема | Re: Distance from point to box |
| Дата | |
| Msg-id | alpine.DEB.2.10.1407301719270.12870@sto обсуждение исходный текст |
| Ответ на | Re: Distance from point to box (Alexander Korotkov <aekorotkov@gmail.com>) |
| Ответы |
Re: Distance from point to box
|
| Список | pgsql-hackers |
>> ISTM that you miss the projection on the segment if dx=0 or dy=0. > > I don't need to find projection itself, I need only distance. When dx = 0 > then nearest point is on horizontal line of box, so distance to it is dy. > Same when dy = 0. When both of them are 0 then point is in the box. Indeed. I thought that the box sides where not parallel to the axis, but they are. So I do not see why it should be more complex. Maybe they is a general algorithm which works for polygons, and they use it for boxes? -- Fabien.
В списке pgsql-hackers по дате отправления:
Сайт использует файлы cookie для корректной работы и повышения удобства. Нажимая кнопку «Принять» или продолжая пользоваться сайтом, вы соглашаетесь на их использование в соответствии с Политикой в отношении обработки cookie ООО «ППГ», в том числе на передачу данных из файлов cookie сторонним статистическим и рекламным службам. Вы можете управлять настройками cookie через параметры вашего браузера