|
113 | 113 | "cell_type": "code",
|
114 | 114 | "execution_count": 2,
|
115 | 115 | "metadata": {},
|
116 |
| - "outputs": [], |
| 116 | + "outputs": [ |
| 117 | + { |
| 118 | + "name": "stdout", |
| 119 | + "output_type": "stream", |
| 120 | + "text": [ |
| 121 | + "Working directory: /home/jovyan/examples/data\n" |
| 122 | + ] |
| 123 | + } |
| 124 | + ], |
117 | 125 | "source": [
|
118 |
| - "work_dir = 'data/'\n", |
| 126 | + "root_dir = os.getcwd()\n", |
| 127 | + "work_dir = os.path.join(root_dir, 'data')\n", |
119 | 128 | "if not os.path.exists(work_dir):\n",
|
120 | 129 | " os.mkdir(work_dir)\n",
|
121 |
| - "# print(\"Working directory: {}\".format(os.path.realpath(work_dir)))" |
| 130 | + "print(\"Working directory: {}\".format(os.path.realpath(work_dir)))" |
122 | 131 | ]
|
123 | 132 | },
|
124 | 133 | {
|
|
157 | 166 | "Downloading done.\n",
|
158 | 167 | "Unzipping lidar-dem.zip ...\n",
|
159 | 168 | "Unzipping done.\n",
|
160 |
| - "Data directory: data/lidar-dem\n" |
| 169 | + "Data directory: /home/jovyan/examples/data/lidar-dem\n" |
161 | 170 | ]
|
162 | 171 | }
|
163 | 172 | ],
|
|
216 | 225 | "output_type": "stream",
|
217 | 226 | "text": [
|
218 | 227 | "Google Drive file id: 1c6v-ep5-klb2J32Nuu1rSyqAc8kEtmdh\n",
|
219 |
| - "Downloading 1c6v-ep5-klb2J32Nuu1rSyqAc8kEtmdh into data/lidar-dem.zip... Done.\n", |
| 228 | + "Downloading 1c6v-ep5-klb2J32Nuu1rSyqAc8kEtmdh into /home/jovyan/examples/data/lidar-dem.zip... Done.\n", |
220 | 229 | "Unzipping...Done.\n"
|
221 | 230 | ]
|
222 | 231 | }
|
|
278 | 287 | "name": "stdout",
|
279 | 288 | "output_type": "stream",
|
280 | 289 | "text": [
|
281 |
| - "['sink.tif', 'dsm.tif', 'dem.tif']\n" |
| 290 | + "['dsm.tif', 'sink.tif', 'dem.tif']\n" |
282 | 291 | ]
|
283 | 292 | }
|
284 | 293 | ],
|
|
349 | 358 | "output_type": "stream",
|
350 | 359 | "text": [
|
351 | 360 | "Median filtering ...\n",
|
352 |
| - "Run time: 0.0175 seconds\n", |
| 361 | + "Run time: 0.0258 seconds\n", |
353 | 362 | "Saving dem ...\n"
|
354 | 363 | ]
|
355 | 364 | }
|
|
386 | 395 | "Saving sink dem ...\n",
|
387 | 396 | "Saving refined dem ...\n",
|
388 | 397 | "Converting raster to vector ...\n",
|
389 |
| - "Total run time:\t\t\t 0.0702 s\n", |
| 398 | + "Total run time:\t\t\t 0.0723 s\n", |
390 | 399 | "\n"
|
391 | 400 | ]
|
392 | 401 | }
|
|
416 | 425 | "Reading data ...\n",
|
417 | 426 | "rows, cols: (400, 400)\n",
|
418 | 427 | "Pixel resolution: 1.0\n",
|
419 |
| - "Read data time: 0.0051 seconds\n", |
420 |
| - "Data preparation time: 0.0172 seconds\n", |
| 428 | + "Read data time: 0.0036 seconds\n", |
| 429 | + "Data preparation time: 0.0737 seconds\n", |
421 | 430 | "Total number of regions: 1\n",
|
422 | 431 | "Processing Region # 1 ...\n",
|
423 | 432 | "=========== Run time statistics =========== \n",
|
424 | 433 | "(rows, cols):\t\t\t (400, 400)\n",
|
425 | 434 | "Pixel resolution:\t\t 1.0 m\n",
|
426 | 435 | "Number of regions:\t\t 1\n",
|
427 |
| - "Data preparation time:\t\t 0.0172 s\n", |
428 |
| - "Identify level time:\t\t 0.2257 s\n", |
429 |
| - "Write image time:\t\t 0.0041 s\n", |
430 |
| - "Polygonize time:\t\t 0.0087 s\n", |
431 |
| - "Total run time:\t\t\t 0.2629 s\n" |
| 436 | + "Data preparation time:\t\t 0.0737 s\n", |
| 437 | + "Identify level time:\t\t 0.5304 s\n", |
| 438 | + "Write image time:\t\t 0.0057 s\n", |
| 439 | + "Polygonize time:\t\t 0.0130 s\n", |
| 440 | + "Total run time:\t\t\t 0.6238 s\n" |
432 | 441 | ]
|
433 | 442 | }
|
434 | 443 | ],
|
|
452 | 461 | "name": "stdout",
|
453 | 462 | "output_type": "stream",
|
454 | 463 | "text": [
|
455 |
| - "Results are saved in: /media/hdd/Dropbox/git/python-geospatial/examples/temp\n", |
456 |
| - "['regions.prj', 'depression_level.tif', 'regions.shx', 'depression_id.tif', 'depressions.shp', 'depressions_info.csv', 'dem_diff.tif', 'sink.tif', 'regions.shp', 'depressions.prj', 'regions.dbf', 'depressions.shx', 'depth.tif', 'regions_info.csv', 'depressions.dbf', 'dem_filled.tif', 'dem.tif', 'region.tif', 'median.tif']\n" |
| 464 | + "Results are saved in: /home/jovyan/examples/temp\n", |
| 465 | + "['depression_id.tif', 'depressions.shp', 'regions.shx', 'region.tif', 'sink.tif', 'depressions.dbf', 'depression_level.tif', 'regions.shp', 'depressions_info.csv', 'regions.prj', 'depressions.prj', 'dem.tif', 'depth.tif', 'depressions.shx', 'regions.dbf', 'regions_info.csv', 'dem_filled.tif', 'median.tif', 'dem_diff.tif']\n" |
457 | 466 | ]
|
458 | 467 | }
|
459 | 468 | ],
|
|
642 | 651 | ],
|
643 | 652 | "metadata": {
|
644 | 653 | "kernelspec": {
|
645 |
| - "display_name": "pygeo", |
| 654 | + "display_name": "Python 3", |
646 | 655 | "language": "python",
|
647 |
| - "name": "pygeo" |
| 656 | + "name": "python3" |
648 | 657 | },
|
649 | 658 | "language_info": {
|
650 | 659 | "codemirror_mode": {
|
|
0 commit comments