emod_api.demographics.service.grid_construction module#

  • construct a grid from a bounding box

  • label a collection of points by grid cells

  • input: - points csv file with required columns lat,lon # see example input files (structures_households.csv)

  • output: - csv file of grid locations
    • csv with grid cell id added for each point record

emod_api.demographics.service.grid_construction.get_grid_cell_id(idx, idy)[source]#
emod_api.demographics.service.grid_construction.construct(x_min, y_min, x_max, y_max)[source]#

Creating grid

emod_api.demographics.service.grid_construction.get_bbox(data)[source]#
emod_api.demographics.service.grid_construction.lon_lat_2_point(lon, lat)[source]#
emod_api.demographics.service.grid_construction.point_2_grid_cell_id_lookup(point, grid_id_2_cell_id, origin)[source]#