Skip to content

Commit ad1d089

Browse files
committed
update docs
1 parent c48beda commit ad1d089

File tree

3 files changed

+456
-100
lines changed

3 files changed

+456
-100
lines changed

README.md

+139-22
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ $ pip install git+http://github.com/developmentseed/rio-stac
6161
"coordinates": [
6262
[
6363
[
64-
373185,
64+
373185.0,
6565
8019284.949381611
6666
],
6767
[
@@ -70,41 +70,158 @@ $ pip install git+http://github.com/developmentseed/rio-stac
7070
],
7171
[
7272
639014.9492102272,
73-
8286015
73+
8286015.0
7474
],
7575
[
76-
373185,
77-
8286015
76+
373185.0,
77+
8286015.0
7878
],
7979
[
80-
373185,
80+
373185.0,
8181
8019284.949381611
8282
]
8383
]
8484
]
8585
},
8686
"proj:bbox": [
87-
373185,
87+
373185.0,
8888
8019284.949381611,
8989
639014.9492102272,
90-
8286015
90+
8286015.0
9191
],
9292
"proj:shape": [
9393
2667,
9494
2658
9595
],
9696
"proj:transform": [
9797
100.01126757344893,
98-
0,
99-
373185,
100-
0,
98+
0.0,
99+
373185.0,
100+
0.0,
101101
-100.01126757344893,
102-
8286015,
103-
0,
104-
0,
105-
1
102+
8286015.0,
103+
0.0,
104+
0.0,
105+
1.0
106106
],
107-
"datetime": "2022-09-02T16:17:51.427680Z"
107+
"proj:projjson": {
108+
"$schema": "https://proj.org/schemas/v0.4/projjson.schema.json",
109+
"type": "ProjectedCRS",
110+
"name": "WGS 84 / UTM zone 21N",
111+
"base_crs": {
112+
"name": "WGS 84",
113+
"datum": {
114+
"type": "GeodeticReferenceFrame",
115+
"name": "World Geodetic System 1984",
116+
"ellipsoid": {
117+
"name": "WGS 84",
118+
"semi_major_axis": 6378137,
119+
"inverse_flattening": 298.257223563
120+
}
121+
},
122+
"coordinate_system": {
123+
"subtype": "ellipsoidal",
124+
"axis": [
125+
{
126+
"name": "Geodetic latitude",
127+
"abbreviation": "Lat",
128+
"direction": "north",
129+
"unit": "degree"
130+
},
131+
{
132+
"name": "Geodetic longitude",
133+
"abbreviation": "Lon",
134+
"direction": "east",
135+
"unit": "degree"
136+
}
137+
]
138+
},
139+
"id": {
140+
"authority": "EPSG",
141+
"code": 4326
142+
}
143+
},
144+
"conversion": {
145+
"name": "UTM zone 21N",
146+
"method": {
147+
"name": "Transverse Mercator",
148+
"id": {
149+
"authority": "EPSG",
150+
"code": 9807
151+
}
152+
},
153+
"parameters": [
154+
{
155+
"name": "Latitude of natural origin",
156+
"value": 0,
157+
"unit": "degree",
158+
"id": {
159+
"authority": "EPSG",
160+
"code": 8801
161+
}
162+
},
163+
{
164+
"name": "Longitude of natural origin",
165+
"value": -57,
166+
"unit": "degree",
167+
"id": {
168+
"authority": "EPSG",
169+
"code": 8802
170+
}
171+
},
172+
{
173+
"name": "Scale factor at natural origin",
174+
"value": 0.9996,
175+
"unit": "unity",
176+
"id": {
177+
"authority": "EPSG",
178+
"code": 8805
179+
}
180+
},
181+
{
182+
"name": "False easting",
183+
"value": 500000,
184+
"unit": "metre",
185+
"id": {
186+
"authority": "EPSG",
187+
"code": 8806
188+
}
189+
},
190+
{
191+
"name": "False northing",
192+
"value": 0,
193+
"unit": "metre",
194+
"id": {
195+
"authority": "EPSG",
196+
"code": 8807
197+
}
198+
}
199+
]
200+
},
201+
"coordinate_system": {
202+
"subtype": "Cartesian",
203+
"axis": [
204+
{
205+
"name": "Easting",
206+
"abbreviation": "",
207+
"direction": "east",
208+
"unit": "metre"
209+
},
210+
{
211+
"name": "Northing",
212+
"abbreviation": "",
213+
"direction": "north",
214+
"unit": "metre"
215+
}
216+
]
217+
},
218+
"id": {
219+
"authority": "EPSG",
220+
"code": 32621
221+
}
222+
},
223+
"proj:wkt2": "PROJCS[\"WGS 84 / UTM zone 21N\",GEOGCS[\"WGS 84\",DATUM[\"WGS_1984\",SPHEROID[\"WGS 84\",6378137,298.257223563,AUTHORITY[\"EPSG\",\"7030\"]],AUTHORITY[\"EPSG\",\"6326\"]],PRIMEM[\"Greenwich\",0,AUTHORITY[\"EPSG\",\"8901\"]],UNIT[\"degree\",0.0174532925199433,AUTHORITY[\"EPSG\",\"9122\"]],AUTHORITY[\"EPSG\",\"4326\"]],PROJECTION[\"Transverse_Mercator\"],PARAMETER[\"latitude_of_origin\",0],PARAMETER[\"central_meridian\",-57],PARAMETER[\"scale_factor\",0.9996],PARAMETER[\"false_easting\",500000],PARAMETER[\"false_northing\",0],UNIT[\"metre\",1,AUTHORITY[\"EPSG\",\"9001\"]],AXIS[\"Easting\",EAST],AXIS[\"Northing\",NORTH],AUTHORITY[\"EPSG\",\"32621\"]]",
224+
"datetime": "2023-12-08T09:30:38.153261Z"
108225
},
109226
"geometry": {
110227
"type": "Polygon",
@@ -140,20 +257,20 @@ $ pip install git+http://github.com/developmentseed/rio-stac
140257
"raster:bands": [
141258
{
142259
"data_type": "uint16",
143-
"scale": 1,
144-
"offset": 0,
260+
"scale": 1.0,
261+
"offset": 0.0,
145262
"sampling": "point",
146263
"statistics": {
147264
"mean": 2107.524612053134,
148265
"minimum": 1,
149266
"maximum": 7872,
150267
"stddev": 2271.0065537857326,
151-
"valid_percent": 9.564764936336924e-05
268+
"valid_percent": 0.00009564764936336924
152269
},
153270
"histogram": {
154271
"count": 11,
155-
"min": 1,
156-
"max": 7872,
272+
"min": 1.0,
273+
"max": 7872.0,
157274
"buckets": [
158275
503460,
159276
0,
@@ -185,9 +302,9 @@ $ pip install git+http://github.com/developmentseed/rio-stac
185302
74.62204314252978
186303
],
187304
"stac_extensions": [
188-
"https://stac-extensions.github.io/projection/v1.0.0/schema.json",
305+
"https://stac-extensions.github.io/projection/v1.1.0/schema.json",
189306
"https://stac-extensions.github.io/raster/v1.1.0/schema.json",
190-
"https://stac-extensions.github.io/eo/v1.0.0/schema.json"
307+
"https://stac-extensions.github.io/eo/v1.1.0/schema.json"
191308
]
192309
}
193310
```

docs/docs/examples/Multi_assets_item.ipynb

+22-17
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
},
1212
{
1313
"cell_type": "code",
14-
"execution_count": 1,
14+
"execution_count": 2,
1515
"id": "1a61b77d",
1616
"metadata": {},
1717
"outputs": [],
@@ -38,7 +38,7 @@
3838
},
3939
{
4040
"cell_type": "code",
41-
"execution_count": 2,
41+
"execution_count": 3,
4242
"id": "6650dbf2",
4343
"metadata": {},
4444
"outputs": [],
@@ -67,15 +67,15 @@
6767
"collection_url = None\n",
6868
"\n",
6969
"extensions =[\n",
70-
" f\"https://stac-extensions.github.io/projection/{PROJECTION_EXT_VERSION}/schema.json\", \n",
70+
" f\"https://stac-extensions.github.io/projection/{PROJECTION_EXT_VERSION}/schema.json\",\n",
7171
" f\"https://stac-extensions.github.io/raster/{RASTER_EXT_VERSION}/schema.json\",\n",
7272
" f\"https://stac-extensions.github.io/eo/{EO_EXT_VERSION}/schema.json\",\n",
7373
"]"
7474
]
7575
},
7676
{
7777
"cell_type": "code",
78-
"execution_count": 3,
78+
"execution_count": 4,
7979
"id": "f6c9c7c2",
8080
"metadata": {},
8181
"outputs": [
@@ -88,7 +88,7 @@
8888
" 'https://stac-extensions.github.io/eo/v1.1.0/schema.json']"
8989
]
9090
},
91-
"execution_count": 3,
91+
"execution_count": 4,
9292
"metadata": {},
9393
"output_type": "execute_result"
9494
}
@@ -133,13 +133,13 @@
133133
"\n",
134134
" pystac_assets.append(\n",
135135
" (\n",
136-
" asset[\"name\"], \n",
136+
" asset[\"name\"],\n",
137137
" pystac.Asset(\n",
138138
" href=asset[\"href\"] or src_dst.name,\n",
139139
" media_type=media_type,\n",
140140
" extra_fields={\n",
141141
" **proj_info,\n",
142-
" **raster_info, \n",
142+
" **raster_info,\n",
143143
" **eo_info\n",
144144
" },\n",
145145
" roles=asset[\"role\"],\n",
@@ -149,12 +149,12 @@
149149
"\n",
150150
"if img_datetimes and not input_datetime:\n",
151151
" input_datetime = img_datetimes[0]\n",
152-
" \n",
153-
"input_datetime = input_datetime or datetime.datetime.utcnow() \n",
152+
"\n",
153+
"input_datetime = input_datetime or datetime.datetime.utcnow()\n",
154154
"\n",
155155
"minx, miny, maxx, maxy = zip(*bboxes)\n",
156156
"bbox = [min(minx), min(miny), max(maxx), max(maxy)]\n",
157-
" \n",
157+
"\n",
158158
"# item\n",
159159
"item = pystac.Item(\n",
160160
" id=id,\n",
@@ -178,13 +178,13 @@
178178
"\n",
179179
"for key, asset in pystac_assets:\n",
180180
" item.add_asset(key=key, asset=asset)\n",
181-
" \n",
181+
"\n",
182182
"item.validate()"
183183
]
184184
},
185185
{
186186
"cell_type": "code",
187-
"execution_count": 4,
187+
"execution_count": 5,
188188
"id": "3ed579da",
189189
"metadata": {},
190190
"outputs": [
@@ -197,7 +197,7 @@
197197
" \"stac_version\": \"1.0.0\",\n",
198198
" \"id\": \"my_stac_item\",\n",
199199
" \"properties\": {\n",
200-
" \"datetime\": \"2023-05-26T09:17:50.081457Z\"\n",
200+
" \"datetime\": \"2023-12-08T09:55:37.520499Z\"\n",
201201
" },\n",
202202
" \"geometry\": {\n",
203203
" \"type\": \"Polygon\",\n",
@@ -213,11 +213,11 @@
213213
" ],\n",
214214
" [\n",
215215
" -10.874546803397616,\n",
216-
" 25.30462389154227\n",
216+
" 25.304623891542274\n",
217217
" ],\n",
218218
" [\n",
219219
" -11.979244865430262,\n",
220-
" 25.30462389154227\n",
220+
" 25.304623891542274\n",
221221
" ],\n",
222222
" [\n",
223223
" -11.979244865430262,\n",
@@ -396,6 +396,7 @@
396396
" \"code\": 32629\n",
397397
" }\n",
398398
" },\n",
399+
" \"proj:wkt2\": \"PROJCS[\\\"WGS 84 / UTM zone 29N\\\",GEOGCS[\\\"WGS 84\\\",DATUM[\\\"WGS_1984\\\",SPHEROID[\\\"WGS 84\\\",6378137,298.257223563,AUTHORITY[\\\"EPSG\\\",\\\"7030\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"6326\\\"]],PRIMEM[\\\"Greenwich\\\",0,AUTHORITY[\\\"EPSG\\\",\\\"8901\\\"]],UNIT[\\\"degree\\\",0.0174532925199433,AUTHORITY[\\\"EPSG\\\",\\\"9122\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"4326\\\"]],PROJECTION[\\\"Transverse_Mercator\\\"],PARAMETER[\\\"latitude_of_origin\\\",0],PARAMETER[\\\"central_meridian\\\",-9],PARAMETER[\\\"scale_factor\\\",0.9996],PARAMETER[\\\"false_easting\\\",500000],PARAMETER[\\\"false_northing\\\",0],UNIT[\\\"metre\\\",1,AUTHORITY[\\\"EPSG\\\",\\\"9001\\\"]],AXIS[\\\"Easting\\\",EAST],AXIS[\\\"Northing\\\",NORTH],AUTHORITY[\\\"EPSG\\\",\\\"32629\\\"]]\",\n",
399400
" \"raster:bands\": [\n",
400401
" {\n",
401402
" \"data_type\": \"uint16\",\n",
@@ -604,6 +605,7 @@
604605
" \"code\": 32629\n",
605606
" }\n",
606607
" },\n",
608+
" \"proj:wkt2\": \"PROJCS[\\\"WGS 84 / UTM zone 29N\\\",GEOGCS[\\\"WGS 84\\\",DATUM[\\\"WGS_1984\\\",SPHEROID[\\\"WGS 84\\\",6378137,298.257223563,AUTHORITY[\\\"EPSG\\\",\\\"7030\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"6326\\\"]],PRIMEM[\\\"Greenwich\\\",0,AUTHORITY[\\\"EPSG\\\",\\\"8901\\\"]],UNIT[\\\"degree\\\",0.0174532925199433,AUTHORITY[\\\"EPSG\\\",\\\"9122\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"4326\\\"]],PROJECTION[\\\"Transverse_Mercator\\\"],PARAMETER[\\\"latitude_of_origin\\\",0],PARAMETER[\\\"central_meridian\\\",-9],PARAMETER[\\\"scale_factor\\\",0.9996],PARAMETER[\\\"false_easting\\\",500000],PARAMETER[\\\"false_northing\\\",0],UNIT[\\\"metre\\\",1,AUTHORITY[\\\"EPSG\\\",\\\"9001\\\"]],AXIS[\\\"Easting\\\",EAST],AXIS[\\\"Northing\\\",NORTH],AUTHORITY[\\\"EPSG\\\",\\\"32629\\\"]]\",\n",
607609
" \"raster:bands\": [\n",
608610
" {\n",
609611
" \"data_type\": \"uint16\",\n",
@@ -812,6 +814,7 @@
812814
" \"code\": 32629\n",
813815
" }\n",
814816
" },\n",
817+
" \"proj:wkt2\": \"PROJCS[\\\"WGS 84 / UTM zone 29N\\\",GEOGCS[\\\"WGS 84\\\",DATUM[\\\"WGS_1984\\\",SPHEROID[\\\"WGS 84\\\",6378137,298.257223563,AUTHORITY[\\\"EPSG\\\",\\\"7030\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"6326\\\"]],PRIMEM[\\\"Greenwich\\\",0,AUTHORITY[\\\"EPSG\\\",\\\"8901\\\"]],UNIT[\\\"degree\\\",0.0174532925199433,AUTHORITY[\\\"EPSG\\\",\\\"9122\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"4326\\\"]],PROJECTION[\\\"Transverse_Mercator\\\"],PARAMETER[\\\"latitude_of_origin\\\",0],PARAMETER[\\\"central_meridian\\\",-9],PARAMETER[\\\"scale_factor\\\",0.9996],PARAMETER[\\\"false_easting\\\",500000],PARAMETER[\\\"false_northing\\\",0],UNIT[\\\"metre\\\",1,AUTHORITY[\\\"EPSG\\\",\\\"9001\\\"]],AXIS[\\\"Easting\\\",EAST],AXIS[\\\"Northing\\\",NORTH],AUTHORITY[\\\"EPSG\\\",\\\"32629\\\"]]\",\n",
815818
" \"raster:bands\": [\n",
816819
" {\n",
817820
" \"data_type\": \"uint16\",\n",
@@ -1020,6 +1023,7 @@
10201023
" \"code\": 32629\n",
10211024
" }\n",
10221025
" },\n",
1026+
" \"proj:wkt2\": \"PROJCS[\\\"WGS 84 / UTM zone 29N\\\",GEOGCS[\\\"WGS 84\\\",DATUM[\\\"WGS_1984\\\",SPHEROID[\\\"WGS 84\\\",6378137,298.257223563,AUTHORITY[\\\"EPSG\\\",\\\"7030\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"6326\\\"]],PRIMEM[\\\"Greenwich\\\",0,AUTHORITY[\\\"EPSG\\\",\\\"8901\\\"]],UNIT[\\\"degree\\\",0.0174532925199433,AUTHORITY[\\\"EPSG\\\",\\\"9122\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"4326\\\"]],PROJECTION[\\\"Transverse_Mercator\\\"],PARAMETER[\\\"latitude_of_origin\\\",0],PARAMETER[\\\"central_meridian\\\",-9],PARAMETER[\\\"scale_factor\\\",0.9996],PARAMETER[\\\"false_easting\\\",500000],PARAMETER[\\\"false_northing\\\",0],UNIT[\\\"metre\\\",1,AUTHORITY[\\\"EPSG\\\",\\\"9001\\\"]],AXIS[\\\"Easting\\\",EAST],AXIS[\\\"Northing\\\",NORTH],AUTHORITY[\\\"EPSG\\\",\\\"32629\\\"]]\",\n",
10231027
" \"raster:bands\": [\n",
10241028
" {\n",
10251029
" \"data_type\": \"uint16\",\n",
@@ -1228,6 +1232,7 @@
12281232
" \"code\": 32629\n",
12291233
" }\n",
12301234
" },\n",
1235+
" \"proj:wkt2\": \"PROJCS[\\\"WGS 84 / UTM zone 29N\\\",GEOGCS[\\\"WGS 84\\\",DATUM[\\\"WGS_1984\\\",SPHEROID[\\\"WGS 84\\\",6378137,298.257223563,AUTHORITY[\\\"EPSG\\\",\\\"7030\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"6326\\\"]],PRIMEM[\\\"Greenwich\\\",0,AUTHORITY[\\\"EPSG\\\",\\\"8901\\\"]],UNIT[\\\"degree\\\",0.0174532925199433,AUTHORITY[\\\"EPSG\\\",\\\"9122\\\"]],AUTHORITY[\\\"EPSG\\\",\\\"4326\\\"]],PROJECTION[\\\"Transverse_Mercator\\\"],PARAMETER[\\\"latitude_of_origin\\\",0],PARAMETER[\\\"central_meridian\\\",-9],PARAMETER[\\\"scale_factor\\\",0.9996],PARAMETER[\\\"false_easting\\\",500000],PARAMETER[\\\"false_northing\\\",0],UNIT[\\\"metre\\\",1,AUTHORITY[\\\"EPSG\\\",\\\"9001\\\"]],AXIS[\\\"Easting\\\",EAST],AXIS[\\\"Northing\\\",NORTH],AUTHORITY[\\\"EPSG\\\",\\\"32629\\\"]]\",\n",
12311236
" \"raster:bands\": [\n",
12321237
" {\n",
12331238
" \"data_type\": \"uint16\",\n",
@@ -1273,7 +1278,7 @@
12731278
" -11.979244865430262,\n",
12741279
" 24.296321392464336,\n",
12751280
" -10.874546803397616,\n",
1276-
" 25.30462389154227\n",
1281+
" 25.304623891542274\n",
12771282
" ],\n",
12781283
" \"stac_extensions\": [\n",
12791284
" \"https://stac-extensions.github.io/projection/v1.1.0/schema.json\",\n",
@@ -1315,7 +1320,7 @@
13151320
"name": "python",
13161321
"nbconvert_exporter": "python",
13171322
"pygments_lexer": "ipython3",
1318-
"version": "3.9.13"
1323+
"version": "3.9.18"
13191324
}
13201325
},
13211326
"nbformat": 4,

0 commit comments

Comments
 (0)