libpysal.cg.lonlat¶
- libpysal.cg.lonlat(pointslist)[source]¶
Converts point order from lat-lon tuples to lon-lat (x,y) tuples.
- Parameters:
- pointslist
list
A list of lat-lon tuples. This must be a list, even for one point.
- pointslist
- Returns:
- newpts
list
A list with tuples of points in lon-lat order.
- newpts
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)]