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

Limit contours to a maximum radius from topo point #58

Open
gdt opened this issue Sep 20, 2024 · 2 comments
Open

Limit contours to a maximum radius from topo point #58

gdt opened this issue Sep 20, 2024 · 2 comments

Comments

@gdt
Copy link

gdt commented Sep 20, 2024

When one's data is irregular, the plugin will draw contours in all regions which are between topo points, even if that is not sensible. An example is a set of points every 4m or so along a driveway, on both edges. The result mostly makes sense, but in one particular case, given a gentle curve, there is a crescent-shaped area about 50m long and about 10m wide, and contours are drawn in it. I realize everyone's density and desires are different, but I'd like to see a "max radius" setting, that I could set to say 10m, meaning do not try to do anything in areas that are > 10m from a topo point. The plugin seems to not go outside a convex hull. I'm basically suggesting the max length of line to be considered for convexity, sort of like the enclosed bay rule in maritime boundaries.

On the other hand, interpolation between the driveway edge and topo points from a single line more or less 10m away look reasonable even if they are oblivious to actual intermediate heights. (Obviously I need more points, but this issue is about reasonable output with not enough data.)

One suggestion, offered without a lot of thought, is to have a setting for the max distance between points that a TIN edge will be drawn, on the theory that believing anything about what's in between doesn't make sense. The other is not to generate contour line points outside of a buffer from the topo points. I don't think it matters much - whichever is easier.

This is not really the same as #56, which is about "don't draw lines in buildings" rather than "hallucinate a bit less".

@ccrook
Copy link
Owner

ccrook commented Sep 22, 2024

Hi Greg. The underlying contouring function comes from matplotlib, which as far as I know doesn't support exactly what you are asking for. There are some capabilities retlated to this in https://matplotlib.org/stable/api/tri_api.html#matplotlib.tri.TriAnalyzer, or possibly some of the other tools related to Triangulation on that page.

Otherwise the only option I can see is to intersect the triangulation with a polygon, for example the union of filled circles of a user specified radius centred on each data point. Though this may be a messy polygon and slow to generate any moderate sized data set (lots of near tangential intersections). Possibly just intersecting with a user specified polygon may be more appropriate. I imagine that either of these approaches can be configured using the QGIS processing toolbox.

It may be worth you taking your x,y,z dataset and playing with the matplotlib functions to see if you can find a way to generate contours that are meeting your requirements, and if that can be done in a generalised way then maybe it could be added to the plugin...

@gdt
Copy link
Author

gdt commented Sep 22, 2024

Thanks for the comment and pointer. I will attempt to understand this better and read the code, and in parallel also capture more topo points. Understood about intersecting the output. I think it would be nice to leave this open as hints to others, but I can see that you might find it clutter. Your repo, your call of course.

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

No branches or pull requests

2 participants