Closed nikki-t closed 3 months ago
Unit tests show this warning:
tests/test_api.py::test_timeseries_lambda_handler_json_lake
/Users/tebaldi/Documents/workspace/hydrocron/workspace/hydrocron/hydrocron/db/io/swot_shp.py:135: UserWarning: Geometry is in a geographic CRS. Results from 'centroid' are likely incorrect. Use 'GeoSeries.to_crs()' to re-project geometries to a projected CRS before this operation.
geodf_centerpoint['geometry'] = geodf_polygon['geometry'].centroid
@torimcd - Have you seen this before? Do you think this is an issue?
Was curious and found this explanation of the warning: https://gis.stackexchange.com/q/372564
I don't think the accuracy of the centroid we use is particularly important for our use case so I think what is here is ok but open to other opinions
Agreed, I don't think the accuracy is important here. I've been ignoring that warning since we aren't using the centroid to do anything more than facilitate returning valid geojson. We can open a new issue to fix it if the warning is annoying, but should probably add a note to the documentation in the meantime.
Github Issue: #196
Description
Add new option for the "feature" request parameter for prior lakes. Allows querying of lake data through the API.
Overview of work done
PriorLake
.hydrocron.utils.constants.PRIOR_LAKE_ALL_COLUMNS
.get_prior_lake_series_by_feature_id
.Overview of verification done
New and existing unit tests pass.
Overview of integration done
Deployed to SIT environment and ran the following queries.
Lake GeoJSON:
Response
Lake CSV:
Response
Lake compact GeoJSON:
Response
*Note: Only one time step
Lake compact CSV:
Response
PR checklist:
See Pull Request Review Checklist for pointers on reviewing this pull request