@@ -211,7 +211,7 @@ OGC API - Features - Part 1: Core 1.0
211
211
>> > w.url
212
212
' https://demo.pygeoapi.io/master'
213
213
>> > conformance = w.conformance()
214
- {u ' conformsTo' : [u ' http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core' , u ' http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30' , u ' http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html' , u ' http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson' ]}
214
+ {' conformsTo' : [' http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core' , ' http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30' , ' http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html' , ' http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson' ]}
215
215
>> > api = w.api() # OpenAPI document/
216
216
>> > collections = w.collections()
217
217
>> > len (collections[' collections' ])
@@ -231,7 +231,11 @@ OGC API - Features - Part 1: Core 1.0
231
231
6
232
232
>> > lakes_query = w.collection_items(' lakes' )
233
233
>> > lakes_query[' features' ][0 ][' properties' ]
234
- {u ' scalerank' : 0 , u ' name_alt' : None , u ' admin' : None , u ' featureclass' : u ' Lake' , u ' id' : 0 , u ' name' : u ' Lake Baikal' }
234
+ {' scalerank' : 0 , ' name_alt' : None , ' admin' : None , ' featureclass' : ' Lake' , ' id' : 0 , ' name' : ' Lake Baikal' }
235
+ >> > lakes_query = w.collection_items(' lakes' , name = ' L. Ontario' )
236
+ >> > len (lakes_querylakes_query[' features' ][0 ][' properties' ]
237
+ {' id' : 0 , ' scalerank' : 0 , ' name' : ' Lake Baikal' , ' name_alt' : ' https://en.wikipedia.org/wiki/Lake_Baikal' , ' admin' : None , ' featureclass' : ' Lake' }
238
+
235
239
236
240
OGC API - Coverages - Part 1 : Core 1.0
237
241
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
@@ -275,7 +279,7 @@ OGC API - Records - Part 1: Core 1.0
275
279
>>> w.url
276
280
'https://example.org/records-api'
277
281
>>> conformance = w.conformance()
278
- {'conformsTo': [u 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core', u 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30', u 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html', u 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson', u 'http://www.opengis.net/spec/ogcapi-records-1/1.0/req/core', u 'http://www.opengis.net/spec/ogcapi-records/1.0/req/oas30', u 'http://www.opengis.net/spec/ogcapi-records-1/1.0/req/json', u 'http://www.opengis.net/spec/ogcapi-records-1/1.0/req/html']}
282
+ {'conformsTo': ['http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/core', 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/oas30', 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/html', 'http://www.opengis.net/spec/ogcapi-features-1/1.0/conf/geojson', 'http://www.opengis.net/spec/ogcapi-records-1/1.0/req/core', 'http://www.opengis.net/spec/ogcapi-records/1.0/req/oas30', 'http://www.opengis.net/spec/ogcapi-records-1/1.0/req/json', 'http://www.opengis.net/spec/ogcapi-records-1/1.0/req/html']}
279
283
>>> api = w.api() # OpenAPI document
280
284
>>> collections = w.collections()
281
285
>>> len (collections)
@@ -295,20 +299,20 @@ OGC API - Records - Part 1: Core 1.0
295
299
8
296
300
>>> my_catalogue_query = w.collection_items(' my-catalogue' )
297
301
>>> my_catalogue_query[' features' ][0 ][' properties' ].keys()
298
- [u 'title', u 'abstract', u 'keywords']
302
+ ['title', 'abstract', 'keywords']
299
303
>>> my_catalogue_query[' features' ][0 ][' properties' ][' title' ]
300
- u 'Roadrunner ambush locations'
304
+ 'Roadrunner ambush locations'
301
305
>>> my_catalogue_query2 = w.collection_items(' my-catalogue' , q = ' birds' )
302
306
>>> msc_wis_dcpc_query2[' numberMatched' ]
303
307
2
304
308
>>> msc_wis_dcpc_query2[' numberReturned' ]
305
309
2
306
310
>>> my_catalogue_cql_text_query = w.collection_items(' my-catalogue' , filter = " title LIKE 'Roadrunner%'" )
307
311
>>> my_catalogue_cql_text_query[' features' ][0 ][' properties' ][' title' ]
308
- u 'Roadrunner ambush locations'
312
+ 'Roadrunner ambush locations'
309
313
>>> my_catalogue_cql_json_query = w.collection_items(' my-catalogue' , limit = 1 , cql = {' eq' : [{ ' property' : ' title' }, ' Roadrunner ambush locations' ]})
310
314
>>> my_catalogue_cql_json_query[' features' ][0 ][' properties' ][' title' ]
311
- u 'Roadrunner ambush locations'
315
+ 'Roadrunner ambush locations'
312
316
313
317
>>> import json
314
318
0 commit comments