Skip to content

Commit f785e67

Browse files
Merge #35
35: re-use server url for easier example r=jdroenner a=ChristianBeilschmidt Co-authored-by: Christian Beilschmidt <[email protected]>
2 parents 859e4f5 + 62eb426 commit f785e67

File tree

4 files changed

+58
-39
lines changed

4 files changed

+58
-39
lines changed

examples/wms.ipynb

Lines changed: 45 additions & 38 deletions
Large diffs are not rendered by default.

geoengine/auth.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def __init__(self, server_url: str, credentials: Tuple[str, str] = None) -> None
6969
self.__server_url = server_url
7070

7171
def __repr__(self) -> str:
72+
'''Display representation of a session'''
7273
r = ''
7374
r += f'Server: {self.server_url}\n'
7475
r += f'Session Id: {self.__id}\n'

geoengine/datasets.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,6 +250,7 @@ def __repr__(self) -> str:
250250
return str(self)
251251

252252
def __eq__(self, other) -> bool:
253+
'''Checks if two upload ids are equal'''
253254
if not isinstance(other, self.__class__):
254255
return False
255256

geoengine/types.py

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ def __init__(self,
2929
time_interval: Tuple[datetime, datetime],
3030
resolution: Tuple[float, float] = (0.1, 0.1),
3131
srs='EPSG:4326') -> None:
32+
'''Initialize a new `QueryRectangle` object'''
3233
xmin = spatial_bounds[0]
3334
ymin = spatial_bounds[1]
3435
xmax = spatial_bounds[2]
@@ -236,11 +237,13 @@ class VectorResultDescriptor(ResultDescriptor):
236237
__columns: Dict[str, str]
237238

238239
def __init__(self, response: Dict[str, Any]) -> None:
240+
'''Initialize a new `VectorResultDescriptor`'''
239241
self.__data_type = response['dataType']
240242
self.__spatial_reference = response['spatialReference']
241243
self.__columns = response['columns']
242244

243245
def __repr__(self) -> str:
246+
'''Display representation of the vector result descriptor'''
244247
r = ''
245248
r += f'Data type: {self.data_type}\n'
246249
r += f'Spatial Reference: {self.spatial_reference}\n'
@@ -286,12 +289,14 @@ class RasterResultDescriptor(ResultDescriptor):
286289
__no_data_value: str
287290

288291
def __init__(self, response: Dict[str, Any]) -> None:
292+
'''Initialize a new `RasterResultDescriptor`'''
289293
self.__data_type = response['dataType']
290294
self.__spatial_reference = response['spatialReference']
291295
self.__measurement = response['measurement']
292296
self.__no_data_value = response['noDataValue']
293297

294298
def __repr__(self) -> str:
299+
'''Display representation of the raster result descriptor'''
295300
r = ''
296301
r += f'Data type: {self.data_type}\n'
297302
r += f'Spatial Reference: {self.spatial_reference}\n'
@@ -327,9 +332,10 @@ class PlotResultDescriptor(ResultDescriptor):
327332
'''
328333

329334
def __init__(self, _response: Dict[str, Any]) -> None:
330-
pass
335+
'''Initialize a new `PlotResultDescriptor`'''
331336

332337
def __repr__(self) -> str:
338+
'''Display representation of the plot result descriptor'''
333339
r = 'Plot Result'
334340

335341
return r
@@ -453,9 +459,11 @@ def __str__(self) -> str:
453459
return str(self.__dataset_id)
454460

455461
def __repr__(self) -> str:
462+
'''Display representation of an internal dataset id'''
456463
return str(self)
457464

458465
def __eq__(self, other) -> bool:
466+
'''Check if two internal dataset ids are equal'''
459467
if not isinstance(other, self.__class__):
460468
return False
461469

@@ -489,9 +497,11 @@ def __str__(self) -> str:
489497
return f'{self.__provider_id}:{self.__dataset_id}'
490498

491499
def __repr__(self) -> str:
500+
'''Display representation of an external dataset id'''
492501
return str(self)
493502

494503
def __eq__(self, other) -> bool:
504+
'''Check if two external dataset ids are equal'''
495505
if not isinstance(other, self.__class__):
496506
return False
497507

0 commit comments

Comments
 (0)