为什么这个几何点不与多边形相交?我知道该点存在于给定的多边形中。它返回0的任何原因?
DECLARE @point geometry
DECLARE @poly geometry
SET @point = geometry::STGeomFromText('POINT (-79.393967 43.640056)', 4326)
DECLARE @minY varchar(20) = N'-79.37776573850101'
DECLARE @maxY varchar(20) = N'-79.41055306149906'
DECLARE @minX varchar(20) = N'43.63590433545648'
DECLARE @maxX varchar(20) = N'43.64460037532088'
DECLARE @boundingRect varchar(250)
SET @boundingRect = 'POLYGON((' + @minX + ' ' + @minY + ', ' +
@maxX + ' ' + @minY + ', ' +
@maxX + ' ' + @maxY + ', ' +
@minX + ' ' + @maxY + ', ' +
@minX + ' ' + @minY + '))'
SET @poly = geometry::STGeomFromText(@boundingRect, 4326)
SELECT @point.STIntersects(@poly)