<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Programmatically georeference raster from other raster in Python Questions</title>
    <link>https://community.esri.com/t5/python-questions/programmatically-georeference-raster-from-other/m-p/600245#M46906</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have the following task:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a georeferenced (Geo-)Tiff file, a.tif. Using an external program, I create another plain (no georeferencing data) TIFF file b.tif. (Imagine say that I open a.tif in Photoshop, apply a motion blur to the whole image, and save the result as b.tif, but in such a way that the georeferencing metadata is lost.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, b.tif and a.tif represent the same region on the globe using exactly the same projection. a.tif carries information about where this region is, but b.tif does not; I want to copy that information from a.tif to b.tif. Or in other words, I want to alter b.tif so that it is perfectly aligned on top of a.tif if I open them both in ArcMap. I need to do this from a Python script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a.tif and b.tif will have the same width and height (in pixels), but not necessarily the same color depth.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This seems like it should be a simple task with ArcGIS scripting, but I can't figure out how to do this. I think I can copy the projection data by using DefineProjection_management(), but as far as I can tell, this only changes the projection and not the actual position of the image within the projection's coordinate system.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using version 10 of ArcGIS. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be much appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 04 Jul 2011 12:26:26 GMT</pubDate>
    <dc:creator>HansLiu</dc:creator>
    <dc:date>2011-07-04T12:26:26Z</dc:date>
    <item>
      <title>Programmatically georeference raster from other raster</title>
      <link>https://community.esri.com/t5/python-questions/programmatically-georeference-raster-from-other/m-p/600245#M46906</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;I have the following task:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a georeferenced (Geo-)Tiff file, a.tif. Using an external program, I create another plain (no georeferencing data) TIFF file b.tif. (Imagine say that I open a.tif in Photoshop, apply a motion blur to the whole image, and save the result as b.tif, but in such a way that the georeferencing metadata is lost.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Now, b.tif and a.tif represent the same region on the globe using exactly the same projection. a.tif carries information about where this region is, but b.tif does not; I want to copy that information from a.tif to b.tif. Or in other words, I want to alter b.tif so that it is perfectly aligned on top of a.tif if I open them both in ArcMap. I need to do this from a Python script.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;a.tif and b.tif will have the same width and height (in pixels), but not necessarily the same color depth.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;This seems like it should be a simple task with ArcGIS scripting, but I can't figure out how to do this. I think I can copy the projection data by using DefineProjection_management(), but as far as I can tell, this only changes the projection and not the actual position of the image within the projection's coordinate system.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I am using version 10 of ArcGIS. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any help would be much appreciated.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Jul 2011 12:26:26 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/programmatically-georeference-raster-from-other/m-p/600245#M46906</guid>
      <dc:creator>HansLiu</dc:creator>
      <dc:date>2011-07-04T12:26:26Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically georeference raster from other raster</title>
      <link>https://community.esri.com/t5/python-questions/programmatically-georeference-raster-from-other/m-p/600246#M46907</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hey Hans,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a similar problem as you do/did.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Did you ever find a solution for that ??&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Cheers,&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 12:01:17 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/programmatically-georeference-raster-from-other/m-p/600246#M46907</guid>
      <dc:creator>MartinScheiber</dc:creator>
      <dc:date>2012-07-17T12:01:17Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically georeference raster from other raster</title>
      <link>https://community.esri.com/t5/python-questions/programmatically-georeference-raster-from-other/m-p/600247#M46908</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;If a.tif is georeferenced there should be a a.twf (world file) associated with it.&amp;nbsp; If b.tif has the same cell size and extent you can save a.twf as a new file b.twf in the same location as b.tif. &lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Then use shutil to copy the file....&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;import shutil&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;shutil.copyfile(r"C:\gtemp\a.tfw", r"C:\gtemp\aa.tfw")&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 14:58:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/programmatically-georeference-raster-from-other/m-p/600247#M46908</guid>
      <dc:creator>GerryGabrisch</dc:creator>
      <dc:date>2012-07-17T14:58:18Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically georeference raster from other raster</title>
      <link>https://community.esri.com/t5/python-questions/programmatically-georeference-raster-from-other/m-p/600248#M46909</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Martin:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I never did find a way to do it using ArcGIS scripting. Instead, I used the tools listgeo and geotifcp from the GeoTIFF library, which solved the problem in a simple way.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 17 Jul 2012 16:27:55 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/programmatically-georeference-raster-from-other/m-p/600248#M46909</guid>
      <dc:creator>HansLiu</dc:creator>
      <dc:date>2012-07-17T16:27:55Z</dc:date>
    </item>
    <item>
      <title>Re: Programmatically georeference raster from other raster</title>
      <link>https://community.esri.com/t5/python-questions/programmatically-georeference-raster-from-other/m-p/600249#M46910</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Gerry, Hans,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks for your tips. I´ll give it a try.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Martin&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 18 Jul 2012 05:10:18 GMT</pubDate>
      <guid>https://community.esri.com/t5/python-questions/programmatically-georeference-raster-from-other/m-p/600249#M46910</guid>
      <dc:creator>MartinScheiber</dc:creator>
      <dc:date>2012-07-18T05:10:18Z</dc:date>
    </item>
  </channel>
</rss>

