ohsome-quality-api
ohsome-quality-api copied to clipboard
Pydantic input feature collection
Description
We now use geojson_pydantic in our request_models which allows the users to have full information of the type of geojson that is required to query oqapi.
New or changed dependencies
- removed the package geojson
Checklist
- [x] I have updated my branch to
main
(e.g. throughgit rebase main
) - [x] My code follows the style guide and was checked with pre-commit before committing
- [x] I have added sufficient unit and integration tests
- [ ] I have updated the CHANGELOG.md
Looks good. Thanks for the tedious effort. A couple of things I would like to tackle before merging:
- [x] Why does the area calculation differ?
- [x] Write a custom mapper or loop for reproject coordinates (raster/client.py)
- [x] Make properties optional. Often times properties are empty and not inlcuded in a GeoJSON. We should not be to strict on our side.
- [x] Add CRS validator function as part of the custom request pydantic model
- [ ] Review /tests @matthiasschaub
- [ ] Add example to request model. Users should be able to fire up an example request using Swagger UI without changing anything.
Looks good. Thanks for the tedious effort. A couple of things I would like to tackle before merging:
* [x] Why does the area calculation differ? * [x] Write a custom mapper or loop for reproject coordinates (raster/client.py) * [x] Make properties optional. Often times properties are empty and not inlcuded in a GeoJSON. We should not be to strict on our side. * [ ] Add CRS validator function as part of the custom request pydantic model * [ ] Review /tests @matthiasschaub * [ ] Add example to request model. Users should be able to fire up an example request using Swagger UI without changing anything.
-> area calculation differs since geojson library rounds or cuts coordinate precision to 6 decimal spaces, pydantic_geojson does not