corteva / geocube

Tool to convert geopandas vector data into rasterized xarray data.
https://corteva.github.io/geocube
BSD 3-Clause "New" or "Revised" License
344 stars 27 forks source link

Clarify documentation - fill parameter only used for numerical data #152

Open gtmaskall opened 11 months ago

gtmaskall commented 11 months ago

Discussed in https://github.com/corteva/geocube/discussions/151

Originally posted by **gtmaskall** December 12, 2023 The default behaviour of `make_geocube` with categorical data is to append a `nodata` string to the `_categories` variable. This makes sense from a Python indexing perspective inasmuch as the corresponding integer code for this is -1. This seems to override the `fill` argument. Again this makes sense with the use of -1 and the position of `nodata`. But if I'm correct in this, the documentation could be tightened up a little to clarify that `fill` only applies to numerical data.