azavea / climate-change-api

Apache License 2.0
0 stars 0 forks source link

Add API endpoint to get map cells for a lat/lon point #849

Closed maurizi closed 6 years ago

maurizi commented 6 years ago

Overview

This adds a new endpoint to query for map cell metadata for a given lat/lon point. This is intended as the point-based counterpart to the /api/city/{id}/map-cell/ endpoint.

Demo

API results: screenshot from 2018-11-14 13-11-28

Docs: screenshot from 2018-11-14 13-14-02

Notes

It's not great that we have to call ClimateDataCell.objects.map_cell_for_lat_lon once per dataset - I think ideally we'd tighten the relationship between data cell and dataset in a way that would allow getting all map cells regardless of dataset in 1 query. Since we only have 2 datasets right now though, it's not the biggest issue.

Testing Instructions

Checklist

Closes #847