niwa / geoapis

A Python package for simply downloading publicly available web-hosted geo-spatial data. View API docs at: https://niwa.github.io/geoapis/
MIT License
9 stars 3 forks source link

Traceback when no vector data is in the WFS search region #15

Closed rosepearson closed 3 years ago

rosepearson commented 3 years ago

In the vector WfsQueryBase class in the get_features_inside_catchment method the CRS information is queried before we check to see if their are any features returned. In the case of no feature information being returned the CRS is none and a key error is returned for feature_collection['crs']['properties']['name'].

Fix this bug by only checking for the CRS information after checking to see if any features have been returned