CNES / rastertools

Python and CLI tools for radiometric indices and zonal statistics computation on raster imagery.
Apache License 2.0
1 stars 2 forks source link

add setter to attribute radius to make it modifiable #6

Closed erblanm closed 3 weeks ago

erblanm commented 3 weeks ago

In hillshade.py we can encounter an error at self.radius = optimal_radius. In object-oriented programming language as python, setting a new value to a private class attribute (decorator @property) is possible if the attribute has a setter defined (decorator @attr.setter). As self.radius is the only attribute which is modified in peculiar cases, we never encountered this error before.

After testing this solution I encounter no more error

erblanm commented 3 weeks ago

Indeed it is a lot more simple !