Commit c5c192d
committed
Implement poly_distance().
geo_ops.c contains half a dozen functions that are just stubs throwing
ERRCODE_FEATURE_NOT_SUPPORTED. Since it's been like that for more
than twenty years, there's clearly not a lot of interest in filling in
the stubs. However, I'm uncomfortable with deleting poly_distance(),
since every other geometric type supports a distance-to-another-object-
of-the-same-type function. We can easily add this capability by
cribbing from poly_overlap() and path_distance().
It's possible that the (existing) test case for this will show some
numeric instability, but hopefully the buildfarm will expose it if so.
In passing, improve the documentation to try to explain why polygons
are distinct from closed paths in the first place.
Discussion: https://postgr.es/m/3426566.1638832718@sss.pgh.pa.us1 parent 3f32395 commit c5c192d
File tree
3 files changed
+123
-13
lines changed- doc/src/sgml
- src
- backend/utils/adt
- test/regress/expected
3 files changed
+123
-13
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3562 | 3562 | | |
3563 | 3563 | | |
3564 | 3564 | | |
3565 | | - | |
3566 | | - | |
| 3565 | + | |
| 3566 | + | |
| 3567 | + | |
3567 | 3568 | | |
3568 | 3569 | | |
3569 | 3570 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3798 | 3798 | | |
3799 | 3799 | | |
3800 | 3800 | | |
3801 | | - | |
3802 | | - | |
| 3801 | + | |
| 3802 | + | |
3803 | 3803 | | |
3804 | | - | |
3805 | | - | |
3806 | 3804 | | |
3807 | 3805 | | |
3808 | 3806 | | |
| |||
3854 | 3852 | | |
3855 | 3853 | | |
3856 | 3854 | | |
| 3855 | + | |
| 3856 | + | |
| 3857 | + | |
| 3858 | + | |
| 3859 | + | |
| 3860 | + | |
| 3861 | + | |
| 3862 | + | |
| 3863 | + | |
| 3864 | + | |
| 3865 | + | |
| 3866 | + | |
3857 | 3867 | | |
3858 | 3868 | | |
3859 | 3869 | | |
| |||
4071 | 4081 | | |
4072 | 4082 | | |
4073 | 4083 | | |
4074 | | - | |
4075 | 4084 | | |
4076 | 4085 | | |
4077 | | - | |
| 4086 | + | |
| 4087 | + | |
| 4088 | + | |
| 4089 | + | |
| 4090 | + | |
| 4091 | + | |
| 4092 | + | |
4078 | 4093 | | |
4079 | | - | |
4080 | | - | |
4081 | | - | |
| 4094 | + | |
| 4095 | + | |
| 4096 | + | |
| 4097 | + | |
| 4098 | + | |
| 4099 | + | |
| 4100 | + | |
4082 | 4101 | | |
4083 | | - | |
| 4102 | + | |
| 4103 | + | |
| 4104 | + | |
| 4105 | + | |
| 4106 | + | |
| 4107 | + | |
| 4108 | + | |
| 4109 | + | |
| 4110 | + | |
| 4111 | + | |
| 4112 | + | |
| 4113 | + | |
| 4114 | + | |
| 4115 | + | |
| 4116 | + | |
| 4117 | + | |
| 4118 | + | |
| 4119 | + | |
| 4120 | + | |
| 4121 | + | |
| 4122 | + | |
| 4123 | + | |
| 4124 | + | |
| 4125 | + | |
| 4126 | + | |
| 4127 | + | |
| 4128 | + | |
| 4129 | + | |
| 4130 | + | |
| 4131 | + | |
| 4132 | + | |
| 4133 | + | |
| 4134 | + | |
| 4135 | + | |
| 4136 | + | |
| 4137 | + | |
| 4138 | + | |
| 4139 | + | |
| 4140 | + | |
4084 | 4141 | | |
4085 | 4142 | | |
4086 | 4143 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4189 | 4189 | | |
4190 | 4190 | | |
4191 | 4191 | | |
4192 | | - | |
| 4192 | + | |
| 4193 | + | |
| 4194 | + | |
| 4195 | + | |
| 4196 | + | |
| 4197 | + | |
| 4198 | + | |
| 4199 | + | |
| 4200 | + | |
| 4201 | + | |
| 4202 | + | |
| 4203 | + | |
| 4204 | + | |
| 4205 | + | |
| 4206 | + | |
| 4207 | + | |
| 4208 | + | |
| 4209 | + | |
| 4210 | + | |
| 4211 | + | |
| 4212 | + | |
| 4213 | + | |
| 4214 | + | |
| 4215 | + | |
| 4216 | + | |
| 4217 | + | |
| 4218 | + | |
| 4219 | + | |
| 4220 | + | |
| 4221 | + | |
| 4222 | + | |
| 4223 | + | |
| 4224 | + | |
| 4225 | + | |
| 4226 | + | |
| 4227 | + | |
| 4228 | + | |
| 4229 | + | |
| 4230 | + | |
| 4231 | + | |
| 4232 | + | |
| 4233 | + | |
| 4234 | + | |
| 4235 | + | |
| 4236 | + | |
| 4237 | + | |
| 4238 | + | |
| 4239 | + | |
| 4240 | + | |
| 4241 | + | |
| 4242 | + | |
| 4243 | + | |
| 4244 | + | |
4193 | 4245 | | |
4194 | 4246 | | |
4195 | 4247 | | |
| |||
0 commit comments