-
Notifications
You must be signed in to change notification settings - Fork 39
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
Support of DTED and SRTM #13
Comments
Ok never mind, I was able to change the nodata value using gdal |
@raggnic thanks for the ticket! This is happening because while we are updating the output data type, I neglected to also update the nodata value: https://github.com/mapbox/rio-rgbify/blob/master/rio_rgbify/scripts/cli.py#L46 The fix to avoid this would be straightforward (just update the destination profile with a nodata of None). I am not sure that this fixes the underlying problem, however, which is -- how do you support transparency with this encoding? Side note: any specific reason you are outputting to a tif instead of an mbtiles? I mention this because almost any usage (tiling or otherwise) could introduce artifacts due to resampling that would break the encoding. |
It's fine, i don't need transparency currently, but yes, it should be possible to have nodata areas. I've seen Dted with no data areas. Besides this format is useful to be able to serve the result through tms. So far I've not seen artefacts on tile borders |
Yes, agree, I am just not sure how to implement it with 8 bit rgb encoding without using a possibly valid data value (0 0 0); the best solution might be to add an alpha band.
Excellent -- you wouldn't see them on borders, youd see them in the encoding. The problem is that a slope proceeds, the B (for example) band goes from 0, 1, ... 256, then back to 0, 1; is any resampling is performed in between subsequent pixels, it will add artifacts between 255 and 0 (unless using nearest neighbor resampling). That said, it shouldn't take hours (minutes if that), I'll take a look at an SRTM from above. Do you have the exact command you are using? |
This is still an issue. I am running rasterio inside a docker container with Ubuntu 18 and Python 3. |
Hello
Are DTED format or SRTM Supported?
With a DTED I run the following command
rio rgbify -b 10000 -i 0.1 N43.dt0 n43.rgb.tif
and I get the following message :rasterio._err.CPLE_NotSupportedError: DTED driver only uses the first band of the dataset
With a SRTM downloaded from http://dwtkns.com/srtm/ i run the same command
rio rgbify -b 10000 -i 0.1 srtm_38_04.tif srtm_38_04_rgb.tif
and I get this messageGiven nodata value, -32768.0, is beyond the valid range of its data type, <class 'numpy.uint8'>.
I may be doing something wrong somewhere but so far i've not seen where...
Regards
The text was updated successfully, but these errors were encountered: