Hexagon Geospatial
MENU

GeoMedia Q&A

GeoMedia, a comprehensive and dynamic GIS, extracts compelling intelligence from geospatial data and integrates it to present actionable information.
Showing results for 
Search instead for 
Do you mean 

How can I batch create a .tfw (world file) for my TIFF image?

by Anonymous on ‎07-18-2016 09:53 AM - edited on ‎12-20-2018 01:19 PM by Moderator (3,091 Views)

Question

Customer states they have hundreds of TIFF files that were either registered in the MicroStation based GIS Imaging products (I/RASC or ImageAnalyst) or had been converted to GeoTIFF.  They want to extract the registration as a world file (.tfw) for use in another application.

Answer

This is easily accomplished in batch mode using the Many/Raw File Converter in the ImageStation Raster Utilities (ISRU).  ISRU can be downloaded from https://download.hexagongeospatial.com/downloads/imagestation/imagestation-raster-utilities-5-2-800.

 

Here's the command line flags for mr_file:
 
Use the -g option
 
for %j in (*.tif) do start /b /wait mr_file -g %j %~nj.tfw
 
This will do a whole folder at one time.
Comments
by JMart
on ‎01-07-2019 05:05 AM

This command didn't work for me. But a slight variation does. I just convert my TIFF to JPEG while generating a JPEG world file. The JPEG world file is exactly the same as the TIFF world file that I want but with a different file extension. All I have to do is rename the world file using a *.tfw extension instead of the *.jgw that is generated. The batch command I use is "for %j in (*.tif) do mr_file -C j %~nj.tif %~nj.jpg". This will generate the JPEG image file along with the world file.

by Technical Evangelist
‎01-07-2019 10:02 AM - edited ‎01-07-2019 01:15 PM

Here are some additional suggestions:

 

https://gis.stackexchange.com/questions/9421/creating-tfw-and-prj-files-for-folder-of-geotiff-files 

 

Note that the listgeo command line utility from libgeotiff, which is mentioned on that page, is included with ISRU.

Contributors