0

I have a set of aerial image tiles with world files in one coordinate system (NZTM - ESPG:2193) and would like to generate a set of world files for those SAME images in another coordinate system (NZ Mt Pleasant 2000 - ESPG:2124).

I have a little experience with QGIS, which I hope I might be able to use to achieve this goal. I can obtain an SHP file with tile outlines for both input and output coordinate systems, and I've worked out how to extract tiles from the image files using gdaltindex. Is there a way to "reverse" the gdaltindex to extract world files (eg jgw or similar) from a SHP file of image tiles?

With quite a large number of images (nearly 7,000), I would like to avoid doing a warp or other conversion to the images themselves. This means that the new world files will need to have some rotation included to complete the conversion.

  • Generally speaking it is not so simple. Re-projection is not just sliding the origo and rotating but if you are lucky your source and target coordinate systems are so close relatives that the result can be usable. I suggest not to do any critical analysis with such pseudo-re-projected images. – user30184 Apr 18 '17 at 20:52
1

I did this years ago in ArcMap, from stateplane NAD 27 to NAD83. The tfw or jfw is just a text file. Look at http://desktop.arcgis.com/en/arcmap/10.3/manage-data/raster-and-images/world-files-for-raster-datasets.htm for what the various lines mean. For the most part you are just converting the origin coordinates (upper left, not lower right) and replacing them with the new coordinates, the scale comes in if the units change like feet to meters, if not the same scale should work. Python works great for reading and writing the text files. In windows, cmd prompt, in the right folder dir *.tfw /b >tfwfile.txt will give you a list of all the twf file to work through. I would also use http://all-geo.org/volcan01010/2012/11/change-coordinates-with-pyproj/ to reproject the coordinates. Test one file to make sure it works as you may have to tweak it, and first make back ups.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.