Skip to content

Commit 3c830a4

Browse files
jsignellgadomski
andauthored
[DOCS] Fix geometry object creation (#484)
* Fix geometry object creation * Just use shell * Remove comma * Update changelog --------- Co-authored-by: Pete Gadomski <[email protected]>
1 parent 6d56261 commit 3c830a4

File tree

2 files changed

+27
-14
lines changed

2 files changed

+27
-14
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.
1717

1818
- `query` parameter in GET requests [#362](https://github.com/stac-utils/pystac-client/pull/362)
1919
- Double encoding of `intersects` parameter in GET requests [#362](https://github.com/stac-utils/pystac-client/pull/362)
20+
- Fix geometry instantiation in item-search-intersects.ipynb [#484](https://github.com/stac-utils/pystac-client/pull/484)
2021

2122
## [v0.6.1] - 2023-03-14
2223

docs/tutorials/item-search-intersects.ipynb

Lines changed: 26 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@
2424
"cell_type": "code",
2525
"execution_count": null,
2626
"id": "98942e75",
27-
"metadata": {},
27+
"metadata": {
28+
"tags": []
29+
},
2830
"outputs": [],
2931
"source": [
3032
"from pystac_client import Client\n",
@@ -69,7 +71,9 @@
6971
"cell_type": "code",
7072
"execution_count": null,
7173
"id": "d8af6334",
72-
"metadata": {},
74+
"metadata": {
75+
"tags": []
76+
},
7377
"outputs": [],
7478
"source": [
7579
"# AOI around Delfzijl, in northern Netherlands\n",
@@ -122,7 +126,9 @@
122126
"cell_type": "code",
123127
"execution_count": null,
124128
"id": "9a7c9336",
125-
"metadata": {},
129+
"metadata": {
130+
"tags": []
131+
},
126132
"outputs": [],
127133
"source": [
128134
"aoi_as_str: str = json.dumps(aoi_as_dict)\n",
@@ -138,7 +144,7 @@
138144
},
139145
{
140146
"cell_type": "markdown",
141-
"id": "9da4956b",
147+
"id": "f22ffb5a",
142148
"metadata": {},
143149
"source": [
144150
"## Item Search with AOI as a Shapely Geometry Object"
@@ -147,8 +153,10 @@
147153
{
148154
"cell_type": "code",
149155
"execution_count": null,
150-
"id": "9a7c9336",
151-
"metadata": {},
156+
"id": "a44598ef",
157+
"metadata": {
158+
"tags": []
159+
},
152160
"outputs": [],
153161
"source": [
154162
"import shapely.geometry\n",
@@ -176,7 +184,7 @@
176184
},
177185
{
178186
"cell_type": "markdown",
179-
"id": "9da4956b",
187+
"id": "8f236254",
180188
"metadata": {},
181189
"source": [
182190
"## Item Search with AOI as a \"geojson\" library object"
@@ -185,8 +193,10 @@
185193
{
186194
"cell_type": "code",
187195
"execution_count": null,
188-
"id": "9a7c9336",
189-
"metadata": {},
196+
"id": "84ce4395",
197+
"metadata": {
198+
"tags": []
199+
},
190200
"outputs": [],
191201
"source": [
192202
"import geojson\n",
@@ -204,7 +214,7 @@
204214
},
205215
{
206216
"cell_type": "markdown",
207-
"id": "9da4956b",
217+
"id": "3fe9c255",
208218
"metadata": {},
209219
"source": [
210220
"## Item Search with AOI as a pygeoif Object"
@@ -214,11 +224,13 @@
214224
"cell_type": "code",
215225
"execution_count": null,
216226
"id": "a27dcb72",
217-
"metadata": {},
227+
"metadata": {
228+
"tags": []
229+
},
218230
"outputs": [],
219231
"source": [
220232
"import pygeoif\n",
221-
"aoi_as_pygeoif_polygon = pygeoif.geometry.Polygon(aoi_as_dict[\"coordinates\"])\n",
233+
"aoi_as_pygeoif_polygon = pygeoif.geometry.Polygon(aoi_as_dict[\"coordinates\"][0])\n",
222234
"\n",
223235
"search = client.search(\n",
224236
" max_items = 25,\n",
@@ -235,7 +247,7 @@
235247
"hash": "6b6313dbab648ff537330b996f33bf845c0da10ea77ae70864d6ca8e2699c7ea"
236248
},
237249
"kernelspec": {
238-
"display_name": "Python 3.9.11 ('.venv': venv)",
250+
"display_name": "Python 3 (ipykernel)",
239251
"language": "python",
240252
"name": "python3"
241253
},
@@ -249,7 +261,7 @@
249261
"name": "python",
250262
"nbconvert_exporter": "python",
251263
"pygments_lexer": "ipython3",
252-
"version": "3.9.11"
264+
"version": "3.11.3"
253265
}
254266
},
255267
"nbformat": 4,

0 commit comments

Comments
 (0)