def getSquareDistance(p1, p2):
    dx = p1[0] - p2[0]
    dy = p1[1] - p2[1]

    return dx * dx + dy * dy
Square distance between two points
dataset/ETHPy150Open project-open-data/esri2open/Install/esri2open/topojson/simplify.py/getSquareDistance