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

Acquire JPEG images from GEOTIFF #1

Closed
tayalkshitij opened this issue Mar 28, 2019 · 1 comment
Closed

Acquire JPEG images from GEOTIFF #1

tayalkshitij opened this issue Mar 28, 2019 · 1 comment

Comments

@tayalkshitij
Copy link

tayalkshitij commented Mar 28, 2019

I am using the following command to get RGB images:

gdal_translate -b 4 -b 3 -b 2 -of JPEG -scale inputimage.tif outputfile.jpeg

RGB images obtained from the above command is not same as supplied by EuroSAT.
Can you let me know what is the procedure that you have used to covert EuroSAT GEOTIFF to JPEG ?

@tayalkshitij
Copy link
Author

tayalkshitij commented Mar 28, 2019

To get RGB image with the same scale as the EuroSAT rgb data from
downloaded Sentinel images you have to clip your original Sentinel-2
data. The maintainer of the EuroSAT data told me, that they clipped the
original data from range 0 to 2750 to the range 1 to 255, leaving 0 for
nodata values:

gdal_translate --config GDAL_PAM_ENABLED NO -of JPEG -co QUALITY=100 
-ot Byte -a_nodata 0 -scale 0 2750 1 255 -b 4 -b 3 -b 2 -of JPEG 
inputimage.tif  outputfile.jpeg ```

 (additional option '-co 
PHOTOMETRIC=RGB' if using GeoTIFF as output)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant