☰Read-only archive⌕
Looking for help with Bokeh?

This is a read-only archive. Ask questions and join the conversation on GitHub.

Visit Community Support on GitHub →
Archived discussions · Captured October 28, 2026

Geologic Cross Sections, Visualizing Contaminant Concentrations

Showcase
gmerritt123
gmerritt123

Directly relevant to this thread → How to update data of contour in CustomJS fun?

The idea was to interpolate contaminant concentrations to a regular mesh/point cloud (via kriging/rbf/idw/whatever). This mesh along with the interpolated values at each node get passed into the bokeh app. Then on user-click, interpolate the intersecting mesh elements onto the cross section view, then contour that result using d3’s tricontour. Finally, clip that result to the existing XS model domain (e.g. so no concentration contours are above ground surface). That last step was trickier than it seems, because there are no quality assurances from d3 tricontour output (self intersecting polygons, duplicate coordinates etc), which made coming up with a robust “clip line to polygon” algo super difficult/problematic.

Lots more to build on but pretty happy with the functionality this adds to my XS app!

XScontours2

⌁   Link to post
Bryan
Bryan

Really fantastic, thanks for sharing @gmerritt123 !

If you are able to share code, think an example that demonstrates using d3 features inside a CustomJS could be interesting to lots of people. (It’s doubtful we’d ever take a dependency directly on d3 but interop is always good to promote!)

⌁   Link to post

End of archived discussion · Replies are disabled