Note

Go to the end to download the full example code

# Mine Pit Imagery

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

Originally posted: pyvista/pyvista-support#159

```
# sphinx_gallery_thumbnail_number = 2
import numpy as np
import pooch
import pyvista as pv
import rioxarray
```

```
url = "https://raw.githubusercontent.com/pyvista/vtk-data/master/Data/Sio020320.csv"
file_path = pooch.retrieve(url=url, known_hash=None)
points = np.loadtxt(file_path, skiprows=1, delimiter=",")[:, 1:]
cloud = pv.PolyData(points)
# Plot the point cloud with a special rendering technique
cloud.plot(eye_dome_lighting=True)
```

Triangulate the points

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

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

Open the GeoTIFF

```
url = "https://dl.dropbox.com/s/pqgme8qsl95u9un/Sio020320_transparent_mosaic_group1.tif?dl=0"
path = pooch.retrieve(url=url, known_hash=None)
ds = rioxarray.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)
```

```
/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/pyvista/core/dataset.py:516: PyVistaDeprecationWarning: Texture tracking on datasets is deprecated and will be removed in a future version of PyVista.
warnings.warn(
```

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)
```

```
/opt/hostedtoolcache/Python/3.8.17/x64/lib/python3.8/site-packages/pyvista/core/dataset.py:556: PyVistaDeprecationWarning: Texture tracking on datasets is deprecated and will be removed in a future version of PyVista.
warnings.warn(
```

**Total running time of the script:** ( 1 minutes 23.695 seconds)