BritishGeologicalSurvey / pyagsapi

pyagsapi - An AGS Utilities API with AGS v4.x Schema Validation & Converter for .ags<-->.xslx files
https://britishgeologicalsurvey.github.io/pyagsapi/
GNU Lesser General Public License v3.0
12 stars 2 forks source link

Check for offshore and test #117

Closed ximenesuk closed 1 year ago

ximenesuk commented 1 year ago

This PR adds the additional check for whether a location is completely outside both the UK EEA Offshore area and Northern Ireland landmass. Locations outside of this area will currently report two error messages:

{'desc': 'NATE / NATN outside UK Offshore EEA or Northern Ireland (Paris)', 'group': 'LOCA', 'line': '16'},
{'desc': 'NATE / NATN outside Great Britain or Northern Ireland landmass (Paris)', 'group': 'LOCA', 'line': '16'},

It would be possible to drop this to the single "outside UK Offshore EEA" error if that was preferred.

Locations within the offshore area but not on the UK landmass will report a single error:

{'desc': 'NATE / NATN outside Great Britain or Northern Ireland landmass (MorayFirth)', 'group': 'LOCA', 'line': '15'},

The unit tests should pass.

KoalaGeo commented 1 year ago

@ximenesuk looks good & works for me.

If we can slightly ammend the error message think it's good to merge

ximenesuk commented 1 year ago

@ximenesuk looks good & works for me.

If we can slightly ammend the error message think it's good to merge

Messages amended.

KoalaGeo commented 1 year ago

Addresses https://github.com/BritishGeologicalSurvey/pyagsapi/issues/102