[gdal-dev] gdal_merge

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[gdal-dev] gdal_merge

Gong, Shawn-2
Hi list,

I use gdal_merge to mosaic a set of DTED 1 and 2 chips. 
DTED contains -32767 as nodata. But after merging, -32767 are reset as 0.
I tried to use "-n -32767" but getting the same result.

Is there a way to keep the -32767 values?
 
Thanks,
Shawn

This electronic correspondence, including any attachments, is intended solely for the use of the intended recipient(s) and may contain legally privileged, proprietary and/or confidential information. If you are not the intended recipient, please immediately notify the sender by reply e-mail and permanently delete all copies of this electronic correspondence and associated attachments. Any use, disclosure, dissemination, distribution or copying of this electronic correspondence and any attachments for any purposes that have not been specifically authorized by the sender is strictly prohibited.


_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: gdal_merge

jratike80
Hi,

If you read https://gdal.org/programs/gdal_merge.html carefully you'll
notice that -n is used for telling what nodata value is used in the source
files and it is only needed if GDAL can't recognize it automatically. Try
-a_nodata -32767 instead "Assign a specified nodata value to output bands."

-Jukka Rahkonen-


Gong, Shawn-2 wrote

> Hi list,
>
> I use gdal_merge to mosaic a set of DTED 1 and 2 chips.
> DTED contains -32767 as nodata. But after merging, -32767 are reset as 0.
> I tried to use "-n -32767" but getting the same result.
>
> Is there a way to keep the -32767 values?
>
> Thanks,
> Shawn





--
Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev
Reply | Threaded
Open this post in threaded view
|

Re: gdal_merge

Gong, Shawn-2
I used both -a_nodata -32767 and -ot Float32, and neither worked.
-32767 has been converted to 0, and I want to keep the -32767.

Thanks,
Shawn

________________________________________
From: gdal-dev [[hidden email]] on behalf of jratike80 [[hidden email]]
Sent: August-13-19 4:51 AM
To: [hidden email]
Subject: Re: [gdal-dev] gdal_merge

Hi,

If you read https://urldefense.proofpoint.com/v2/url?u=https-3A__gdal.org_programs_gdal-5Fmerge.html&d=DwIGaQ&c=qv9gmtOiXdJCj9gMlMKtaw&r=ROy3ulwX11d_sGWoPYB0I5rYOqZ87kk4KkIgG2QtlQI&m=DMhZ13IRdOz_dv3IjqnyD9344s5TP4uazdGeD20Othc&s=51QGJVd-d83FFaODCpFQo-bmIk65VhvoYl8qQx7j_VY&e=  carefully you'll
notice that -n is used for telling what nodata value is used in the source
files and it is only needed if GDAL can't recognize it automatically. Try
-a_nodata -32767 instead "Assign a specified nodata value to output bands."

-Jukka Rahkonen-


Gong, Shawn-2 wrote

> Hi list,
>
> I use gdal_merge to mosaic a set of DTED 1 and 2 chips.
> DTED contains -32767 as nodata. But after merging, -32767 are reset as 0.
> I tried to use "-n -32767" but getting the same result.
>
> Is there a way to keep the -32767 values?
>
> Thanks,
> Shawn





--
Sent from: https://urldefense.proofpoint.com/v2/url?u=http-3A__osgeo-2Dorg.1560.x6.nabble.com_GDAL-2DDev-2Df3742093.html&d=DwIGaQ&c=qv9gmtOiXdJCj9gMlMKtaw&r=ROy3ulwX11d_sGWoPYB0I5rYOqZ87kk4KkIgG2QtlQI&m=DMhZ13IRdOz_dv3IjqnyD9344s5TP4uazdGeD20Othc&s=Cs6LL6Z5K3zftznoX7kV2oE1i4HZDwZ-8b3O-Gc40tU&e=
_______________________________________________
gdal-dev mailing list
[hidden email]
https://urldefense.proofpoint.com/v2/url?u=https-3A__lists.osgeo.org_mailman_listinfo_gdal-2Ddev&d=DwIGaQ&c=qv9gmtOiXdJCj9gMlMKtaw&r=ROy3ulwX11d_sGWoPYB0I5rYOqZ87kk4KkIgG2QtlQI&m=DMhZ13IRdOz_dv3IjqnyD9344s5TP4uazdGeD20Othc&s=-JP3OAQ9usLjYGbLQhH3nmGePhwbf_56EimLM91Mz0g&e=
_______________________________________________
gdal-dev mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/gdal-dev