sumolib.geomhelper
index
/build/sumo-90fV4g/sumo-0.30.0+dfsg1/tools/sumolib/geomhelper.py

@file    geomhelper.py
@author  Daniel Krajzewicz
@author  Jakob Erdmann
@author  Michael Behrisch
@date    2013-02-25
@version $Id: geomhelper.py 22608 2017-01-17 06:28:54Z behrisch $
 
Some helper functions for geometrical computations.
 
SUMO, Simulation of Urban MObility; see http://sumo.dlr.de/
Copyright (C) 2013-2017 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
       
angle2D(p1, p2)
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
isWithin(pos, shape)
lineOffsetWithMinimumDistanceToPoint(point, line_start, line_end, perpendicular=False)
Return the offset from line (line_start, line_end) where the distance to
point is minimal
polyLength(polygon)
polygonOffsetAndDistanceToPoint(point, polygon, perpendicular=False)
Return the offset and the distancefrom the polygon start 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
absolute_import = _Feature((2, 5, 0, 'alpha', 1), (3, 0, 0, 'alpha', 0), 16384)