@@ -181,6 +181,11 @@ class ResultDescriptor: # pylint: disable=too-few-public-methods
181181 Base class for result descriptors
182182 '''
183183
184+ __spatial_reference : str
185+
186+ def __init__ (self , spatial_reference : str ) -> None :
187+ self .__spatial_reference = spatial_reference
188+
184189 @staticmethod
185190 def from_response (response : Dict [str , Any ]) -> None :
186191 '''
@@ -226,20 +231,25 @@ def is_plot_result(cls) -> bool:
226231
227232 return False
228233
234+ @property
235+ def spatial_reference (self ) -> str :
236+ '''Return the spatial reference'''
237+
238+ return self .__spatial_reference
239+
229240
230241class VectorResultDescriptor (ResultDescriptor ):
231242 '''
232243 A vector result descriptor
233244 '''
234245
235246 __data_type : str
236- __spatial_reference : str
237247 __columns : Dict [str , str ]
238248
239249 def __init__ (self , response : Dict [str , Any ]) -> None :
240250 '''Initialize a new `VectorResultDescriptor`'''
251+ super ().__init__ (response ['spatialReference' ])
241252 self .__data_type = response ['dataType' ]
242- self .__spatial_reference = response ['spatialReference' ]
243253 self .__columns = response ['columns' ]
244254
245255 def __repr__ (self ) -> str :
@@ -269,7 +279,7 @@ def data_type(self) -> str:
269279 def spatial_reference (self ) -> str :
270280 '''Return the spatial reference'''
271281
272- return self . __spatial_reference
282+ return super (). spatial_reference
273283
274284 @property
275285 def columns (self ) -> Dict [str , str ]:
@@ -284,14 +294,13 @@ class RasterResultDescriptor(ResultDescriptor):
284294 '''
285295
286296 __data_type : str
287- __spatial_reference : str
288297 __measurement : str
289298 __no_data_value : str
290299
291300 def __init__ (self , response : Dict [str , Any ]) -> None :
292301 '''Initialize a new `RasterResultDescriptor`'''
302+ super ().__init__ (response ['spatialReference' ])
293303 self .__data_type = response ['dataType' ]
294- self .__spatial_reference = response ['spatialReference' ]
295304 self .__measurement = response ['measurement' ]
296305 self .__no_data_value = response ['noDataValue' ]
297306
@@ -313,10 +322,6 @@ def is_raster_result(cls) -> bool:
313322 def data_type (self ) -> str :
314323 return self .__data_type
315324
316- @property
317- def spatial_reference (self ) -> str :
318- return self .__spatial_reference
319-
320325 @property
321326 def measurement (self ) -> str :
322327 return self .__measurement
@@ -325,15 +330,23 @@ def measurement(self) -> str:
325330 def no_data_value (self ) -> str :
326331 return self .__no_data_value
327332
333+ @property
334+ def spatial_reference (self ) -> str :
335+ '''Return the spatial reference'''
336+
337+ return super ().spatial_reference
338+
328339
329340class PlotResultDescriptor (ResultDescriptor ):
330341 '''
331342 A plot result descriptor
332343 '''
333344
334- def __init__ (self , _response : Dict [str , Any ]) -> None :
345+ def __init__ (self , response : Dict [str , Any ]) -> None :
335346 '''Initialize a new `PlotResultDescriptor`'''
336347
348+ super ().__init__ (response ['spatialReference' ])
349+
337350 def __repr__ (self ) -> str :
338351 '''Display representation of the plot result descriptor'''
339352 r = 'Plot Result'
@@ -344,6 +357,12 @@ def __repr__(self) -> str:
344357 def is_plot_result (cls ) -> bool :
345358 return True
346359
360+ @property
361+ def spatial_reference (self ) -> str :
362+ '''Return the spatial reference'''
363+
364+ return super ().spatial_reference
365+
347366
348367class VectorDataType (Enum ):
349368 '''An enum of vector data types'''
0 commit comments