Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Alternative approach to fix #655 #660

Draft
wants to merge 2 commits into
base: develop
Choose a base branch
from

Conversation

FObermaier
Copy link
Member

Prerequisites

  • I have written a descriptive pull-request title
  • I have verified that there are no overlapping pull-requests open
  • I have verified that I am following the existing coding patterns and practice as demonstrated in the repository.
  • I have provided test coverage for my change (where applicable)

Description

  • Add abstract ElevationModel class with GetZ and PopulateZ methods
  • Derive ConstElevationModel : ElevationModel
  • Make NetTopologySuite.Operation.OverlayNG.ElevationModel inherit from ElevationModel
  • Alter zGet, zGetOrInterpolate, zInterpolates of RobustLineIntersector from private static to protected virtual
  • Derive RobustLineIntersectorWithElevationModel from RobustLineIntersector, override the above methods to use ElevationModel.GetZ
  • Add ElevationModel to OverlayNG class and wire its usage
  • Add static LineIntersectorFactory class with LineIntersector CreateFor(ElevationModel) method and a property for the default ElevationModel to use. Wire its usage for OverlayNG

This is a proof of concept for discussion

@FObermaier
Copy link
Member Author

@bjornharrtell please review. Thanks

@bjornharrtell
Copy link
Contributor

bjornharrtell commented Jan 6, 2023

It looks like with this approach RobustLineIntersector still have interpolation logic that can't be opt out from logic that uses it directly. That would make it unusable for my original intention.

To make it possible to affect the interpolation all referencing logic would then need to use RobustLineIntersector from configurable injection... which is rather invasive (all noders, some algorithms, some operations).

... with LineIntersectorFactory.CreateFor(null);
@airbreather
Copy link
Member

I was going to review this, but after seeing the "unusable" comment above, I had stopped... and then I never saw that commit bc8e8f8 was added in response, because GMail had started sending all my GitHub notifications to spam right around that time (I only discovered this a couple of months ago).

I'll review it sometime this week, but it's a bigger one, so I need to block out some real time for it.

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.

None yet

3 participants