Skip to content

Conversation

@culebron
Copy link

@culebron culebron commented Mar 20, 2018

fix for #31

@coveralls
Copy link

coveralls commented Mar 20, 2018

Coverage Status

Coverage decreased (-0.09%) to 29.905% when pulling 7c81bf6 on culebron:master into e633a4e on ozak:master.

@ozak
Copy link
Owner

ozak commented Mar 20, 2018

It may be better to just add **kwargs instead of options=None and options= options, no?

@culebron
Copy link
Author

Yes, good idea.

# Write the array
DataSet.GetRasterBand(band).WriteArray(Array)
DataSet.GetRasterBand(band).SetNoDataValue(ndv)
DataSet.GetRasterBand(band).SetNoDataValue(np.float64(ndv))
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't forcing a np.float64(ndv) force any dataset to become float, even the ones that are integers and so increasing file size?

@ozak
Copy link
Owner

ozak commented Mar 21, 2018

Doesn't forcing a np.float64(ndv) force any dataset to become float, even the ones that are integers and so increasing file size?

@culebron
Copy link
Author

@ozak I didn't test this. I found out that integer numpy matrices can't have None in them, and for integer ones (like ASTER DEM) it's only necessary to have a maksed array, without ndv.

It starts being confusing. Let me see how to run tests.

@ozak
Copy link
Owner

ozak commented Mar 23, 2018

To see the effect of this np.float I would save an integer raster with and without the option to see the difference in size.

I'm not sure I understood what you meant with the last comments... When is None being assigned to a numpy array?

@ozak
Copy link
Owner

ozak commented Mar 23, 2018

Also, how would you have a masked array without an ndv?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants