From 3552575ac3fdfd8b351332ae590657798ff7b3d8 Mon Sep 17 00:00:00 2001 From: Vincent Fazio Date: Mon, 23 Dec 2024 09:44:42 +0800 Subject: [PATCH] AUS-4233 Update scripts for new version of nvcl_kit --- web_build/make_boreholes.py | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/web_build/make_boreholes.py b/web_build/make_boreholes.py index 287d9a4..7c8c9aa 100755 --- a/web_build/make_boreholes.py +++ b/web_build/make_boreholes.py @@ -23,9 +23,13 @@ from lib.coords import convert_coords from nvcl_kit.reader import NVCLReader -from nvcl_kit.wfs_helpers import GSMLP_IDS from nvcl_kit.param_builder import param_builder +BH_INFO_KEYS = ['nvcl_id', 'identifier', 'name', 'description', 'purpose', 'status', 'drillingMethod', 'operator', 'driller', + 'drillStartDate', 'drillEndDate', 'startPoint', 'inclinationType', 'href', 'boreholeMaterialCustodian', 'boreholeLength_m', + 'elevation_m', 'elevation_srs', 'positionalAccuracy', 'source', 'x', 'y', 'z', 'parentBorehole_uri', 'metadata_uri', + 'genericSymbolizer'] + LOG_LVL = logging.INFO ''' Initialise debug level to minimal debugging @@ -58,14 +62,13 @@ def get_bh_info_dict(borehole_dict, param_obj): ''' Returns a dict of borehole info for displaying in a popup box when user clicks on a borehole in the model - :param borehole_dict: dict of borehole information \ - expected keys are: 'x', 'y', 'z', 'href' and GSMLP_IDS + :param borehole_dict: dict of borehole information expected keys are BH_INFO_KEYS :param param_obj: object containing command line parameters :return: dict of borehole information ''' info_obj = {} info_obj['title'] = borehole_dict['name'] - for key in GSMLP_IDS: + for key in BH_INFO_KEYS: if key not in ['name', 'identifier', 'metadata_uri'] and borehole_dict[key]: info_obj[key] = borehole_dict[key] info_obj['href'] = [{'label': 'WFS URL', 'URL': borehole_dict['href']}]