geoai-py 0.3.0__tar.gz → 0.3.2__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.3.0 → geoai_py-0.3.2}/PKG-INFO +1 -2
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/building_regularization.ipynb +97 -10
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/installation.md +8 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/geoai/__init__.py +1 -1
- {geoai_py-0.3.0 → geoai_py-0.3.2}/geoai/extract.py +260 -143
- {geoai_py-0.3.0 → geoai_py-0.3.2}/geoai/preprocess.py +7 -1
- {geoai_py-0.3.0 → geoai_py-0.3.2}/geoai/utils.py +138 -3
- {geoai_py-0.3.0 → geoai_py-0.3.2}/geoai_py.egg-info/PKG-INFO +1 -2
- {geoai_py-0.3.0 → geoai_py-0.3.2}/geoai_py.egg-info/requires.txt +0 -1
- {geoai_py-0.3.0 → geoai_py-0.3.2}/pyproject.toml +2 -2
- {geoai_py-0.3.0 → geoai_py-0.3.2}/requirements.txt +1 -1
- {geoai_py-0.3.0 → geoai_py-0.3.2}/.editorconfig +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/.github/dependabot.yml +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/.github/workflows/docs-build.yml +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/.github/workflows/docs.yml +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/.github/workflows/macos.yml +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/.github/workflows/pypi.yml +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/.github/workflows/ubuntu.yml +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/.github/workflows/windows.yml +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/.gitignore +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/.pre-commit-config.yaml +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/LICENSE +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/MANIFEST.in +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/README.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/CNAME +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/changelog.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/contributing.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/download.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/building_footprints_usa.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/data_visualization.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/dataviz/lidar_viz.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/dataviz/raster_viz.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/dataviz/vector_viz.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/download_data.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/image_chips.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/jupytext.toml +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/rastervision/semantic_segmentation.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/samgeo/arcgis.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/samgeo/automatic_mask_generator.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/samgeo/automatic_mask_generator_hq.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/samgeo/box_prompts.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/samgeo/fast_sam.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/samgeo/input_prompts.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/samgeo/input_prompts_hq.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/samgeo/maxar_open_data.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/samgeo/satellite-predictor.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/samgeo/satellite.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/samgeo/swimming_pools.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/samgeo/text_prompts.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/samgeo/text_prompts_batch.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/examples/view_metadata.ipynb +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/extract.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/faq.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/geoai.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/index.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/overrides/main.html +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/preprocess.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/segmentation.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/usage.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/docs/utils.md +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/geoai/download.py +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/geoai/geoai.py +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/geoai/segmentation.py +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/geoai_py.egg-info/SOURCES.txt +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/geoai_py.egg-info/dependency_links.txt +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/geoai_py.egg-info/entry_points.txt +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/geoai_py.egg-info/top_level.txt +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/mkdocs.yml +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/requirements_docs.txt +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/setup.cfg +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/tests/__init__.py +0 -0
- {geoai_py-0.3.0 → geoai_py-0.3.2}/tests/test_geoai.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.2
|
|
2
2
|
Name: geoai-py
|
|
3
|
-
Version: 0.3.
|
|
3
|
+
Version: 0.3.2
|
|
4
4
|
Summary: A Python package for using Artificial Intelligence (AI) with geospatial data
|
|
5
5
|
Author-email: Qiusheng Wu <giswqs@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -31,7 +31,6 @@ Requires-Dist: pystac-client
|
|
|
31
31
|
Requires-Dist: rasterio
|
|
32
32
|
Requires-Dist: rioxarray
|
|
33
33
|
Requires-Dist: scikit-learn
|
|
34
|
-
Requires-Dist: segment-geospatial
|
|
35
34
|
Requires-Dist: torch
|
|
36
35
|
Requires-Dist: torchgeo
|
|
37
36
|
Requires-Dist: tqdm
|
|
@@ -50,7 +50,20 @@
|
|
|
50
50
|
"metadata": {},
|
|
51
51
|
"outputs": [],
|
|
52
52
|
"source": [
|
|
53
|
-
"
|
|
53
|
+
"naip_url = (\n",
|
|
54
|
+
" \"https://huggingface.co/datasets/giswqs/geospatial/resolve/main/naip_train.tif\"\n",
|
|
55
|
+
")\n",
|
|
56
|
+
"masks_url = \"https://huggingface.co/datasets/giswqs/geospatial/resolve/main/naip_building_masks.tif\""
|
|
57
|
+
]
|
|
58
|
+
},
|
|
59
|
+
{
|
|
60
|
+
"cell_type": "code",
|
|
61
|
+
"execution_count": null,
|
|
62
|
+
"metadata": {},
|
|
63
|
+
"outputs": [],
|
|
64
|
+
"source": [
|
|
65
|
+
"masks_path = geoai.download_file(masks_url)\n",
|
|
66
|
+
"naip_path = geoai.download_file(naip_url)"
|
|
54
67
|
]
|
|
55
68
|
},
|
|
56
69
|
{
|
|
@@ -59,7 +72,7 @@
|
|
|
59
72
|
"metadata": {},
|
|
60
73
|
"outputs": [],
|
|
61
74
|
"source": [
|
|
62
|
-
"
|
|
75
|
+
"geoai.view_image(masks_path, figsize=(18, 10))"
|
|
63
76
|
]
|
|
64
77
|
},
|
|
65
78
|
{
|
|
@@ -68,7 +81,17 @@
|
|
|
68
81
|
"metadata": {},
|
|
69
82
|
"outputs": [],
|
|
70
83
|
"source": [
|
|
71
|
-
"geoai.
|
|
84
|
+
"geoai.create_split_map(\n",
|
|
85
|
+
" left_layer=masks_url,\n",
|
|
86
|
+
" right_layer=naip_url,\n",
|
|
87
|
+
" left_label=\"Building Masks\",\n",
|
|
88
|
+
" right_label=\"NAIP Imagery\",\n",
|
|
89
|
+
" left_args={\n",
|
|
90
|
+
" \"colormap\": {\"255\": \"#0000ff\"},\n",
|
|
91
|
+
" \"opacity\": 0.5,\n",
|
|
92
|
+
" },\n",
|
|
93
|
+
" basemap=naip_url,\n",
|
|
94
|
+
")"
|
|
72
95
|
]
|
|
73
96
|
},
|
|
74
97
|
{
|
|
@@ -84,7 +107,7 @@
|
|
|
84
107
|
"metadata": {},
|
|
85
108
|
"outputs": [],
|
|
86
109
|
"source": [
|
|
87
|
-
"gdf = geoai.raster_to_vector(
|
|
110
|
+
"gdf = geoai.raster_to_vector(masks_path, output_path=\"naip_building_masks.geojson\")"
|
|
88
111
|
]
|
|
89
112
|
},
|
|
90
113
|
{
|
|
@@ -94,7 +117,23 @@
|
|
|
94
117
|
"outputs": [],
|
|
95
118
|
"source": [
|
|
96
119
|
"geoai.view_vector_interactive(\n",
|
|
97
|
-
" gdf, style_kwds={\"color\": \"blue\", \"fillOpacity\": 0}, tiles
|
|
120
|
+
" gdf, style_kwds={\"color\": \"blue\", \"fillOpacity\": 0.4}, tiles=naip_url\n",
|
|
121
|
+
")"
|
|
122
|
+
]
|
|
123
|
+
},
|
|
124
|
+
{
|
|
125
|
+
"cell_type": "code",
|
|
126
|
+
"execution_count": null,
|
|
127
|
+
"metadata": {},
|
|
128
|
+
"outputs": [],
|
|
129
|
+
"source": [
|
|
130
|
+
"geoai.create_split_map(\n",
|
|
131
|
+
" left_layer=gdf,\n",
|
|
132
|
+
" right_layer=naip_url,\n",
|
|
133
|
+
" left_label=\"Buildings\",\n",
|
|
134
|
+
" right_label=\"NAIP Imagery\",\n",
|
|
135
|
+
" left_args={\"style\": {\"color\": \"blue\"}, \"fillOpacity\": 0.4},\n",
|
|
136
|
+
" basemap=naip_url,\n",
|
|
98
137
|
")"
|
|
99
138
|
]
|
|
100
139
|
},
|
|
@@ -127,7 +166,23 @@
|
|
|
127
166
|
"outputs": [],
|
|
128
167
|
"source": [
|
|
129
168
|
"geoai.view_vector_interactive(\n",
|
|
130
|
-
" gdf_regularized, style_kwds={\"color\": \"red\", \"fillOpacity\": 0}, tiles
|
|
169
|
+
" gdf_regularized, style_kwds={\"color\": \"red\", \"fillOpacity\": 0.4}, tiles=naip_url\n",
|
|
170
|
+
")"
|
|
171
|
+
]
|
|
172
|
+
},
|
|
173
|
+
{
|
|
174
|
+
"cell_type": "code",
|
|
175
|
+
"execution_count": null,
|
|
176
|
+
"metadata": {},
|
|
177
|
+
"outputs": [],
|
|
178
|
+
"source": [
|
|
179
|
+
"geoai.create_split_map(\n",
|
|
180
|
+
" left_layer=gdf_regularized,\n",
|
|
181
|
+
" right_layer=naip_url,\n",
|
|
182
|
+
" left_label=\"Regularized Buildings\",\n",
|
|
183
|
+
" right_label=\"NAIP Imagery\",\n",
|
|
184
|
+
" left_args={\"style\": {\"color\": \"red\"}, \"fillOpacity\": 0.4},\n",
|
|
185
|
+
" basemap=naip_url,\n",
|
|
131
186
|
")"
|
|
132
187
|
]
|
|
133
188
|
},
|
|
@@ -154,7 +209,23 @@
|
|
|
154
209
|
"outputs": [],
|
|
155
210
|
"source": [
|
|
156
211
|
"geoai.view_vector_interactive(\n",
|
|
157
|
-
" gdf_hybrid, style_kwds={\"color\": \"green\", \"fillOpacity\": 0}, tiles
|
|
212
|
+
" gdf_hybrid, style_kwds={\"color\": \"green\", \"fillOpacity\": 0.4}, tiles=naip_url\n",
|
|
213
|
+
")"
|
|
214
|
+
]
|
|
215
|
+
},
|
|
216
|
+
{
|
|
217
|
+
"cell_type": "code",
|
|
218
|
+
"execution_count": null,
|
|
219
|
+
"metadata": {},
|
|
220
|
+
"outputs": [],
|
|
221
|
+
"source": [
|
|
222
|
+
"geoai.create_split_map(\n",
|
|
223
|
+
" left_layer=gdf_regularized,\n",
|
|
224
|
+
" right_layer=naip_url,\n",
|
|
225
|
+
" left_label=\"Regularized Buildings\",\n",
|
|
226
|
+
" right_label=\"NAIP Imagery\",\n",
|
|
227
|
+
" left_args={\"style\": {\"color\": \"green\", \"fillOpacity\": 0.4}},\n",
|
|
228
|
+
" basemap=naip_url,\n",
|
|
158
229
|
")"
|
|
159
230
|
]
|
|
160
231
|
},
|
|
@@ -186,7 +257,23 @@
|
|
|
186
257
|
"outputs": [],
|
|
187
258
|
"source": [
|
|
188
259
|
"geoai.view_vector_interactive(\n",
|
|
189
|
-
" gdf_adaptive, style_kwds={\"color\": \"yellow\", \"fillOpacity\": 0}, tiles
|
|
260
|
+
" gdf_adaptive, style_kwds={\"color\": \"yellow\", \"fillOpacity\": 0.4}, tiles=naip_url\n",
|
|
261
|
+
")"
|
|
262
|
+
]
|
|
263
|
+
},
|
|
264
|
+
{
|
|
265
|
+
"cell_type": "code",
|
|
266
|
+
"execution_count": null,
|
|
267
|
+
"metadata": {},
|
|
268
|
+
"outputs": [],
|
|
269
|
+
"source": [
|
|
270
|
+
"geoai.create_split_map(\n",
|
|
271
|
+
" left_layer=gdf_adaptive,\n",
|
|
272
|
+
" right_layer=naip_url,\n",
|
|
273
|
+
" left_label=\"Adaptive Regularization Buildings\",\n",
|
|
274
|
+
" right_label=\"NAIP Imagery\",\n",
|
|
275
|
+
" left_args={\"style\": {\"color\": \"yellow\", \"fillOpacity\": 0.4}},\n",
|
|
276
|
+
" basemap=naip_url,\n",
|
|
190
277
|
")"
|
|
191
278
|
]
|
|
192
279
|
},
|
|
@@ -235,7 +322,7 @@
|
|
|
235
322
|
],
|
|
236
323
|
"metadata": {
|
|
237
324
|
"kernelspec": {
|
|
238
|
-
"display_name": "
|
|
325
|
+
"display_name": "geo",
|
|
239
326
|
"language": "python",
|
|
240
327
|
"name": "python3"
|
|
241
328
|
},
|
|
@@ -249,7 +336,7 @@
|
|
|
249
336
|
"name": "python",
|
|
250
337
|
"nbconvert_exporter": "python",
|
|
251
338
|
"pygments_lexer": "ipython3",
|
|
252
|
-
"version": "3.
|
|
339
|
+
"version": "3.12.2"
|
|
253
340
|
}
|
|
254
341
|
},
|
|
255
342
|
"nbformat": 4,
|
|
@@ -76,6 +76,14 @@ If you encounter issues with the sqlite package, you can update it using the fol
|
|
|
76
76
|
mamba update -c conda-forge sqlite
|
|
77
77
|
```
|
|
78
78
|
|
|
79
|
+
### Notes for Windows Users
|
|
80
|
+
|
|
81
|
+
If you use mamba to install geoai, you may not have the latest version of torchgeo, which may cause issues when importing geoai. To fix this, you can install the latest version of torchgeo using the following command:
|
|
82
|
+
|
|
83
|
+
```bash
|
|
84
|
+
pip install -U torchgeo
|
|
85
|
+
```
|
|
86
|
+
|
|
79
87
|
### 👩💻 Development Installation
|
|
80
88
|
|
|
81
89
|
For contributing to GeoAI development, install directly from the source repository:
|