geoai-py 0.4.2__tar.gz → 0.5.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.gitignore +1 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/PKG-INFO +1 -1
- geoai_py-0.5.0/docs/classify.md +3 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/building_footprints_africa.ipynb +1 -3
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/building_footprints_china.ipynb +1 -1
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/download_data.ipynb +5 -9
- geoai_py-0.5.0/docs/examples/planetary_computer.ipynb +338 -0
- geoai_py-0.5.0/docs/examples/train_water_detection.ipynb +328 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai/__init__.py +6 -1
- geoai_py-0.5.0/geoai/classify.py +933 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai/download.py +257 -114
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai/extract.py +153 -46
- geoai_py-0.5.0/geoai/geoai.py +29 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai/utils.py +162 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai_py.egg-info/PKG-INFO +1 -1
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai_py.egg-info/SOURCES.txt +3 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/mkdocs.yml +2 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/pyproject.toml +2 -2
- geoai_py-0.4.2/docs/examples/planetary_computer.ipynb +0 -120
- geoai_py-0.4.2/geoai/geoai.py +0 -15
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.editorconfig +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.github/FUNDING.yml +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.github/dependabot.yml +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.github/workflows/docs-build.yml +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.github/workflows/docs.yml +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.github/workflows/macos.yml +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.github/workflows/pypi.yml +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.github/workflows/ubuntu.yml +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.github/workflows/windows.yml +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/.pre-commit-config.yaml +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/LICENSE +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/MANIFEST.in +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/README.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/CNAME +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/assets/logo.ico +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/assets/logo.png +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/assets/logo_rect.png +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/changelog.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/contributing.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/download.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/_template.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/building_footprints_usa.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/building_regularization.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/car_detection.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/data_visualization.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/dataviz/lidar_viz.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/dataviz/raster_viz.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/dataviz/vector_viz.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/download_sentinel2.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/geometric_properties.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/image_chips.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/jupytext.toml +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/parking_spot_detection.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/rastervision/semantic_segmentation.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/samgeo/arcgis.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/samgeo/automatic_mask_generator.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/samgeo/automatic_mask_generator_hq.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/samgeo/box_prompts.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/samgeo/fast_sam.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/samgeo/input_prompts.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/samgeo/input_prompts_hq.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/samgeo/maxar_open_data.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/samgeo/satellite-predictor.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/samgeo/satellite.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/samgeo/swimming_pools.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/samgeo/text_prompts.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/samgeo/text_prompts_batch.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/ship_detection.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/solar_panel_detection.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/text_prompt_segmentation.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/train_building_footprints_usa.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/train_car_detection.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/train_object_detection_model.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/train_ship_detection.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/train_solar_panel_detection.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/view_metadata.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/examples/wetland_mapping.ipynb +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/extract.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/faq.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/geoai.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/hf.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/index.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/installation.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/overrides/main.html +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/segment.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/segmentation.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/train.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/usage.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/docs/utils.md +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai/hf.py +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai/segment.py +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai/segmentation.py +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai/train.py +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai_py.egg-info/dependency_links.txt +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai_py.egg-info/entry_points.txt +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai_py.egg-info/requires.txt +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/geoai_py.egg-info/top_level.txt +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/requirements.txt +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/requirements_docs.txt +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/setup.cfg +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/tests/__init__.py +0 -0
- {geoai_py-0.4.2 → geoai_py-0.5.0}/tests/test_geoai.py +0 -0
|
@@ -76,9 +76,7 @@
|
|
|
76
76
|
"metadata": {},
|
|
77
77
|
"outputs": [],
|
|
78
78
|
"source": [
|
|
79
|
-
"extractor = geoai.BuildingFootprintExtractor(\
|
|
80
|
-
" model_path=\"building_footprints_africa.pth\"\n",
|
|
81
|
-
")"
|
|
79
|
+
"extractor = geoai.BuildingFootprintExtractor(model_path=\"building_footprints_usa.pth\")"
|
|
82
80
|
]
|
|
83
81
|
},
|
|
84
82
|
{
|
|
@@ -122,10 +122,7 @@
|
|
|
122
122
|
"# Download buildings\n",
|
|
123
123
|
"data_file = download_overture_buildings(\n",
|
|
124
124
|
" bbox=bbox,\n",
|
|
125
|
-
"
|
|
126
|
-
" output_format=\"geojson\",\n",
|
|
127
|
-
" data_type=\"building\",\n",
|
|
128
|
-
" verbose=True,\n",
|
|
125
|
+
" output=\"buildings.geojson\",\n",
|
|
129
126
|
")"
|
|
130
127
|
]
|
|
131
128
|
},
|
|
@@ -143,9 +140,8 @@
|
|
|
143
140
|
"metadata": {},
|
|
144
141
|
"outputs": [],
|
|
145
142
|
"source": [
|
|
146
|
-
"
|
|
147
|
-
"
|
|
148
|
-
" print(stats)"
|
|
143
|
+
"stats = extract_building_stats(data_file)\n",
|
|
144
|
+
"print(stats)"
|
|
149
145
|
]
|
|
150
146
|
},
|
|
151
147
|
{
|
|
@@ -177,7 +173,7 @@
|
|
|
177
173
|
],
|
|
178
174
|
"metadata": {
|
|
179
175
|
"kernelspec": {
|
|
180
|
-
"display_name": "
|
|
176
|
+
"display_name": "geo",
|
|
181
177
|
"language": "python",
|
|
182
178
|
"name": "python3"
|
|
183
179
|
},
|
|
@@ -191,7 +187,7 @@
|
|
|
191
187
|
"name": "python",
|
|
192
188
|
"nbconvert_exporter": "python",
|
|
193
189
|
"pygments_lexer": "ipython3",
|
|
194
|
-
"version": "3.
|
|
190
|
+
"version": "3.12.9"
|
|
195
191
|
}
|
|
196
192
|
},
|
|
197
193
|
"nbformat": 4,
|
|
@@ -0,0 +1,338 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "markdown",
|
|
5
|
+
"metadata": {},
|
|
6
|
+
"source": [
|
|
7
|
+
"# Download Data from Planetary Computer\n",
|
|
8
|
+
"\n",
|
|
9
|
+
"[](https://colab.research.google.com/github/opengeos/geoai/blob/main/docs/examples/planetary_computer.ipynb)\n",
|
|
10
|
+
"\n",
|
|
11
|
+
"## Install package\n",
|
|
12
|
+
"To use the `geoai-py` package, ensure it is installed in your environment. Uncomment the command below if needed."
|
|
13
|
+
]
|
|
14
|
+
},
|
|
15
|
+
{
|
|
16
|
+
"cell_type": "code",
|
|
17
|
+
"execution_count": null,
|
|
18
|
+
"metadata": {},
|
|
19
|
+
"outputs": [],
|
|
20
|
+
"source": [
|
|
21
|
+
"# %pip install geoai-py"
|
|
22
|
+
]
|
|
23
|
+
},
|
|
24
|
+
{
|
|
25
|
+
"cell_type": "markdown",
|
|
26
|
+
"metadata": {},
|
|
27
|
+
"source": [
|
|
28
|
+
"## Import libraries"
|
|
29
|
+
]
|
|
30
|
+
},
|
|
31
|
+
{
|
|
32
|
+
"cell_type": "code",
|
|
33
|
+
"execution_count": null,
|
|
34
|
+
"metadata": {},
|
|
35
|
+
"outputs": [],
|
|
36
|
+
"source": [
|
|
37
|
+
"import geoai"
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
{
|
|
41
|
+
"cell_type": "markdown",
|
|
42
|
+
"metadata": {},
|
|
43
|
+
"source": [
|
|
44
|
+
"## Retrieve collections"
|
|
45
|
+
]
|
|
46
|
+
},
|
|
47
|
+
{
|
|
48
|
+
"cell_type": "code",
|
|
49
|
+
"execution_count": null,
|
|
50
|
+
"metadata": {},
|
|
51
|
+
"outputs": [],
|
|
52
|
+
"source": [
|
|
53
|
+
"collections = geoai.pc_collection_list()\n",
|
|
54
|
+
"collections"
|
|
55
|
+
]
|
|
56
|
+
},
|
|
57
|
+
{
|
|
58
|
+
"cell_type": "markdown",
|
|
59
|
+
"metadata": {},
|
|
60
|
+
"source": [
|
|
61
|
+
"## Search NAIP imagery"
|
|
62
|
+
]
|
|
63
|
+
},
|
|
64
|
+
{
|
|
65
|
+
"cell_type": "code",
|
|
66
|
+
"execution_count": null,
|
|
67
|
+
"metadata": {},
|
|
68
|
+
"outputs": [],
|
|
69
|
+
"source": [
|
|
70
|
+
"items = geoai.pc_stac_search(\n",
|
|
71
|
+
" collection=\"naip\",\n",
|
|
72
|
+
" bbox=[-76.6657, 39.2648, -76.6478, 39.2724], # Baltimore area\n",
|
|
73
|
+
" time_range=\"2013-01-01/2014-12-31\",\n",
|
|
74
|
+
")"
|
|
75
|
+
]
|
|
76
|
+
},
|
|
77
|
+
{
|
|
78
|
+
"cell_type": "code",
|
|
79
|
+
"execution_count": null,
|
|
80
|
+
"metadata": {},
|
|
81
|
+
"outputs": [],
|
|
82
|
+
"source": [
|
|
83
|
+
"items"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"cell_type": "markdown",
|
|
88
|
+
"metadata": {},
|
|
89
|
+
"source": [
|
|
90
|
+
"## Visualize NAIP imagery"
|
|
91
|
+
]
|
|
92
|
+
},
|
|
93
|
+
{
|
|
94
|
+
"cell_type": "code",
|
|
95
|
+
"execution_count": null,
|
|
96
|
+
"metadata": {},
|
|
97
|
+
"outputs": [],
|
|
98
|
+
"source": [
|
|
99
|
+
"geoai.pc_item_asset_list(items[0])"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"cell_type": "code",
|
|
104
|
+
"execution_count": null,
|
|
105
|
+
"metadata": {},
|
|
106
|
+
"outputs": [],
|
|
107
|
+
"source": [
|
|
108
|
+
"geoai.view_pc_item(item=items[0])"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"cell_type": "markdown",
|
|
113
|
+
"metadata": {},
|
|
114
|
+
"source": [
|
|
115
|
+
"## Download NAIP imagery"
|
|
116
|
+
]
|
|
117
|
+
},
|
|
118
|
+
{
|
|
119
|
+
"cell_type": "code",
|
|
120
|
+
"execution_count": null,
|
|
121
|
+
"metadata": {},
|
|
122
|
+
"outputs": [],
|
|
123
|
+
"source": [
|
|
124
|
+
"downloaded = geoai.pc_stac_download(\n",
|
|
125
|
+
" items, output_dir=\"data\", assets=[\"image\", \"thumbnail\"]\n",
|
|
126
|
+
")"
|
|
127
|
+
]
|
|
128
|
+
},
|
|
129
|
+
{
|
|
130
|
+
"cell_type": "markdown",
|
|
131
|
+
"metadata": {},
|
|
132
|
+
"source": [
|
|
133
|
+
"## Search land cover data"
|
|
134
|
+
]
|
|
135
|
+
},
|
|
136
|
+
{
|
|
137
|
+
"cell_type": "code",
|
|
138
|
+
"execution_count": null,
|
|
139
|
+
"metadata": {},
|
|
140
|
+
"outputs": [],
|
|
141
|
+
"source": [
|
|
142
|
+
"items = geoai.pc_stac_search(\n",
|
|
143
|
+
" collection=\"chesapeake-lc-13\",\n",
|
|
144
|
+
" bbox=[-76.6657, 39.2648, -76.6478, 39.2724], # Baltimore area\n",
|
|
145
|
+
" time_range=\"2013-01-01/2014-12-31\",\n",
|
|
146
|
+
" max_items=10,\n",
|
|
147
|
+
")"
|
|
148
|
+
]
|
|
149
|
+
},
|
|
150
|
+
{
|
|
151
|
+
"cell_type": "code",
|
|
152
|
+
"execution_count": null,
|
|
153
|
+
"metadata": {},
|
|
154
|
+
"outputs": [],
|
|
155
|
+
"source": [
|
|
156
|
+
"items"
|
|
157
|
+
]
|
|
158
|
+
},
|
|
159
|
+
{
|
|
160
|
+
"cell_type": "markdown",
|
|
161
|
+
"metadata": {},
|
|
162
|
+
"source": [
|
|
163
|
+
"## Visualize land cover data"
|
|
164
|
+
]
|
|
165
|
+
},
|
|
166
|
+
{
|
|
167
|
+
"cell_type": "code",
|
|
168
|
+
"execution_count": null,
|
|
169
|
+
"metadata": {},
|
|
170
|
+
"outputs": [],
|
|
171
|
+
"source": [
|
|
172
|
+
"geoai.pc_item_asset_list(items[0])"
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"cell_type": "code",
|
|
177
|
+
"execution_count": null,
|
|
178
|
+
"metadata": {},
|
|
179
|
+
"outputs": [],
|
|
180
|
+
"source": [
|
|
181
|
+
"geoai.view_pc_item(item=items[0], colormap_name=\"tab10\", basemap=\"SATELLITE\")"
|
|
182
|
+
]
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
"cell_type": "markdown",
|
|
186
|
+
"metadata": {},
|
|
187
|
+
"source": [
|
|
188
|
+
"## Download land cover data"
|
|
189
|
+
]
|
|
190
|
+
},
|
|
191
|
+
{
|
|
192
|
+
"cell_type": "code",
|
|
193
|
+
"execution_count": null,
|
|
194
|
+
"metadata": {},
|
|
195
|
+
"outputs": [],
|
|
196
|
+
"source": [
|
|
197
|
+
"geoai.pc_stac_download(items[0], output_dir=\"data\", assets=[\"data\", \"rendered_preview\"])"
|
|
198
|
+
]
|
|
199
|
+
},
|
|
200
|
+
{
|
|
201
|
+
"cell_type": "code",
|
|
202
|
+
"execution_count": null,
|
|
203
|
+
"metadata": {},
|
|
204
|
+
"outputs": [],
|
|
205
|
+
"source": [
|
|
206
|
+
"ds = geoai.read_pc_item_asset(items[0], asset=\"data\")"
|
|
207
|
+
]
|
|
208
|
+
},
|
|
209
|
+
{
|
|
210
|
+
"cell_type": "code",
|
|
211
|
+
"execution_count": null,
|
|
212
|
+
"metadata": {},
|
|
213
|
+
"outputs": [],
|
|
214
|
+
"source": [
|
|
215
|
+
"ds"
|
|
216
|
+
]
|
|
217
|
+
},
|
|
218
|
+
{
|
|
219
|
+
"cell_type": "markdown",
|
|
220
|
+
"metadata": {},
|
|
221
|
+
"source": [
|
|
222
|
+
"## Search Landsat data"
|
|
223
|
+
]
|
|
224
|
+
},
|
|
225
|
+
{
|
|
226
|
+
"cell_type": "code",
|
|
227
|
+
"execution_count": null,
|
|
228
|
+
"metadata": {},
|
|
229
|
+
"outputs": [],
|
|
230
|
+
"source": [
|
|
231
|
+
"items = geoai.pc_stac_search(\n",
|
|
232
|
+
" collection=\"landsat-c2-l2\",\n",
|
|
233
|
+
" bbox=[-76.6657, 39.2648, -76.6478, 39.2724], # Baltimore area\n",
|
|
234
|
+
" time_range=\"2024-10-27/2024-12-31\",\n",
|
|
235
|
+
" query={\"eo:cloud_cover\": {\"lt\": 1}},\n",
|
|
236
|
+
" max_items=10,\n",
|
|
237
|
+
")"
|
|
238
|
+
]
|
|
239
|
+
},
|
|
240
|
+
{
|
|
241
|
+
"cell_type": "code",
|
|
242
|
+
"execution_count": null,
|
|
243
|
+
"metadata": {},
|
|
244
|
+
"outputs": [],
|
|
245
|
+
"source": [
|
|
246
|
+
"items"
|
|
247
|
+
]
|
|
248
|
+
},
|
|
249
|
+
{
|
|
250
|
+
"cell_type": "markdown",
|
|
251
|
+
"metadata": {},
|
|
252
|
+
"source": [
|
|
253
|
+
"## Visualize Landsat data"
|
|
254
|
+
]
|
|
255
|
+
},
|
|
256
|
+
{
|
|
257
|
+
"cell_type": "code",
|
|
258
|
+
"execution_count": null,
|
|
259
|
+
"metadata": {},
|
|
260
|
+
"outputs": [],
|
|
261
|
+
"source": [
|
|
262
|
+
"geoai.pc_item_asset_list(items[0])"
|
|
263
|
+
]
|
|
264
|
+
},
|
|
265
|
+
{
|
|
266
|
+
"cell_type": "code",
|
|
267
|
+
"execution_count": null,
|
|
268
|
+
"metadata": {},
|
|
269
|
+
"outputs": [],
|
|
270
|
+
"source": [
|
|
271
|
+
"geoai.view_pc_item(item=items[0], assets=[\"red\", \"green\", \"blue\"])"
|
|
272
|
+
]
|
|
273
|
+
},
|
|
274
|
+
{
|
|
275
|
+
"cell_type": "code",
|
|
276
|
+
"execution_count": null,
|
|
277
|
+
"metadata": {},
|
|
278
|
+
"outputs": [],
|
|
279
|
+
"source": [
|
|
280
|
+
"geoai.view_pc_item(item=items[0], assets=[\"nir08\", \"red\", \"green\"])"
|
|
281
|
+
]
|
|
282
|
+
},
|
|
283
|
+
{
|
|
284
|
+
"cell_type": "code",
|
|
285
|
+
"execution_count": null,
|
|
286
|
+
"metadata": {},
|
|
287
|
+
"outputs": [],
|
|
288
|
+
"source": [
|
|
289
|
+
"geoai.view_pc_item(\n",
|
|
290
|
+
" item=items[0],\n",
|
|
291
|
+
" expression=\"(nir08-red)/(nir08+red)\",\n",
|
|
292
|
+
" rescale=\"-1,1\",\n",
|
|
293
|
+
" colormap_name=\"greens\",\n",
|
|
294
|
+
" name=\"NDVI Green\",\n",
|
|
295
|
+
")"
|
|
296
|
+
]
|
|
297
|
+
},
|
|
298
|
+
{
|
|
299
|
+
"cell_type": "markdown",
|
|
300
|
+
"metadata": {},
|
|
301
|
+
"source": [
|
|
302
|
+
"## Download Landsat data"
|
|
303
|
+
]
|
|
304
|
+
},
|
|
305
|
+
{
|
|
306
|
+
"cell_type": "code",
|
|
307
|
+
"execution_count": null,
|
|
308
|
+
"metadata": {},
|
|
309
|
+
"outputs": [],
|
|
310
|
+
"source": [
|
|
311
|
+
"geoai.pc_stac_download(\n",
|
|
312
|
+
" items[0], output_dir=\"data\", assets=[\"nir08\", \"red\", \"green\", \"blue\"]\n",
|
|
313
|
+
")"
|
|
314
|
+
]
|
|
315
|
+
}
|
|
316
|
+
],
|
|
317
|
+
"metadata": {
|
|
318
|
+
"kernelspec": {
|
|
319
|
+
"display_name": "geo",
|
|
320
|
+
"language": "python",
|
|
321
|
+
"name": "python3"
|
|
322
|
+
},
|
|
323
|
+
"language_info": {
|
|
324
|
+
"codemirror_mode": {
|
|
325
|
+
"name": "ipython",
|
|
326
|
+
"version": 3
|
|
327
|
+
},
|
|
328
|
+
"file_extension": ".py",
|
|
329
|
+
"mimetype": "text/x-python",
|
|
330
|
+
"name": "python",
|
|
331
|
+
"nbconvert_exporter": "python",
|
|
332
|
+
"pygments_lexer": "ipython3",
|
|
333
|
+
"version": "3.12.9"
|
|
334
|
+
}
|
|
335
|
+
},
|
|
336
|
+
"nbformat": 4,
|
|
337
|
+
"nbformat_minor": 2
|
|
338
|
+
}
|