libpysal.cg.lonlat

libpysal.cg.lonlat(pointslist)[source]

Converts point order from lat-lon tuples to lon-lat (x,y) tuples

Parameters
pointslistlist of lat-lon tuples (Note, has to be a list, even for one point)
Returns
newptslist with tuples of points in lon-lat order

Examples

>>> points = [(41.981417, -87.893517), (41.980396, -87.776787), (41.980906, -87.696450)]
>>> newpoints = lonlat(points)
>>> newpoints
[(-87.893517, 41.981417), (-87.776787, 41.980396), (-87.69645, 41.980906)]