Mine Pit ImageryΒΆ

Triangulate a surface from a point cloud of points and overlay imagery of a mine pit.

Originally posted: https://github.com/pyvista/pyvista-support/issues/159

# sphinx_gallery_thumbnail_number = 2
import pyvista as pv
from pyvista import examples
import numpy as np
import xarray as xr
path, _ = examples.downloads._download_file("Sio020320.csv")

points = np.loadtxt(path, skiprows=1, delimiter=",")[:, 1:]
cloud = pv.PolyData(points)
# Plot the point cloud with a special rendering technique
cloud.plot(eye_dome_lighting=True)
mine pit

Out:

[(471874.76291628694, 1323843.264916287, 7328.0044162869435),
 (469790.549, 1321759.051, 5243.7905),
 (0.0, 0.0, 1.0)]

Triangulate the points

# This will take a minute
surf = cloud.delaunay_2d(progress_bar=True)

Out:

  0%|          [00:00<?]
Computing 2D Triangulation:   0%|          [00:00<?]
Computing 2D Triangulation:   0%|          [00:00<01:06]
Computing 2D Triangulation:   0%|          [00:00<00:56]
Computing 2D Triangulation:   1%|          [00:00<01:05]
Computing 2D Triangulation:   1%|          [00:00<01:11]
Computing 2D Triangulation:   1%|1         [00:00<01:17]
Computing 2D Triangulation:   1%|1         [00:00<01:23]
Computing 2D Triangulation:   1%|1         [00:01<01:30]
Computing 2D Triangulation:   2%|1         [00:01<01:36]
Computing 2D Triangulation:   2%|1         [00:01<01:43]
Computing 2D Triangulation:   2%|1         [00:01<01:50]
Computing 2D Triangulation:   2%|2         [00:02<02:00]
Computing 2D Triangulation:   2%|2         [00:02<02:05]
Computing 2D Triangulation:   2%|2         [00:02<02:10]
Computing 2D Triangulation:   3%|2         [00:02<02:15]
Computing 2D Triangulation:   3%|2         [00:02<02:19]
Computing 2D Triangulation:   3%|2         [00:03<02:23]
Computing 2D Triangulation:   3%|3         [00:03<02:27]
Computing 2D Triangulation:   3%|3         [00:03<02:32]
Computing 2D Triangulation:   3%|3         [00:04<02:39]
Computing 2D Triangulation:   4%|3         [00:04<02:44]
Computing 2D Triangulation:   4%|3         [00:04<02:47]
Computing 2D Triangulation:   4%|3         [00:04<02:50]
Computing 2D Triangulation:   4%|4         [00:05<02:53]
Computing 2D Triangulation:   4%|4         [00:05<02:56]
Computing 2D Triangulation:   4%|4         [00:05<02:59]
Computing 2D Triangulation:   5%|4         [00:06<03:02]
Computing 2D Triangulation:   5%|4         [00:06<03:06]
Computing 2D Triangulation:   5%|4         [00:06<03:10]
Computing 2D Triangulation:   5%|5         [00:07<03:16]
Computing 2D Triangulation:   5%|5         [00:07<03:17]
Computing 2D Triangulation:   5%|5         [00:08<03:19]
Computing 2D Triangulation:   6%|5         [00:08<03:23]
Computing 2D Triangulation:   6%|5         [00:08<03:26]
Computing 2D Triangulation:   6%|5         [00:09<03:28]
Computing 2D Triangulation:   6%|6         [00:09<03:32]
Computing 2D Triangulation:   6%|6         [00:09<03:34]
Computing 2D Triangulation:   6%|6         [00:10<03:42]
Computing 2D Triangulation:   7%|6         [00:10<03:50]
Computing 2D Triangulation:   7%|6         [00:11<03:53]
Computing 2D Triangulation:   7%|6         [00:11<03:53]
Computing 2D Triangulation:   7%|7         [00:12<03:55]
Computing 2D Triangulation:   7%|7         [00:12<04:00]
Computing 2D Triangulation:   7%|7         [00:12<04:02]
Computing 2D Triangulation:   8%|7         [00:13<04:02]
Computing 2D Triangulation:   8%|7         [00:13<04:03]
Computing 2D Triangulation:   8%|7         [00:14<04:06]
Computing 2D Triangulation:   8%|8         [00:14<04:11]
Computing 2D Triangulation:   8%|8         [00:15<04:17]
Computing 2D Triangulation:   8%|8         [00:15<04:20]
Computing 2D Triangulation:   9%|8         [00:16<04:20]
Computing 2D Triangulation:   9%|8         [00:16<04:22]
Computing 2D Triangulation:   9%|8         [00:17<04:29]
Computing 2D Triangulation:   9%|9         [00:17<04:33]
Computing 2D Triangulation:   9%|9         [00:18<04:30]
Computing 2D Triangulation:   9%|9         [00:18<04:28]
Computing 2D Triangulation:   9%|9         [00:19<04:28]
Computing 2D Triangulation:  10%|9         [00:19<04:28]
Computing 2D Triangulation:  10%|9         [00:20<04:30]
Computing 2D Triangulation:  10%|9         [00:20<04:34]
Computing 2D Triangulation:  10%|#         [00:21<04:36]
Computing 2D Triangulation:  10%|#         [00:21<04:38]
Computing 2D Triangulation:  10%|#         [00:22<04:38]
Computing 2D Triangulation:  11%|#         [00:22<04:42]
Computing 2D Triangulation:  11%|#         [00:23<04:44]
Computing 2D Triangulation:  11%|#         [00:23<04:49]
Computing 2D Triangulation:  11%|#1        [00:24<04:51]
Computing 2D Triangulation:  11%|#1        [00:24<04:50]
Computing 2D Triangulation:  11%|#1        [00:25<04:53]
Computing 2D Triangulation:  12%|#1        [00:25<04:53]
Computing 2D Triangulation:  12%|#1        [00:26<04:54]
Computing 2D Triangulation:  12%|#1        [00:27<04:55]
Computing 2D Triangulation:  12%|#2        [00:27<04:57]
Computing 2D Triangulation:  12%|#2        [00:28<05:00]
Computing 2D Triangulation:  12%|#2        [00:28<05:01]
Computing 2D Triangulation:  13%|#2        [00:29<05:03]
Computing 2D Triangulation:  13%|#2        [00:29<05:03]
Computing 2D Triangulation:  13%|#2        [00:30<05:05]
Computing 2D Triangulation:  13%|#3        [00:31<05:06]
Computing 2D Triangulation:  13%|#3        [00:31<05:06]
Computing 2D Triangulation:  13%|#3        [00:32<05:06]
Computing 2D Triangulation:  14%|#3        [00:32<05:10]
Computing 2D Triangulation:  14%|#3        [00:33<05:13]
Computing 2D Triangulation:  14%|#3        [00:34<05:17]
Computing 2D Triangulation:  14%|#4        [00:34<05:17]
Computing 2D Triangulation:  14%|#4        [00:35<05:16]
Computing 2D Triangulation:  14%|#4        [00:35<05:18]
Computing 2D Triangulation:  15%|#4        [00:36<05:18]
Computing 2D Triangulation:  15%|#4        [00:37<05:19]
Computing 2D Triangulation:  15%|#4        [00:37<05:20]
Computing 2D Triangulation:  15%|#5        [00:38<05:22]
Computing 2D Triangulation:  15%|#5        [00:39<05:22]
Computing 2D Triangulation:  15%|#5        [00:39<05:23]
Computing 2D Triangulation:  16%|#5        [00:40<05:23]
Computing 2D Triangulation:  16%|#5        [00:40<05:25]
Computing 2D Triangulation:  16%|#5        [00:41<05:28]
Computing 2D Triangulation:  16%|#6        [00:42<05:31]
Computing 2D Triangulation:  16%|#6        [00:42<05:31]
Computing 2D Triangulation:  16%|#6        [00:43<05:34]
Computing 2D Triangulation:  17%|#6        [00:44<05:36]
Computing 2D Triangulation:  17%|#6        [00:44<05:35]
Computing 2D Triangulation:  17%|#6        [00:45<05:37]
Computing 2D Triangulation:  17%|#7        [00:46<05:36]
Computing 2D Triangulation:  17%|#7        [00:46<05:37]
Computing 2D Triangulation:  17%|#7        [00:47<05:41]
Computing 2D Triangulation:  18%|#7        [00:48<05:39]
Computing 2D Triangulation:  18%|#7        [00:48<05:42]
Computing 2D Triangulation:  18%|#7        [00:49<05:41]
Computing 2D Triangulation:  18%|#8        [00:50<05:44]
Computing 2D Triangulation:  18%|#8        [00:51<05:43]
Computing 2D Triangulation:  18%|#8        [00:51<05:45]
Computing 2D Triangulation:  18%|#8        [00:52<05:44]
Computing 2D Triangulation:  19%|#8        [00:53<05:45]
Computing 2D Triangulation:  19%|#8        [00:53<05:49]
Computing 2D Triangulation:  19%|#8        [00:54<05:50]
Computing 2D Triangulation:  19%|#9        [00:55<05:49]
Computing 2D Triangulation:  19%|#9        [00:56<05:48]
Computing 2D Triangulation:  19%|#9        [00:56<05:48]
Computing 2D Triangulation:  20%|#9        [00:57<05:50]
Computing 2D Triangulation:  20%|#9        [00:58<05:48]
Computing 2D Triangulation:  20%|#9        [00:58<05:53]
Computing 2D Triangulation:  20%|##        [00:59<05:52]
Computing 2D Triangulation:  20%|##        [01:00<05:52]
Computing 2D Triangulation:  20%|##        [01:01<05:53]
Computing 2D Triangulation:  21%|##        [01:01<05:53]
Computing 2D Triangulation:  21%|##        [01:02<05:54]
Computing 2D Triangulation:  21%|##        [01:03<05:54]
Computing 2D Triangulation:  21%|##1       [01:04<05:56]
Computing 2D Triangulation:  21%|##1       [01:04<05:57]
Computing 2D Triangulation:  21%|##1       [01:05<05:55]
Computing 2D Triangulation:  22%|##1       [01:06<05:55]
Computing 2D Triangulation:  22%|##1       [01:07<05:57]
Computing 2D Triangulation:  22%|##1       [01:07<05:58]
Computing 2D Triangulation:  22%|##2       [01:08<05:57]
Computing 2D Triangulation:  22%|##2       [01:09<05:58]
Computing 2D Triangulation:  22%|##2       [01:10<05:56]
Computing 2D Triangulation:  23%|##2       [01:10<05:57]
Computing 2D Triangulation:  23%|##2       [01:11<05:56]
Computing 2D Triangulation:  23%|##2       [01:12<05:57]
Computing 2D Triangulation:  23%|##3       [01:13<05:59]
Computing 2D Triangulation:  23%|##3       [01:13<05:59]
Computing 2D Triangulation:  23%|##3       [01:14<06:02]
Computing 2D Triangulation:  24%|##3       [01:15<06:04]
Computing 2D Triangulation:  24%|##3       [01:16<06:01]
Computing 2D Triangulation:  24%|##3       [01:17<06:02]
Computing 2D Triangulation:  24%|##4       [01:17<06:01]
Computing 2D Triangulation:  24%|##4       [01:18<06:03]
Computing 2D Triangulation:  24%|##4       [01:19<06:04]
Computing 2D Triangulation:  25%|##4       [01:20<06:04]
Computing 2D Triangulation:  25%|##4       [01:21<06:06]
Computing 2D Triangulation:  25%|##4       [01:21<06:05]
Computing 2D Triangulation:  25%|##5       [01:22<06:04]
Computing 2D Triangulation:  25%|##5       [01:23<06:08]
Computing 2D Triangulation:  25%|##5       [01:24<06:06]
Computing 2D Triangulation:  26%|##5       [01:25<06:07]
Computing 2D Triangulation:  26%|##5       [01:25<06:06]
Computing 2D Triangulation:  26%|##5       [01:26<06:05]
Computing 2D Triangulation:  26%|##6       [01:27<06:05]
Computing 2D Triangulation:  26%|##6       [01:28<06:03]
Computing 2D Triangulation:  26%|##6       [01:29<06:03]
Computing 2D Triangulation:  27%|##6       [01:29<06:04]
Computing 2D Triangulation:  27%|##6       [01:30<06:04]
Computing 2D Triangulation:  27%|##6       [01:31<06:05]
Computing 2D Triangulation:  27%|##7       [01:32<06:07]
Computing 2D Triangulation:  27%|##7       [01:33<06:06]
Computing 2D Triangulation:  27%|##7       [01:34<06:06]
Computing 2D Triangulation:  27%|##7       [01:34<06:08]
Computing 2D Triangulation:  28%|##7       [01:35<06:07]
Computing 2D Triangulation:  28%|##7       [01:36<06:04]
Computing 2D Triangulation:  28%|##7       [01:37<06:03]
Computing 2D Triangulation:  28%|##8       [01:38<06:02]
Computing 2D Triangulation:  28%|##8       [01:39<06:00]
Computing 2D Triangulation:  28%|##8       [01:39<06:00]
Computing 2D Triangulation:  29%|##8       [01:40<06:01]
Computing 2D Triangulation:  29%|##8       [01:41<06:00]
Computing 2D Triangulation:  29%|##8       [01:42<05:59]
Computing 2D Triangulation:  29%|##9       [01:43<05:59]
Computing 2D Triangulation:  29%|##9       [01:44<05:59]
Computing 2D Triangulation:  29%|##9       [01:44<05:59]
Computing 2D Triangulation:  30%|##9       [01:45<06:00]
Computing 2D Triangulation:  30%|##9       [01:46<05:59]
Computing 2D Triangulation:  30%|##9       [01:47<05:58]
Computing 2D Triangulation:  30%|###       [01:48<05:57]
Computing 2D Triangulation:  30%|###       [01:49<05:56]
Computing 2D Triangulation:  30%|###       [01:49<05:57]
Computing 2D Triangulation:  31%|###       [01:50<05:56]
Computing 2D Triangulation:  31%|###       [01:51<05:54]
Computing 2D Triangulation:  31%|###       [01:52<05:50]
Computing 2D Triangulation:  31%|###1      [01:53<05:49]
Computing 2D Triangulation:  31%|###1      [01:54<05:49]
Computing 2D Triangulation:  31%|###1      [01:54<05:50]
Computing 2D Triangulation:  32%|###1      [01:55<05:53]
Computing 2D Triangulation:  32%|###1      [01:56<05:50]
Computing 2D Triangulation:  32%|###1      [01:57<05:49]
Computing 2D Triangulation:  32%|###2      [01:58<05:48]
Computing 2D Triangulation:  32%|###2      [01:59<05:49]
Computing 2D Triangulation:  32%|###2      [02:00<05:55]
Computing 2D Triangulation:  33%|###2      [02:00<05:56]
Computing 2D Triangulation:  33%|###2      [02:01<05:53]
Computing 2D Triangulation:  33%|###2      [02:02<05:52]
Computing 2D Triangulation:  33%|###3      [02:03<05:50]
Computing 2D Triangulation:  33%|###3      [02:04<05:46]
Computing 2D Triangulation:  33%|###3      [02:05<05:46]
Computing 2D Triangulation:  34%|###3      [02:06<05:47]
Computing 2D Triangulation:  34%|###3      [02:06<05:47]
Computing 2D Triangulation:  34%|###3      [02:07<05:45]
Computing 2D Triangulation:  34%|###4      [02:08<05:43]
Computing 2D Triangulation:  34%|###4      [02:09<05:41]
Computing 2D Triangulation:  34%|###4      [02:10<05:40]
Computing 2D Triangulation:  35%|###4      [02:11<05:43]
Computing 2D Triangulation:  35%|###4      [02:12<05:46]
Computing 2D Triangulation:  35%|###4      [02:12<05:42]
Computing 2D Triangulation:  35%|###5      [02:13<05:42]
Computing 2D Triangulation:  35%|###5      [02:14<05:42]
Computing 2D Triangulation:  35%|###5      [02:15<05:39]
Computing 2D Triangulation:  36%|###5      [02:16<05:40]
Computing 2D Triangulation:  36%|###5      [02:17<05:38]
Computing 2D Triangulation:  36%|###5      [02:18<05:37]
Computing 2D Triangulation:  36%|###6      [02:18<05:37]
Computing 2D Triangulation:  36%|###6      [02:19<05:36]
Computing 2D Triangulation:  36%|###6      [02:20<05:38]
Computing 2D Triangulation:  37%|###6      [02:21<05:45]
Computing 2D Triangulation:  37%|###6      [02:22<05:50]
Computing 2D Triangulation:  37%|###6      [02:23<05:46]
Computing 2D Triangulation:  37%|###6      [02:24<05:43]
Computing 2D Triangulation:  37%|###7      [02:25<05:44]
Computing 2D Triangulation:  37%|###7      [02:26<05:44]
Computing 2D Triangulation:  37%|###7      [02:27<05:47]
Computing 2D Triangulation:  38%|###7      [02:28<05:51]
Computing 2D Triangulation:  38%|###7      [02:28<05:48]
Computing 2D Triangulation:  38%|###7      [02:29<05:49]
Computing 2D Triangulation:  38%|###8      [02:30<05:51]
Computing 2D Triangulation:  38%|###8      [02:31<05:46]
Computing 2D Triangulation:  38%|###8      [02:32<05:49]
Computing 2D Triangulation:  39%|###8      [02:33<05:47]
Computing 2D Triangulation:  39%|###8      [02:34<05:44]
Computing 2D Triangulation:  39%|###8      [02:35<05:41]
Computing 2D Triangulation:  39%|###9      [02:36<05:38]
Computing 2D Triangulation:  39%|###9      [02:37<05:40]
Computing 2D Triangulation:  39%|###9      [02:38<05:37]
Computing 2D Triangulation:  40%|###9      [02:39<05:37]
Computing 2D Triangulation:  40%|###9      [02:39<05:37]
Computing 2D Triangulation:  40%|###9      [02:40<05:36]
Computing 2D Triangulation:  40%|####      [02:41<05:31]
Computing 2D Triangulation:  40%|####      [02:42<05:33]
Computing 2D Triangulation:  40%|####      [02:43<05:31]
Computing 2D Triangulation:  41%|####      [02:44<05:29]
Computing 2D Triangulation:  41%|####      [02:45<05:28]
Computing 2D Triangulation:  41%|####      [02:46<05:27]
Computing 2D Triangulation:  41%|####1     [02:47<05:29]
Computing 2D Triangulation:  41%|####1     [02:48<05:32]
Computing 2D Triangulation:  41%|####1     [02:49<05:31]
Computing 2D Triangulation:  42%|####1     [02:50<05:28]
Computing 2D Triangulation:  42%|####1     [02:50<05:27]
Computing 2D Triangulation:  42%|####1     [02:51<05:24]
Computing 2D Triangulation:  42%|####2     [02:52<05:24]
Computing 2D Triangulation:  42%|####2     [02:53<05:23]
Computing 2D Triangulation:  42%|####2     [02:54<05:22]
Computing 2D Triangulation:  43%|####2     [02:55<05:23]
Computing 2D Triangulation:  43%|####2     [02:56<05:23]
Computing 2D Triangulation:  43%|####2     [02:57<05:21]
Computing 2D Triangulation:  43%|####3     [02:58<05:22]
Computing 2D Triangulation:  43%|####3     [02:59<05:22]
Computing 2D Triangulation:  43%|####3     [03:00<05:24]
Computing 2D Triangulation:  44%|####3     [03:01<05:24]
Computing 2D Triangulation:  44%|####3     [03:02<05:21]
Computing 2D Triangulation:  44%|####3     [03:03<05:22]
Computing 2D Triangulation:  44%|####4     [03:04<05:24]
Computing 2D Triangulation:  44%|####4     [03:04<05:20]
Computing 2D Triangulation:  44%|####4     [03:05<05:17]
Computing 2D Triangulation:  45%|####4     [03:06<05:16]
Computing 2D Triangulation:  45%|####4     [03:07<05:16]
Computing 2D Triangulation:  45%|####4     [03:08<05:17]
Computing 2D Triangulation:  45%|####5     [03:09<05:17]
Computing 2D Triangulation:  45%|####5     [03:10<05:13]
Computing 2D Triangulation:  45%|####5     [03:11<05:12]
Computing 2D Triangulation:  46%|####5     [03:12<05:12]
Computing 2D Triangulation:  46%|####5     [03:13<05:14]
Computing 2D Triangulation:  46%|####5     [03:14<05:13]
Computing 2D Triangulation:  46%|####5     [03:15<05:11]
Computing 2D Triangulation:  46%|####6     [03:16<05:11]
Computing 2D Triangulation:  46%|####6     [03:17<05:08]
Computing 2D Triangulation:  46%|####6     [03:18<05:07]
Computing 2D Triangulation:  47%|####6     [03:19<05:07]
Computing 2D Triangulation:  47%|####6     [03:20<05:08]
Computing 2D Triangulation:  47%|####6     [03:20<05:10]
Computing 2D Triangulation:  47%|####7     [03:21<05:10]
Computing 2D Triangulation:  47%|####7     [03:22<05:06]
Computing 2D Triangulation:  47%|####7     [03:23<05:06]
Computing 2D Triangulation:  48%|####7     [03:24<05:07]
Computing 2D Triangulation:  48%|####7     [03:25<05:09]
Computing 2D Triangulation:  48%|####7     [03:26<05:06]
Computing 2D Triangulation:  48%|####8     [03:27<05:04]
Computing 2D Triangulation:  48%|####8     [03:28<05:04]
Computing 2D Triangulation:  48%|####8     [03:29<05:04]
Computing 2D Triangulation:  49%|####8     [03:30<05:06]
Computing 2D Triangulation:  49%|####8     [03:31<05:09]
Computing 2D Triangulation:  49%|####8     [03:32<05:09]
Computing 2D Triangulation:  49%|####9     [03:33<05:05]
Computing 2D Triangulation:  49%|####9     [03:34<05:04]
Computing 2D Triangulation:  49%|####9     [03:35<05:01]
Computing 2D Triangulation:  50%|####9     [03:36<05:00]
Computing 2D Triangulation:  50%|####9     [03:37<04:59]
Computing 2D Triangulation:  50%|####9     [03:38<04:58]
Computing 2D Triangulation:  50%|#####     [03:39<04:57]
Computing 2D Triangulation:  50%|#####     [03:40<04:55]
Computing 2D Triangulation:  50%|#####     [03:41<04:54]
Computing 2D Triangulation:  51%|#####     [03:42<04:52]
Computing 2D Triangulation:  51%|#####     [03:43<04:51]
Computing 2D Triangulation:  51%|#####     [03:44<04:52]
Computing 2D Triangulation:  51%|#####1    [03:45<04:51]
Computing 2D Triangulation:  51%|#####1    [03:46<04:51]
Computing 2D Triangulation:  51%|#####1    [03:47<04:50]
Computing 2D Triangulation:  52%|#####1    [03:48<04:49]
Computing 2D Triangulation:  52%|#####1    [03:49<04:48]
Computing 2D Triangulation:  52%|#####1    [03:50<04:48]
Computing 2D Triangulation:  52%|#####2    [03:51<04:47]
Computing 2D Triangulation:  52%|#####2    [03:52<04:47]
Computing 2D Triangulation:  52%|#####2    [03:53<04:46]
Computing 2D Triangulation:  53%|#####2    [03:54<04:44]
Computing 2D Triangulation:  53%|#####2    [03:55<04:45]
Computing 2D Triangulation:  53%|#####2    [03:56<04:45]
Computing 2D Triangulation:  53%|#####3    [03:57<04:45]
Computing 2D Triangulation:  53%|#####3    [03:58<04:43]
Computing 2D Triangulation:  53%|#####3    [03:59<04:41]
Computing 2D Triangulation:  54%|#####3    [04:00<04:42]
Computing 2D Triangulation:  54%|#####3    [04:01<04:41]
Computing 2D Triangulation:  54%|#####3    [04:02<04:41]
Computing 2D Triangulation:  54%|#####4    [04:03<04:40]
Computing 2D Triangulation:  54%|#####4    [04:04<04:39]
Computing 2D Triangulation:  54%|#####4    [04:05<04:40]
Computing 2D Triangulation:  55%|#####4    [04:06<04:38]
Computing 2D Triangulation:  55%|#####4    [04:07<04:37]
Computing 2D Triangulation:  55%|#####4    [04:08<04:37]
Computing 2D Triangulation:  55%|#####4    [04:09<04:35]
Computing 2D Triangulation:  55%|#####5    [04:10<04:35]
Computing 2D Triangulation:  55%|#####5    [04:11<04:33]
Computing 2D Triangulation:  55%|#####5    [04:12<04:31]
Computing 2D Triangulation:  56%|#####5    [04:13<04:32]
Computing 2D Triangulation:  56%|#####5    [04:14<04:29]
Computing 2D Triangulation:  56%|#####5    [04:15<04:29]
Computing 2D Triangulation:  56%|#####6    [04:16<04:29]
Computing 2D Triangulation:  56%|#####6    [04:17<04:28]
Computing 2D Triangulation:  56%|#####6    [04:18<04:28]
Computing 2D Triangulation:  57%|#####6    [04:19<04:29]
Computing 2D Triangulation:  57%|#####6    [04:20<04:26]
Computing 2D Triangulation:  57%|#####6    [04:21<04:27]
Computing 2D Triangulation:  57%|#####7    [04:22<04:25]
Computing 2D Triangulation:  57%|#####7    [04:23<04:25]
Computing 2D Triangulation:  57%|#####7    [04:24<04:23]
Computing 2D Triangulation:  58%|#####7    [04:25<04:22]
Computing 2D Triangulation:  58%|#####7    [04:26<04:22]
Computing 2D Triangulation:  58%|#####7    [04:27<04:21]
Computing 2D Triangulation:  58%|#####8    [04:28<04:21]
Computing 2D Triangulation:  58%|#####8    [04:29<04:19]
Computing 2D Triangulation:  58%|#####8    [04:30<04:16]
Computing 2D Triangulation:  59%|#####8    [04:31<04:17]
Computing 2D Triangulation:  59%|#####8    [04:32<04:16]
Computing 2D Triangulation:  59%|#####8    [04:33<04:15]
Computing 2D Triangulation:  59%|#####9    [04:34<04:15]
Computing 2D Triangulation:  59%|#####9    [04:35<04:15]
Computing 2D Triangulation:  59%|#####9    [04:36<04:15]
Computing 2D Triangulation:  60%|#####9    [04:37<04:13]
Computing 2D Triangulation:  60%|#####9    [04:38<04:13]
Computing 2D Triangulation:  60%|#####9    [04:39<04:13]
Computing 2D Triangulation:  60%|######    [04:40<04:10]
Computing 2D Triangulation:  60%|######    [04:41<04:09]
Computing 2D Triangulation:  60%|######    [04:42<04:08]
Computing 2D Triangulation:  61%|######    [04:43<04:08]
Computing 2D Triangulation:  61%|######    [04:44<04:08]
Computing 2D Triangulation:  61%|######    [04:45<04:05]
Computing 2D Triangulation:  61%|######1   [04:46<04:08]
Computing 2D Triangulation:  61%|######1   [04:47<04:05]
Computing 2D Triangulation:  61%|######1   [04:48<04:02]
Computing 2D Triangulation:  62%|######1   [04:50<04:02]
Computing 2D Triangulation:  62%|######1   [04:51<04:00]
Computing 2D Triangulation:  62%|######1   [04:52<04:01]
Computing 2D Triangulation:  62%|######2   [04:53<03:58]
Computing 2D Triangulation:  62%|######2   [04:54<03:58]
Computing 2D Triangulation:  62%|######2   [04:55<03:58]
Computing 2D Triangulation:  63%|######2   [04:56<03:58]
Computing 2D Triangulation:  63%|######2   [04:57<03:57]
Computing 2D Triangulation:  63%|######2   [04:58<03:55]
Computing 2D Triangulation:  63%|######3   [04:59<03:53]
Computing 2D Triangulation:  63%|######3   [05:00<03:56]
Computing 2D Triangulation:  63%|######3   [05:01<03:57]
Computing 2D Triangulation:  64%|######3   [05:02<03:59]
Computing 2D Triangulation:  64%|######3   [05:03<03:57]
Computing 2D Triangulation:  64%|######3   [05:04<03:55]
Computing 2D Triangulation:  64%|######4   [05:05<03:54]
Computing 2D Triangulation:  64%|######4   [05:06<03:52]
Computing 2D Triangulation:  64%|######4   [05:07<03:52]
Computing 2D Triangulation:  64%|######4   [05:08<03:50]
Computing 2D Triangulation:  65%|######4   [05:10<03:48]
Computing 2D Triangulation:  65%|######4   [05:11<03:46]
Computing 2D Triangulation:  65%|######4   [05:12<03:45]
Computing 2D Triangulation:  65%|######5   [05:13<03:43]
Computing 2D Triangulation:  65%|######5   [05:14<03:41]
Computing 2D Triangulation:  65%|######5   [05:15<03:42]
Computing 2D Triangulation:  66%|######5   [05:16<03:41]
Computing 2D Triangulation:  66%|######5   [05:17<03:42]
Computing 2D Triangulation:  66%|######5   [05:18<03:40]
Computing 2D Triangulation:  66%|######6   [05:19<03:39]
Computing 2D Triangulation:  66%|######6   [05:20<03:40]
Computing 2D Triangulation:  66%|######6   [05:21<03:39]
Computing 2D Triangulation:  67%|######6   [05:22<03:37]
Computing 2D Triangulation:  67%|######6   [05:23<03:37]
Computing 2D Triangulation:  67%|######6   [05:24<03:35]
Computing 2D Triangulation:  67%|######7   [05:25<03:34]
Computing 2D Triangulation:  67%|######7   [05:27<03:35]
Computing 2D Triangulation:  67%|######7   [05:28<03:35]
Computing 2D Triangulation:  68%|######7   [05:29<03:31]
Computing 2D Triangulation:  68%|######7   [05:30<03:29]
Computing 2D Triangulation:  68%|######7   [05:31<03:28]
Computing 2D Triangulation:  68%|######8   [05:32<03:28]
Computing 2D Triangulation:  68%|######8   [05:33<03:29]
Computing 2D Triangulation:  68%|######8   [05:34<03:27]
Computing 2D Triangulation:  69%|######8   [05:35<03:24]
Computing 2D Triangulation:  69%|######8   [05:36<03:22]
Computing 2D Triangulation:  69%|######8   [05:37<03:23]
Computing 2D Triangulation:  69%|######9   [05:38<03:21]
Computing 2D Triangulation:  69%|######9   [05:39<03:19]
Computing 2D Triangulation:  69%|######9   [05:40<03:17]
Computing 2D Triangulation:  70%|######9   [05:41<03:16]
Computing 2D Triangulation:  70%|######9   [05:43<03:16]
Computing 2D Triangulation:  70%|######9   [05:44<03:16]
Computing 2D Triangulation:  70%|#######   [05:45<03:15]
Computing 2D Triangulation:  70%|#######   [05:46<03:13]
Computing 2D Triangulation:  70%|#######   [05:47<03:12]
Computing 2D Triangulation:  71%|#######   [05:48<03:14]
Computing 2D Triangulation:  71%|#######   [05:49<03:12]
Computing 2D Triangulation:  71%|#######   [05:50<03:11]
Computing 2D Triangulation:  71%|#######1  [05:51<03:10]
Computing 2D Triangulation:  71%|#######1  [05:52<03:08]
Computing 2D Triangulation:  71%|#######1  [05:53<03:09]
Computing 2D Triangulation:  72%|#######1  [05:54<03:07]
Computing 2D Triangulation:  72%|#######1  [05:55<03:06]
Computing 2D Triangulation:  72%|#######1  [05:57<03:07]
Computing 2D Triangulation:  72%|#######2  [05:58<03:04]
Computing 2D Triangulation:  72%|#######2  [05:59<03:04]
Computing 2D Triangulation:  72%|#######2  [06:00<03:02]
Computing 2D Triangulation:  73%|#######2  [06:01<03:01]
Computing 2D Triangulation:  73%|#######2  [06:02<03:00]
Computing 2D Triangulation:  73%|#######2  [06:03<03:00]
Computing 2D Triangulation:  73%|#######3  [06:04<03:01]
Computing 2D Triangulation:  73%|#######3  [06:05<02:58]
Computing 2D Triangulation:  73%|#######3  [06:06<02:56]
Computing 2D Triangulation:  73%|#######3  [06:07<02:55]
Computing 2D Triangulation:  74%|#######3  [06:09<02:54]
Computing 2D Triangulation:  74%|#######3  [06:10<02:53]
Computing 2D Triangulation:  74%|#######3  [06:11<02:51]
Computing 2D Triangulation:  74%|#######4  [06:12<02:51]
Computing 2D Triangulation:  74%|#######4  [06:13<02:48]
Computing 2D Triangulation:  74%|#######4  [06:14<02:48]
Computing 2D Triangulation:  75%|#######4  [06:15<02:47]
Computing 2D Triangulation:  75%|#######4  [06:16<02:45]
Computing 2D Triangulation:  75%|#######4  [06:17<02:44]
Computing 2D Triangulation:  75%|#######5  [06:18<02:43]
Computing 2D Triangulation:  75%|#######5  [06:19<02:43]
Computing 2D Triangulation:  75%|#######5  [06:20<02:44]
Computing 2D Triangulation:  76%|#######5  [06:22<02:43]
Computing 2D Triangulation:  76%|#######5  [06:23<02:41]
Computing 2D Triangulation:  76%|#######5  [06:24<02:40]
Computing 2D Triangulation:  76%|#######6  [06:25<02:40]
Computing 2D Triangulation:  76%|#######6  [06:26<02:39]
Computing 2D Triangulation:  76%|#######6  [06:27<02:38]
Computing 2D Triangulation:  77%|#######6  [06:28<02:36]
Computing 2D Triangulation:  77%|#######6  [06:29<02:35]
Computing 2D Triangulation:  77%|#######6  [06:30<02:34]
Computing 2D Triangulation:  77%|#######7  [06:31<02:34]
Computing 2D Triangulation:  77%|#######7  [06:33<02:33]
Computing 2D Triangulation:  77%|#######7  [06:34<02:31]
Computing 2D Triangulation:  78%|#######7  [06:35<02:31]
Computing 2D Triangulation:  78%|#######7  [06:36<02:30]
Computing 2D Triangulation:  78%|#######7  [06:37<02:30]
Computing 2D Triangulation:  78%|#######8  [06:38<02:29]
Computing 2D Triangulation:  78%|#######8  [06:39<02:27]
Computing 2D Triangulation:  78%|#######8  [06:40<02:28]
Computing 2D Triangulation:  79%|#######8  [06:41<02:27]
Computing 2D Triangulation:  79%|#######8  [06:43<02:26]
Computing 2D Triangulation:  79%|#######8  [06:44<02:24]
Computing 2D Triangulation:  79%|#######9  [06:45<02:24]
Computing 2D Triangulation:  79%|#######9  [06:46<02:23]
Computing 2D Triangulation:  79%|#######9  [06:47<02:22]
Computing 2D Triangulation:  80%|#######9  [06:48<02:21]
Computing 2D Triangulation:  80%|#######9  [06:49<02:20]
Computing 2D Triangulation:  80%|#######9  [06:51<02:19]
Computing 2D Triangulation:  80%|########  [06:52<02:19]
Computing 2D Triangulation:  80%|########  [06:53<02:17]
Computing 2D Triangulation:  80%|########  [06:54<02:16]
Computing 2D Triangulation:  81%|########  [06:55<02:17]
Computing 2D Triangulation:  81%|########  [06:56<02:17]
Computing 2D Triangulation:  81%|########  [06:58<02:18]
Computing 2D Triangulation:  81%|########1 [06:59<02:16]
Computing 2D Triangulation:  81%|########1 [07:00<02:19]
Computing 2D Triangulation:  81%|########1 [07:01<02:18]
Computing 2D Triangulation:  82%|########1 [07:02<02:16]
Computing 2D Triangulation:  82%|########1 [07:04<02:13]
Computing 2D Triangulation:  82%|########1 [07:05<02:11]
Computing 2D Triangulation:  82%|########2 [07:06<02:10]
Computing 2D Triangulation:  82%|########2 [07:07<02:09]
Computing 2D Triangulation:  82%|########2 [07:08<02:08]
Computing 2D Triangulation:  82%|########2 [07:10<02:07]
Computing 2D Triangulation:  83%|########2 [07:11<02:07]
Computing 2D Triangulation:  83%|########2 [07:12<02:05]
Computing 2D Triangulation:  83%|########2 [07:13<02:04]
Computing 2D Triangulation:  83%|########3 [07:14<02:02]
Computing 2D Triangulation:  83%|########3 [07:16<02:00]
Computing 2D Triangulation:  83%|########3 [07:17<01:59]
Computing 2D Triangulation:  84%|########3 [07:18<01:58]
Computing 2D Triangulation:  84%|########3 [07:19<01:57]
Computing 2D Triangulation:  84%|########3 [07:20<01:55]
Computing 2D Triangulation:  84%|########4 [07:21<01:55]
Computing 2D Triangulation:  84%|########4 [07:23<01:54]
Computing 2D Triangulation:  84%|########4 [07:24<01:52]
Computing 2D Triangulation:  85%|########4 [07:25<01:50]
Computing 2D Triangulation:  85%|########4 [07:26<01:50]
Computing 2D Triangulation:  85%|########4 [07:27<01:49]
Computing 2D Triangulation:  85%|########5 [07:29<01:48]
Computing 2D Triangulation:  85%|########5 [07:30<01:46]
Computing 2D Triangulation:  85%|########5 [07:31<01:45]
Computing 2D Triangulation:  86%|########5 [07:32<01:44]
Computing 2D Triangulation:  86%|########5 [07:33<01:43]
Computing 2D Triangulation:  86%|########5 [07:35<01:42]
Computing 2D Triangulation:  86%|########6 [07:36<01:42]
Computing 2D Triangulation:  86%|########6 [07:37<01:41]
Computing 2D Triangulation:  86%|########6 [07:38<01:41]
Computing 2D Triangulation:  87%|########6 [07:39<01:39]
Computing 2D Triangulation:  87%|########6 [07:41<01:38]
Computing 2D Triangulation:  87%|########6 [07:42<01:37]
Computing 2D Triangulation:  87%|########7 [07:43<01:35]
Computing 2D Triangulation:  87%|########7 [07:44<01:35]
Computing 2D Triangulation:  87%|########7 [07:46<01:33]
Computing 2D Triangulation:  88%|########7 [07:47<01:33]
Computing 2D Triangulation:  88%|########7 [07:48<01:32]
Computing 2D Triangulation:  88%|########7 [07:49<01:31]
Computing 2D Triangulation:  88%|########8 [07:51<01:30]
Computing 2D Triangulation:  88%|########8 [07:52<01:29]
Computing 2D Triangulation:  88%|########8 [07:53<01:28]
Computing 2D Triangulation:  89%|########8 [07:54<01:26]
Computing 2D Triangulation:  89%|########8 [07:56<01:26]
Computing 2D Triangulation:  89%|########8 [07:57<01:25]
Computing 2D Triangulation:  89%|########9 [07:58<01:24]
Computing 2D Triangulation:  89%|########9 [07:59<01:23]
Computing 2D Triangulation:  89%|########9 [08:01<01:21]
Computing 2D Triangulation:  90%|########9 [08:02<01:20]
Computing 2D Triangulation:  90%|########9 [08:03<01:19]
Computing 2D Triangulation:  90%|########9 [08:04<01:19]
Computing 2D Triangulation:  90%|######### [08:06<01:17]
Computing 2D Triangulation:  90%|######### [08:07<01:16]
Computing 2D Triangulation:  90%|######### [08:08<01:15]
Computing 2D Triangulation:  91%|######### [08:10<01:14]
Computing 2D Triangulation:  91%|######### [08:11<01:12]
Computing 2D Triangulation:  91%|######### [08:12<01:11]
Computing 2D Triangulation:  91%|#########1[08:13<01:10]
Computing 2D Triangulation:  91%|#########1[08:15<01:08]
Computing 2D Triangulation:  91%|#########1[08:16<01:07]
Computing 2D Triangulation:  92%|#########1[08:17<01:06]
Computing 2D Triangulation:  92%|#########1[08:19<01:05]
Computing 2D Triangulation:  92%|#########1[08:20<01:04]
Computing 2D Triangulation:  92%|#########1[08:21<01:03]
Computing 2D Triangulation:  92%|#########2[08:22<01:02]
Computing 2D Triangulation:  92%|#########2[08:24<01:01]
Computing 2D Triangulation:  92%|#########2[08:25<00:59]
Computing 2D Triangulation:  93%|#########2[08:26<00:58]
Computing 2D Triangulation:  93%|#########2[08:28<00:57]
Computing 2D Triangulation:  93%|#########2[08:29<00:56]
Computing 2D Triangulation:  93%|#########3[08:30<00:55]
Computing 2D Triangulation:  93%|#########3[08:32<00:54]
Computing 2D Triangulation:  93%|#########3[08:33<00:53]
Computing 2D Triangulation:  94%|#########3[08:34<00:52]
Computing 2D Triangulation:  94%|#########3[08:36<00:50]
Computing 2D Triangulation:  94%|#########3[08:37<00:49]
Computing 2D Triangulation:  94%|#########4[08:39<00:48]
Computing 2D Triangulation:  94%|#########4[08:40<00:47]
Computing 2D Triangulation:  94%|#########4[08:41<00:45]
Computing 2D Triangulation:  95%|#########4[08:43<00:44]
Computing 2D Triangulation:  95%|#########4[08:44<00:43]
Computing 2D Triangulation:  95%|#########4[08:45<00:42]
Computing 2D Triangulation:  95%|#########5[08:47<00:41]
Computing 2D Triangulation:  95%|#########5[08:48<00:40]
Computing 2D Triangulation:  95%|#########5[08:50<00:38]
Computing 2D Triangulation:  96%|#########5[08:51<00:37]
Computing 2D Triangulation:  96%|#########5[08:52<00:36]
Computing 2D Triangulation:  96%|#########5[08:54<00:35]
Computing 2D Triangulation:  96%|#########6[08:55<00:33]
Computing 2D Triangulation:  96%|#########6[08:57<00:32]
Computing 2D Triangulation:  96%|#########6[08:58<00:31]
Computing 2D Triangulation:  97%|#########6[09:00<00:29]
Computing 2D Triangulation:  97%|#########6[09:01<00:28]
Computing 2D Triangulation:  97%|#########6[09:02<00:27]
Computing 2D Triangulation:  97%|#########7[09:04<00:25]
Computing 2D Triangulation:  97%|#########7[09:05<00:24]
Computing 2D Triangulation:  97%|#########7[09:07<00:22]
Computing 2D Triangulation:  98%|#########7[09:08<00:21]
Computing 2D Triangulation:  98%|#########7[09:10<00:20]
Computing 2D Triangulation:  98%|#########7[09:11<00:18]
Computing 2D Triangulation:  98%|#########8[09:13<00:17]
Computing 2D Triangulation:  98%|#########8[09:14<00:16]
Computing 2D Triangulation:  98%|#########8[09:16<00:14]
Computing 2D Triangulation:  99%|#########8[09:17<00:13]
Computing 2D Triangulation:  99%|#########8[09:19<00:11]
Computing 2D Triangulation:  99%|#########8[09:20<00:10]
Computing 2D Triangulation:  99%|#########9[09:22<00:08]
Computing 2D Triangulation:  99%|#########9[09:23<00:07]
Computing 2D Triangulation:  99%|#########9[09:25<00:05]
Computing 2D Triangulation: 100%|#########9[09:26<00:04]
Computing 2D Triangulation: 100%|#########9[09:28<00:02]
Computing 2D Triangulation: 100%|#########9[09:29<00:01]
Computing 2D Triangulation: 100%|##########[09:31<00:00]
Computing 2D Triangulation: 100%|##########[09:31<00:00]
Computing 2D Triangulation: 100%|##########[09:31<00:00]

Open the GeoTIFF

url = "https://dl.dropbox.com/s/pqgme8qsl95u9un/Sio020320_transparent_mosaic_group1.tif?dl=0"
path, _ = examples.downloads._retrieve_file(
    url, "Sio020320_transparent_mosaic_group1.tif.csv"
)
ds = xr.open_rasterio(path)

# Fetch the texture as an image
image = np.moveaxis(ds.values, 0, -1)

# Create the ground control points for texture mapping
o = ds.x.min(), ds.y.min(), 0.0  # Bottom Left
u = ds.x.max(), ds.y.min(), 0.0  # Bottom Right
v = ds.x.min(), ds.y.max(), 0.0  # Lop left
# Note: Z-coordinate doesn't matter

Use the GCPs to map the tex coords

mapped_surf = surf.texture_map_to_plane(o, u, v)

# Associate the texture with the mapped mesh
mapped_surf.textures["aerial"] = pv.numpy_to_texture(image)

Plot it up in 3D and enjoy!

cpos = [
    (469735.37431312964, 1321523.2987377762, 5242.9129552423465),
    (469928.4268006842, 1321916.1316302174, 5171.6505267522025),
    (0.08372003361058433, 0.13788753708579846, 0.986903228836878),
]
mapped_surf.plot(texture="aerial", cpos=cpos)
mine pit

Out:

[(469735.37431312964, 1321523.2987377762, 5242.9129552423465),
 (469928.4268006842, 1321916.1316302174, 5171.6505267522025),
 (0.08372003361058433, 0.13788753708579846, 0.986903228836878)]

Total running time of the script: ( 9 minutes 53.144 seconds)

Gallery generated by Sphinx-Gallery