View Ticket
Not logged in
Ticket Hash: af36b03cfa3c7b5e6a9dc509e05fda37e98b3a4a
Title: non-zero distance in meters is returned for polygon and point covered by that polygon
Status: Fixed Type: Code_Defect
Severity: Important Priority: Immediate
Subsystem: Resolution: Fixed
Last Modified: 2016-11-26 08:29:57
Version Found In: 4.4.0-RC1
User Comments:
anonymous added on 2016-11-16 08:39:50:
sqlite> SELECT ST_Distance(ST_GeomFromText('POLYGON ((0 0, 0 2, 2 2, 2 0, 0 0))'), ST_Point(1, 1));                
0.0

but 

sqlite> SELECT ST_Distance(ST_GeomFromText('POLYGON ((0 0, 0 2, 2 2, 2 0, 0 0))'), ST_Point(1, 1), 0);
111178.143755582

sandro added on 2016-11-26 08:19:40:
confirmed: same cause as in ticket f8444f1c67c9f955a48d0fc8425f56032f5eb35a (63)
ST_Distance() when receiving the "use_ellipsoid" argument badly missed to check for an eventual intersection between geom1 and geom2.