geoai-py 0.5.3__tar.gz → 0.5.5__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.5.3 → geoai_py-0.5.5}/.github/workflows/docs-build.yml +1 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/.github/workflows/docs.yml +1 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/.github/workflows/ubuntu.yml +2 -1
- {geoai_py-0.5.3 → geoai_py-0.5.5}/.gitignore +1 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/PKG-INFO +3 -3
- geoai_py-0.5.5/docs/examples/regularization.ipynb +185 -0
- geoai_py-0.5.5/docs/workshops/GeoAI_Workshop_2025.ipynb +1328 -0
- geoai_py-0.5.5/docs/workshops/jupytext.toml +1 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai/__init__.py +1 -1
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai/download.py +2 -2
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai/geoai.py +2 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai/utils.py +97 -1
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai_py.egg-info/PKG-INFO +3 -3
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai_py.egg-info/SOURCES.txt +3 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai_py.egg-info/requires.txt +1 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/mkdocs.yml +13 -16
- {geoai_py-0.5.3 → geoai_py-0.5.5}/pyproject.toml +3 -4
- {geoai_py-0.5.3 → geoai_py-0.5.5}/requirements.txt +1 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/.editorconfig +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/.github/FUNDING.yml +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/.github/ISSUE_TEMPLATE/config.yml +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/.github/dependabot.yml +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/.github/workflows/macos.yml +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/.github/workflows/pypi.yml +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/.github/workflows/windows.yml +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/.pre-commit-config.yaml +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/LICENSE +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/MANIFEST.in +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/README.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/CNAME +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/assets/logo.ico +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/assets/logo.png +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/assets/logo_rect.png +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/changelog.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/classify.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/contributing.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/download.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/_template.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/building_footprints_africa.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/building_footprints_china.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/building_footprints_usa.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/building_regularization.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/car_detection.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/create_vector.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/data_visualization.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/dataviz/lidar_viz.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/dataviz/raster_viz.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/dataviz/vector_viz.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/download_data.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/download_sentinel2.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/edit_vector.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/geometric_properties.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/image_chips.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/jupytext.toml +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/parking_spot_detection.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/planetary_computer.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/rastervision/semantic_segmentation.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/samgeo/arcgis.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/samgeo/automatic_mask_generator.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/samgeo/automatic_mask_generator_hq.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/samgeo/box_prompts.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/samgeo/fast_sam.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/samgeo/input_prompts.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/samgeo/input_prompts_hq.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/samgeo/maxar_open_data.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/samgeo/satellite-predictor.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/samgeo/satellite.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/samgeo/swimming_pools.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/samgeo/text_prompts.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/samgeo/text_prompts_batch.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/ship_detection.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/solar_panel_detection.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/text_prompt_segmentation.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/train_building_footprints_usa.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/train_car_detection.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/train_object_detection_model.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/train_ship_detection.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/train_solar_panel_detection.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/train_water_detection.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/view_metadata.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/examples/wetland_mapping.ipynb +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/extract.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/faq.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/geoai.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/hf.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/index.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/installation.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/overrides/main.html +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/segment.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/segmentation.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/train.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/usage.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/docs/utils.md +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai/classify.py +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai/extract.py +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai/hf.py +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai/segment.py +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai/segmentation.py +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai/train.py +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai_py.egg-info/dependency_links.txt +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai_py.egg-info/entry_points.txt +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/geoai_py.egg-info/top_level.txt +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/requirements_docs.txt +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/setup.cfg +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/tests/__init__.py +0 -0
- {geoai_py-0.5.3 → geoai_py-0.5.5}/tests/test_geoai.py +0 -0
|
@@ -14,7 +14,7 @@ jobs:
|
|
|
14
14
|
strategy:
|
|
15
15
|
fail-fast: false
|
|
16
16
|
matrix:
|
|
17
|
-
python-version: ["3.
|
|
17
|
+
python-version: ["3.10", "3.11", "3.12"]
|
|
18
18
|
|
|
19
19
|
steps:
|
|
20
20
|
- uses: actions/checkout@v4
|
|
@@ -37,6 +37,7 @@ jobs:
|
|
|
37
37
|
run: |
|
|
38
38
|
uv pip install --find-links https://girder.github.io/large_image_wheels gdal pyproj
|
|
39
39
|
uv pip install pytest
|
|
40
|
+
uv pip install "geoai-py[extra]"
|
|
40
41
|
|
|
41
42
|
- name: Test import
|
|
42
43
|
run: |
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: geoai-py
|
|
3
|
-
Version: 0.5.
|
|
3
|
+
Version: 0.5.5
|
|
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
|
|
@@ -9,15 +9,15 @@ Keywords: geoai
|
|
|
9
9
|
Classifier: Intended Audience :: Developers
|
|
10
10
|
Classifier: License :: OSI Approved :: MIT License
|
|
11
11
|
Classifier: Natural Language :: English
|
|
12
|
-
Classifier: Programming Language :: Python :: 3.9
|
|
13
12
|
Classifier: Programming Language :: Python :: 3.10
|
|
14
13
|
Classifier: Programming Language :: Python :: 3.11
|
|
15
14
|
Classifier: Programming Language :: Python :: 3.12
|
|
16
15
|
Classifier: Programming Language :: Python :: 3.13
|
|
17
|
-
Requires-Python: >=3.
|
|
16
|
+
Requires-Python: >=3.10
|
|
18
17
|
Description-Content-Type: text/markdown
|
|
19
18
|
License-File: LICENSE
|
|
20
19
|
Requires-Dist: albumentations
|
|
20
|
+
Requires-Dist: buildingregulariser
|
|
21
21
|
Requires-Dist: contextily
|
|
22
22
|
Requires-Dist: geopandas
|
|
23
23
|
Requires-Dist: huggingface_hub
|
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
{
|
|
2
|
+
"cells": [
|
|
3
|
+
{
|
|
4
|
+
"cell_type": "markdown",
|
|
5
|
+
"metadata": {},
|
|
6
|
+
"source": [
|
|
7
|
+
"# Regularization\n",
|
|
8
|
+
"\n",
|
|
9
|
+
"[](https://colab.research.google.com/github/opengeos/geoai/blob/main/docs/examples/regularization.ipynb)\n",
|
|
10
|
+
"\n",
|
|
11
|
+
"This example demonstrates how to regularize building footprints using the `regularize` function from the `geoai` package. The function is a wrapper around the `regularize_geodataframe` function from the [buildingregulariser](https://github.com/DPIRD-DMA/Building-Regulariser) package. Credits to the original author, Nick Wright.\n",
|
|
12
|
+
"\n",
|
|
13
|
+
"It can be used to regularize features such as building footprints, solar panels, cars, and other objects that have a regular shape.\n",
|
|
14
|
+
"\n",
|
|
15
|
+
"## Install package\n",
|
|
16
|
+
"To use the `geoai-py` package, ensure it is installed in your environment. Uncomment the command below if needed."
|
|
17
|
+
]
|
|
18
|
+
},
|
|
19
|
+
{
|
|
20
|
+
"cell_type": "code",
|
|
21
|
+
"execution_count": null,
|
|
22
|
+
"metadata": {},
|
|
23
|
+
"outputs": [],
|
|
24
|
+
"source": [
|
|
25
|
+
"# %pip install geoai-py"
|
|
26
|
+
]
|
|
27
|
+
},
|
|
28
|
+
{
|
|
29
|
+
"cell_type": "markdown",
|
|
30
|
+
"metadata": {},
|
|
31
|
+
"source": [
|
|
32
|
+
"## Import libraries"
|
|
33
|
+
]
|
|
34
|
+
},
|
|
35
|
+
{
|
|
36
|
+
"cell_type": "code",
|
|
37
|
+
"execution_count": null,
|
|
38
|
+
"metadata": {},
|
|
39
|
+
"outputs": [],
|
|
40
|
+
"source": [
|
|
41
|
+
"import geoai"
|
|
42
|
+
]
|
|
43
|
+
},
|
|
44
|
+
{
|
|
45
|
+
"cell_type": "markdown",
|
|
46
|
+
"metadata": {},
|
|
47
|
+
"source": [
|
|
48
|
+
"## Use sample data"
|
|
49
|
+
]
|
|
50
|
+
},
|
|
51
|
+
{
|
|
52
|
+
"cell_type": "code",
|
|
53
|
+
"execution_count": null,
|
|
54
|
+
"metadata": {},
|
|
55
|
+
"outputs": [],
|
|
56
|
+
"source": [
|
|
57
|
+
"raster_url = (\n",
|
|
58
|
+
" \"https://huggingface.co/datasets/giswqs/geospatial/resolve/main/naip_train.tif\"\n",
|
|
59
|
+
")\n",
|
|
60
|
+
"vector_url = \"https://huggingface.co/datasets/giswqs/geospatial/resolve/main/buildings_original.geojson\""
|
|
61
|
+
]
|
|
62
|
+
},
|
|
63
|
+
{
|
|
64
|
+
"cell_type": "markdown",
|
|
65
|
+
"metadata": {},
|
|
66
|
+
"source": [
|
|
67
|
+
"## Visualize data"
|
|
68
|
+
]
|
|
69
|
+
},
|
|
70
|
+
{
|
|
71
|
+
"cell_type": "code",
|
|
72
|
+
"execution_count": null,
|
|
73
|
+
"metadata": {},
|
|
74
|
+
"outputs": [],
|
|
75
|
+
"source": [
|
|
76
|
+
"geoai.view_vector_interactive(vector_url, tiles=raster_url)"
|
|
77
|
+
]
|
|
78
|
+
},
|
|
79
|
+
{
|
|
80
|
+
"cell_type": "markdown",
|
|
81
|
+
"metadata": {},
|
|
82
|
+
"source": [
|
|
83
|
+
"## Regularize buildings"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"cell_type": "code",
|
|
88
|
+
"execution_count": null,
|
|
89
|
+
"metadata": {},
|
|
90
|
+
"outputs": [],
|
|
91
|
+
"source": [
|
|
92
|
+
"gdf = geoai.regularize(\n",
|
|
93
|
+
" data=vector_url,\n",
|
|
94
|
+
" simplify_tolerance=2.0,\n",
|
|
95
|
+
" allow_45_degree=True,\n",
|
|
96
|
+
" diagonal_threshold_reduction=30,\n",
|
|
97
|
+
" allow_circles=True,\n",
|
|
98
|
+
" circle_threshold=0.9,\n",
|
|
99
|
+
")"
|
|
100
|
+
]
|
|
101
|
+
},
|
|
102
|
+
{
|
|
103
|
+
"cell_type": "code",
|
|
104
|
+
"execution_count": null,
|
|
105
|
+
"metadata": {},
|
|
106
|
+
"outputs": [],
|
|
107
|
+
"source": [
|
|
108
|
+
"geoai.view_vector_interactive(gdf, tiles=raster_url)"
|
|
109
|
+
]
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
"cell_type": "code",
|
|
113
|
+
"execution_count": null,
|
|
114
|
+
"metadata": {},
|
|
115
|
+
"outputs": [],
|
|
116
|
+
"source": [
|
|
117
|
+
"geoai.create_split_map(\n",
|
|
118
|
+
" left_layer=gdf,\n",
|
|
119
|
+
" right_layer=raster_url,\n",
|
|
120
|
+
" left_label=\"Regularized Buildings\",\n",
|
|
121
|
+
" right_label=\"NAIP Imagery\",\n",
|
|
122
|
+
" left_args={\"style\": {\"color\": \"red\", \"fillOpacity\": 0.3}},\n",
|
|
123
|
+
" basemap=raster_url,\n",
|
|
124
|
+
")"
|
|
125
|
+
]
|
|
126
|
+
},
|
|
127
|
+
{
|
|
128
|
+
"cell_type": "markdown",
|
|
129
|
+
"metadata": {},
|
|
130
|
+
"source": [
|
|
131
|
+
"## Compare results"
|
|
132
|
+
]
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
"cell_type": "code",
|
|
136
|
+
"execution_count": null,
|
|
137
|
+
"metadata": {},
|
|
138
|
+
"outputs": [],
|
|
139
|
+
"source": [
|
|
140
|
+
"import leafmap.foliumap as leafmap"
|
|
141
|
+
]
|
|
142
|
+
},
|
|
143
|
+
{
|
|
144
|
+
"cell_type": "code",
|
|
145
|
+
"execution_count": null,
|
|
146
|
+
"metadata": {},
|
|
147
|
+
"outputs": [],
|
|
148
|
+
"source": [
|
|
149
|
+
"m = leafmap.Map()\n",
|
|
150
|
+
"m.add_cog_layer(raster_url, name=\"NAIP\")\n",
|
|
151
|
+
"m.add_vector(\n",
|
|
152
|
+
" vector_url, style={\"color\": \"yellow\", \"fillOpacity\": 0}, layer_name=\"Original\"\n",
|
|
153
|
+
")\n",
|
|
154
|
+
"m.add_gdf(gdf, style={\"color\": \"red\", \"fillOpacity\": 0}, layer_name=\"Regularized\")\n",
|
|
155
|
+
"legend = {\n",
|
|
156
|
+
" \"Original\": \"yellow\",\n",
|
|
157
|
+
" \"Regularized\": \"red\",\n",
|
|
158
|
+
"}\n",
|
|
159
|
+
"m.add_legend(title=\"Building Footprints\", legend_dict=legend)\n",
|
|
160
|
+
"m"
|
|
161
|
+
]
|
|
162
|
+
}
|
|
163
|
+
],
|
|
164
|
+
"metadata": {
|
|
165
|
+
"kernelspec": {
|
|
166
|
+
"display_name": "geo",
|
|
167
|
+
"language": "python",
|
|
168
|
+
"name": "python3"
|
|
169
|
+
},
|
|
170
|
+
"language_info": {
|
|
171
|
+
"codemirror_mode": {
|
|
172
|
+
"name": "ipython",
|
|
173
|
+
"version": 3
|
|
174
|
+
},
|
|
175
|
+
"file_extension": ".py",
|
|
176
|
+
"mimetype": "text/x-python",
|
|
177
|
+
"name": "python",
|
|
178
|
+
"nbconvert_exporter": "python",
|
|
179
|
+
"pygments_lexer": "ipython3",
|
|
180
|
+
"version": "3.12.9"
|
|
181
|
+
}
|
|
182
|
+
},
|
|
183
|
+
"nbformat": 4,
|
|
184
|
+
"nbformat_minor": 2
|
|
185
|
+
}
|