Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rasterization issue: ValueError: Given nodata value, nan, is beyond the valid range of its data type, uint8. #39

Closed
iamtekson opened this issue Sep 25, 2023 · 0 comments
Labels
bug Something isn't working

Comments

@iamtekson
Copy link
Member

iamtekson commented Sep 25, 2023

File [.conda\envs\gee\lib\site-packages\geotile\GeoTile.py:605](file://.conda/envs/gee/lib/site-packages/geotile/GeoTile.py:605), in GeoTile.rasterization(self, input_vector, out_path, value_col, **kwargs)
    602 meta.update({'count': 1, "dtype": "uint8"})
    604 # write the output raster
--> 605 with rio.open(out_path, 'w', **meta) as outds:
    606     outds.write(mask)

File [.conda\envs\gee\lib\site-packages\rasterio\env.py:451](file://.conda/envs/gee/lib/site-packages/rasterio/env.py:451), in ensure_env_with_credentials.<locals>.wrapper(*args, **kwds)
    448     session = DummySession()
    450 with env_ctor(session=session):
--> 451     return f(*args, **kwds)

File [.conda\envs\gee\lib\site-packages\rasterio\__init__.py:314](file://.conda/envs/gee/lib/site-packages/rasterio/__init__.py:314), in open(fp, mode, driver, width, height, count, crs, transform, dtype, nodata, sharing, **kwargs)
    312 writer = get_writer_for_driver(driver)
    313 if writer is not None:
--> 314     dataset = writer(
    315         path,
...
    331     )

File rasterio\_io.pyx:1502, in rasterio._io.DatasetWriterBase.__init__()

ValueError: Given nodata value, nan, is beyond the valid range of its data type, uint8.
@iamtekson iamtekson added the bug Something isn't working label Sep 25, 2023
iamtekson added a commit that referenced this issue Sep 25, 2023
solved rasterization dtype issue, close #39
iamtekson added a commit that referenced this issue Sep 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant