# pysal.lib.cg.geogrid¶

pysal.lib.cg.geogrid(pup, pdown, k, lonx=True)[source]

Computes a k+1 by k+1 set of grid points for a bounding box in lat-lon uses geointerpolate

Parameters: pup : tuple with lat-lon or lon-lat for upper left corner of bounding box pdown : tuple with lat-lon or lon-lat for lower right corner of bounding box k : number of grid cells (grid points will be one more) lonx : boolean to assess the order of the coordinates, for lon,lat (default) = True, for lat,lon = False grid : list of tuples with lat-lon or lon-lat for grid points, row by row, starting with the top row and moving to the bottom; coordinate tuples are returned in same order as input