locationtech-labs / geopyspark

GeoTrellis for PySpark
Other
179 stars 59 forks source link

Cannot Create a CellType with a UserDefined NoDATA Value of 0 #605

Closed jbouffard closed 6 years ago

jbouffard commented 6 years ago

Because of the logic in convert_data_type, it is impossible to convert to a celltype where the ud is 0. This is because the resulting check will always fail when no_data_value is 0:

        if no_data_value:

This can be easily fixed by changing it to if no_data_value is not None: