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

Geojson api and gui #142

Closed ximenesuk closed 4 months ago

ximenesuk commented 4 months ago

This PR adds the option for GeoJSON to be included in the JSON validation response data if possible. Two fields have been added to the validation response data: geojson and geojson_error.

The tests should pass. The GUI should be tested with a range of files, test_borehole_map.py contains a useful set or good and bad files.

The PR also fully implements the sorting strategies. All four return whatever the upstream library returned. For some files each option should return a different sheet ordering, "Ashfield Area C Development.ags" illustrates this. The tests only confirm default and alphabetical until the other orders are confirmed.

Finally, the Summary from the AGS checker is added to the data as a summary field containing a list of summary items. This list mostly duplicates the additional_metadata resulting from a BGS check. The schema tests have been updated but there are no explicit tests for summary content in the JSON fixtures. I'll leave this as a discussion point for @volcan01010 and @KoalaGeo!

This PR supersedes #140

KoalaGeo commented 4 months ago

AGS Library Summary and BGS additional metadata duplicate 4 of 5 attributes.

image

AGS Checks should use AGS Summary BGS Checks should use BGS additional Metadata AGS & BGS Checks should use BGS additional Metadata

KoalaGeo commented 4 months ago

Map should return at end of Validation Results pop up

Use the same topographic & imagery basemaps as the data discovery maps. If can add th OS 50k and 25k at higher resolutions that'd be great.

Map should have link to "Download GeoJSON" which strips the geojson from the validation response and provides as download to the end user.

ximenesuk commented 4 months ago

In that case the summary field could be dropped. AGS could populate additional_metadata and then BGS check overwrite it or create it. On 7 Mar 2024 at 16:49 +0000, KoalaGeo @.***>, wrote:

AGS Library Summary and BGS additional metadata duplicate 4 of 5 attributes.

AGS Checks should use AGS Summary BGS Checks should use BGS additional Metadata AGS & BGS Checks should use BGS additional Metadata

— Reply to this email directly, view it on GitHubhttps://github.com/BritishGeologicalSurvey/pyagsapi/pull/142#issuecomment-1983985628, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAIEBON24VIGYRJUDW6WP7TYXCK7RAVCNFSM6AAAAABELDYF36VHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBTHE4DKNRSHA. You are receiving this because you authored the thread.Message ID: @.***>

This email and any attachments are intended solely for the use of the named recipients. If you are not the intended recipient you must not use, disclose, copy or distribute this email or any of its attachments and should notify the sender immediately and delete this email from your system. UK Research and Innovation (UKRI) has taken every reasonable precaution to minimise risk of this email or any attachments containing viruses or malware but the recipient should carry out its own virus and malware checks before opening the attachments. UKRI does not accept any liability for any losses or damages which the recipient may sustain due to presence of any viruses.

KoalaGeo commented 4 months ago

Test GeoJSON with https://github.com/BritishGeologicalSurvey/pyagsapi/blob/main/test/files/real/East%20West%20Rail%20BGS%20Pre%20October%202018%20upload.ags

What do do with NULL / 0 in the NATE/NATN? strip those rows?

volcan01010 commented 4 months ago

I have addressed the summary issue. All the rest looks good, with the JSON appearing in the responses.

KoalaGeo commented 4 months ago

I have addressed the summary issue. All the rest looks good, with the JSON appearing in the responses.

Can we not make the IF AGS AND/OR BGS make it so the AGS summary responses appear under additional metadata and the BGS attributes then no GUI changes would be required?

bgs_all_groups == summary:0 bgs_file == summary:3 bgs_dict == summary:2 bgs_loca_rows == summary:1 bgs_projects == NULL

volcan01010 commented 4 months ago

Yes, OK. I'll look at that now.