Skip to content

Conversation

@freewheelCarto
Copy link
Contributor

Changes to MakePolys script that address bugs and improved error reporting for certain circumstances, where the tool did not work as intended but did not report errors. Addresses 1) null values in IsConcealed field in the CAF line data, 2) failure in reporting mode when no label points or existing map unit polygons are present, and 3) missing group layer file for reporting layers. I left a bunch of comments in the file, which can be removed after the changes are reviewed.

  1. Original tried to query contacts and faults for IsConcealed values that are not "yes", but if a user did not have that field populated, no CAF lines were selected, so no polygons were created. The tool did not report an error - it ran successfully but did not create any map unit polygons. Change includes handling null values in the CAF IsConcealed field, and reports a Warning message if null values are included. It treats null values in IsConcealed as "not concealed" lines and will use them to create map unit polygons.

  2. Original tool errored out when no map unit points are given, reporting mode is on, and there are not existing map unit polygons. A function in the reporting section tried to identify extra label points in polygons, using the identity tool with a variable called label_points as input. Without any label point source, and no existing "old" map unit polys from which to create label points, this variable (label_points) is never defined, thus the script fails on the identity tool. Change was made by putting this part of the code in a boolean so it doesn't run if label_points isn't defined.

  3. Original When reporting mode is on, script looks for a .lyrx file in the /scripts folder that does not exist. This causes script to fail on addDataToPath().ete data described below. Change A grouplayer.lyrx file was added to the /scripts folder. Alternatively, a createGroupLayer method was used in the script to make the group layer in the map, instead of looking for saved layer file and adding it to the map. This is one line of code that replaces the other process. The grouplayer.lyrx is still included and the code to add it is commented out.

Changes to MapUnitPolys script that address bugs and improved error reporting for certain circumstances, where the tool did not work as intended but did not report errors. Addresses 1) null values in IsConcealed field in the CAF line data, 2) failure in reporting mode when no label points or existing map unit polygons are present, and 3) missing group layer file for reporting layers.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant