is it possible to use make_geocube with paramter option all_touched = true? #97
Answered
by
snowman2
oswald1234
asked this question in
Q&A
-
Is it possible to use make_geocube with parameter option all_touched = true? |
Beta Was this translation helpful? Give feedback.
Answered by
snowman2
Apr 4, 2022
Replies: 1 comment 1 reply
-
https://gis.stackexchange.com/a/427961/144357 You want to follow the pattern demonstrated here: https://corteva.github.io/geocube/stable/examples/rasterize_point_data.html from functools import partial
from geocube.rasterize import rasterize_image
roads = make_geocube(
vector_data=roads,
measurements=['train_id'],
resolution=(10,-10),
rasterize_function=partial(rasterize_image, all_touched=True),
) Also see: https://corteva.github.io/geocube/stable/geocube.html#geocube.rasterize.rasterize_image |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
oswald1234
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
https://gis.stackexchange.com/a/427961/144357
You want to follow the pattern demonstrated here: https://corteva.github.io/geocube/stable/examples/rasterize_point_data.html
Also see: https://corteva.github.io/geocube/stable/geocube.html#geocube.rasterize.rasterize_image