Suppress GDAL raster tags

4216
7
Jump to solution
04-07-2015 03:45 AM
BenLeslie1
Frequent Contributor

I used Arc to slice a large raster into smaller tiles for use in a separate in-house programme.

Unfortunately when loading the rasters into our programme we get a couple of errors/warnings.  The cause of these warnings has been identified as a couple of GDAL tags (the tags relate to nodata value and general metadata).  Is there some way to suppress the generation of these GDAL tags when I process the imagery in Arc / arcpy?

Sorry if the description is very basic - I am just the GIS tech, not a software developer.

0 Kudos
1 Solution

Accepted Solutions
Luke_Pinner
MVP Regular Contributor

Assuming they are tiffs and you have a working GDAL install, you can use the PROFILE creation option to specify GEOTIFF instead of the default GDALGeoTIFF:

gdal_translate -co PROFILE=GeoTIFF in.tif out.tif

View solution in original post

0 Kudos
7 Replies
Luke_Pinner
MVP Regular Contributor

Assuming they are tiffs and you have a working GDAL install, you can use the PROFILE creation option to specify GEOTIFF instead of the default GDALGeoTIFF:

gdal_translate -co PROFILE=GeoTIFF in.tif out.tif

0 Kudos
DanPatterson_Retired
MVP Emeritus

Luke just a head up.  your code post for some reason got Moderator tagged.  In the future try enclosing it in quotes rather than puttting it in a code block.  If it gets flagged again, I will pass it up the line my guess as to what did it is as good as yours.  I have notified Timothy Hales​ in case he knows

0 Kudos
Luke_Pinner
MVP Regular Contributor

Thanks Dan. I was wondering why I got moderated. Oh well, at least I now know who moderates the moderators 

0 Kudos
DanPatterson_Retired
MVP Emeritus

You must have gotten thrown out of the moderator queue through through your spammy actions

0 Kudos
BenLeslie1
Frequent Contributor

Hi Luke - this sounds like what I need to do (you're right to assume they're tiffs, sorry for leaving off vital info).

I need to ask some follow-up questions.....I'm new to gdal code and have not really used much code beyond arcpy.

How do I run this code, is it python?

How do I know if I have a working GDAL install? - I have lots of folders on my computer called GDAL in amoungst program files for FME, Arc and QGIS - the gdal website goes over my head somewhat.

Thanks

Ben

0 Kudos
Luke_Pinner
MVP Regular Contributor

Ben, gdal_translate.exe is a commandline program, you run it from a command prompt. I was assuming you had a working gdal install to generate those files in the first place. How did you create/get them?

You could also try the ArcGIS Copy Raster tool to see if that strips the tags.

BenLeslie1
Frequent Contributor

Thanks - I'll look into gdal_translate.exe.

The tags were apparently created by Arc's Clip tool.

0 Kudos