is it possible to change dtype to uint16? #98
Answered
by
snowman2
oswald1234
asked this question in
Q&A
-
I'm trying by doing this, but with no luck.
|
Beta Was this translation helpful? Give feedback.
Answered by
snowman2
Apr 4, 2022
Replies: 1 comment
-
Step 1: Make sure input data values are roads["train_id"] = roads.train_id.astype(np.uint16)
roads = make_geocube(
vector_data=roads,
measurements=['train_id'],
resolution=(-10,10),
rasterize_function=partial(rasterize_image,all_touched=True),
fill=0,
) |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
oswald1234
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Step 1: Make sure input data values are
uint16
Step 2: Make sure the nodata value is compatible with
uint16
as the default isnumpy.nan
https://corteva.github.io/geocube/stable/geocube.html#make-geocube