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

@file    geomhelper.py
@author  Daniel Krajzewicz
@date    2013-02-25
@version $Id: geomhelper.py 15692 2014-02-22 09:17:02Z behrisch $
 
Some helper functions for geometrical computations.
 
SUMO, Simulation of Urban MObility; see http://sumo-sim.org/
Copyright (C) 2008-2014 DLR (http://www.dlr.de/) and contributors
 
This file is part of SUMO.
SUMO is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 3 of the License, or
(at your option) any later version.

 
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
positionAtOffset(p1, p2, offset)
positionAtShapeOffset(shape, offset)

 
Data
        INVALID_DISTANCE = -1