[gdal-dev] Converting DEM height values from feet to meter
Even Rouault
even.rouault at spatialys.com
Thu Mar 18 09:13:22 PDT 2021
Le 18/03/2021 à 17:06, Evert Etienne (SITEMARK) a écrit :
> Does one of the 2 options keep more settings of the input file? Such as NoData value, BIGTIFF creation option…?
gdal_calc modify the nodata value settings AFAIR. You have to consult
its doc. gdal_translate should be fine. But when rescaling, some care as
always to be taken regarding nodata.
BigTIFF preserveration is a creation option of the GTiff driver, so you
have to explicitly pass it (or rely on the automatic mode whose
heuristics will decide if it must use BigTIFF or not)
>
> But indeed, the possibility to use VRT does seem better since then it can be done during tiling. This probably only saves space and not time, correct (due to lack of understanding of VRT).
VRT will generally not save time (unless you materialize the
intermediate format to some compressed format and time of
compression/decompression is significant).
>
> Thanks for replying!
>
>> On 18 Mar 2021, at 12:38, Even Rouault <even.rouault at spatialys.com> wrote:
>>
>> "gdal_translate -scale 0 1 0 factor in out" could also be used. As a bonus point, this works with VRT as an output if you don't want to materialize the intermediate file.
>>
>> Even
>>
>> Le 18/03/2021 à 12:20, Evert Etienne (SITEMARK) a écrit :
>>> For reference, I decided to go for a simple gdal_calc with `f"--calc=A*{factor}”`
>>>
>>>> On 12 Mar 2021, at 20:43, Evert Etienne (SITEMARK) <evert.etienne at sitemark.com> wrote:
>>>>
>>>> Hello all,
>>>>
>>>> I was wondering what the best or recommended way was to convert the vertical unit of a DEM/DSM. I am able to use gdal_translate, gdal_calc.py, GDAL python bindings or rasterio. I will afterwards be tiling using gdal2tiles.
>>>> Any pointers would be appreciated.
>>>>
>>>> Greetings
>>>> _______________________________________________
>>>> gdal-dev mailing list
>>>> gdal-dev at lists.osgeo.org
>>>> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-dev&data=04%7C01%7Cevert.etienne%40sitemark.com%7C8ca005c4c92144dbdf2f08d8ea026c13%7Cfc89adff07ac47008853b7b7e906068e%7C0%7C0%7C637516643420232810%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=HDEyVo8bDzuSqnBJg%2BvqAfuIPLBgRxnnBKw03vom1X4%3D&reserved=0
>>> _______________________________________________
>>> gdal-dev mailing list
>>> gdal-dev at lists.osgeo.org
>>> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.osgeo.org%2Fmailman%2Flistinfo%2Fgdal-dev&data=04%7C01%7Cevert.etienne%40sitemark.com%7C8ca005c4c92144dbdf2f08d8ea026c13%7Cfc89adff07ac47008853b7b7e906068e%7C0%7C0%7C637516643420242765%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=pvs4dgTJ%2BiH14dqXg9P5vRdQzy6SEpRToNNcEbOplwQ%3D&reserved=0
>> --
>> https://eur03.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.spatialys.com%2F&data=04%7C01%7Cevert.etienne%40sitemark.com%7C8ca005c4c92144dbdf2f08d8ea026c13%7Cfc89adff07ac47008853b7b7e906068e%7C0%7C0%7C637516643420242765%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=0MnXcpJIbk%2BXK2CAI4EHWVbY36JItSXq0Rbyeoa19Gc%3D&reserved=0
>> My software is free, but my time generally not.
>>
--
http://www.spatialys.com
My software is free, but my time generally not.
More information about the gdal-dev
mailing list