 								}
 								else if (simpleGeomIsLine)
 								{
-									distanceSq = ComputationalGeometryUtils.getUnscaledDistanceFromLine(
-										vertices[0].x, vertices[0].y, vertices[1].x, vertices[1].y,
-										xQueryCenter, yQueryCenter);
+									distanceSq = getMinimumUnscaledDistanceFromPolyLine(vertices, xQueryCenter, yQueryCenter);
 									if (distanceSq <= Number.MIN_VALUE)
 										overlapsQueryCenter = true;
 									else

									}
									else if (genGeomIsPoint)
									{
										distanceSq = ComputationalGeometryUtils.getDistanceFromPointSq(
											part[0].x, part[0].y, xQueryCenter, yQueryCenter);
										if (distanceSq <= Number.MIN_VALUE)
											overlapsQueryCenter = true;
										else 

						}
						else if (simpleGeomIsLine) // if a line, check for bounds intersect line
						{
							if (polygonOverlapsPolyLine(_tempBoundsPolygon, vertices))
							{
								result.push(key);
								continue keyLoop;
