Skip to content

Commit d39c932

Browse files
committed
add template notebook
1 parent fff9a1f commit d39c932

File tree

4 files changed

+1288
-39
lines changed

4 files changed

+1288
-39
lines changed

examples/lidar.ipynb

+28-19
Original file line numberDiff line numberDiff line change
@@ -113,12 +113,21 @@
113113
"cell_type": "code",
114114
"execution_count": 2,
115115
"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+
],
117125
"source": [
118-
"work_dir = 'data/'\n",
126+
"root_dir = os.getcwd()\n",
127+
"work_dir = os.path.join(root_dir, 'data')\n",
119128
"if not os.path.exists(work_dir):\n",
120129
" 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)))"
122131
]
123132
},
124133
{
@@ -157,7 +166,7 @@
157166
"Downloading done.\n",
158167
"Unzipping lidar-dem.zip ...\n",
159168
"Unzipping done.\n",
160-
"Data directory: data/lidar-dem\n"
169+
"Data directory: /home/jovyan/examples/data/lidar-dem\n"
161170
]
162171
}
163172
],
@@ -216,7 +225,7 @@
216225
"output_type": "stream",
217226
"text": [
218227
"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",
220229
"Unzipping...Done.\n"
221230
]
222231
}
@@ -278,7 +287,7 @@
278287
"name": "stdout",
279288
"output_type": "stream",
280289
"text": [
281-
"['sink.tif', 'dsm.tif', 'dem.tif']\n"
290+
"['dsm.tif', 'sink.tif', 'dem.tif']\n"
282291
]
283292
}
284293
],
@@ -349,7 +358,7 @@
349358
"output_type": "stream",
350359
"text": [
351360
"Median filtering ...\n",
352-
"Run time: 0.0175 seconds\n",
361+
"Run time: 0.0258 seconds\n",
353362
"Saving dem ...\n"
354363
]
355364
}
@@ -386,7 +395,7 @@
386395
"Saving sink dem ...\n",
387396
"Saving refined dem ...\n",
388397
"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",
390399
"\n"
391400
]
392401
}
@@ -416,19 +425,19 @@
416425
"Reading data ...\n",
417426
"rows, cols: (400, 400)\n",
418427
"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",
421430
"Total number of regions: 1\n",
422431
"Processing Region # 1 ...\n",
423432
"=========== Run time statistics =========== \n",
424433
"(rows, cols):\t\t\t (400, 400)\n",
425434
"Pixel resolution:\t\t 1.0 m\n",
426435
"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"
432441
]
433442
}
434443
],
@@ -452,8 +461,8 @@
452461
"name": "stdout",
453462
"output_type": "stream",
454463
"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"
457466
]
458467
}
459468
],
@@ -642,9 +651,9 @@
642651
],
643652
"metadata": {
644653
"kernelspec": {
645-
"display_name": "pygeo",
654+
"display_name": "Python 3",
646655
"language": "python",
647-
"name": "pygeo"
656+
"name": "python3"
648657
},
649658
"language_info": {
650659
"codemirror_mode": {

examples/rasterio.ipynb

+801
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)