sumolib.geomhelper
index
/tmp/buildd/sumo-0.18.0+repack+dfsg/tools/sumolib/geomhelper.py

@file    geomhelper.py
@author  Daniel Krajzewicz
@date    2013-02-25
@version $Id: geomhelper.py 14425 2013-08-16 20:11:47Z behrisch $
 
Some helper functions for geometrical computations.
 
SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
Copyright (C) 2008-2013 DLR (http://www.dlr.de/) and contributors
All rights reserved

 
Modules
       
math

 
Functions
       
distance(p1, p2)
distancePointToLine(point, line_start, line_end, perpendicular=False)
Return the minimum distance between point and the line (line_start, line_end)
distancePointToPolygon(point, polygon, perpendicular=False)
Return the minimum distance between point and polygon
lineOffsetWithMinimumDistanceToPoint(point, line_start, line_end, perpendicular=False)
Return the offset from line (line_start, line_end) where the distance to
point is minimal
polygonOffsetWithMinimumDistanceToPoint(point, polygon, perpendicular=False)
Return the offset from the polygon start where the distance to point is minimal

 
Data
        INVALID_DISTANCE = -1