Skip to content

Conversation

@noellehmcheng
Copy link

No description provided.

@noellehmcheng noellehmcheng changed the base branch from processing/thickness_calculator to processing/processing_tools October 7, 2025 03:09
@noellehmcheng
Copy link
Author

noellehmcheng commented Oct 7, 2025

  • replace hardcoded fields with dynamic fields for Sampler
  • change bounding box handling by using geology's extent
  • add orientation type parameter with options for dip direction and strike (please refer to map2loop pr #237)
  • fix stratigraphic column layer retrieval

@noellehmcheng
Copy link
Author

This branch was created from processing/thickness_calculator which does not include updated code from processing/procecssing_tools, which makes this pull request show many unrelated code diff.
Please focus on the changes to sampler.py and thickness_calculator.py only.
If these changes are too difficult to review in the current pr, i'd be happy to create a separate pr that shows only relevant code changes for clearer comparison.

@noellehmcheng noellehmcheng marked this pull request as ready for review October 7, 2025 03:41
Copy link
Member

@rabii-chaarani rabii-chaarani left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You can merge after resolving the conflicts and making the requested changes


fields = QgsFields()
fields.append(QgsField("ID", QVariant.String))
fields.append(QgsField("X", QVariant.Double))
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should use QVariant for the moment, as QMetaType don't work for older versions

self.addParameter(
QgsProcessingParameterEnum(
'THICKNESS_ORIENTATION_TYPE',
'Thickness Orientation Type',
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It should be "Orientation Type". Just FYI," Thickness orientation type" doesn't exist in geology.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The user should be able to choose between having a manual bounding box or using the extent of any polygon layer they want. So, you can add another parameter of the layer they want to use for the bounding box

Comment on lines 228 to 232
geology_layer = self.parameterAsVectorLayer(parameters, self.INPUT_GEOLOGY, context)
extent = geology_layer.extent()
bounding_box = {
'minx': extent.xMinimum(),
'miny': extent.yMinimum(),
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comment above for the removed bounding box parameter

@noellehmcheng noellehmcheng merged commit d5e5862 into processing/processing_tools Oct 16, 2025
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants