<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>mobile and gis dev notes &#187; perl</title>
	<atom:link href="http:///wordpress/tag/perl/feed/" rel="self" type="application/rss+xml" />
	<link>/wordpress</link>
	<description>by rupert</description>
	<lastBuildDate>Wed, 08 Feb 2012 22:26:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Mapinfo Utility for gdal_translate.</title>
		<link>/wordpress/2007/06/mapinfo-utility-for-gdal_translate/</link>
		<comments>/wordpress/2007/06/mapinfo-utility-for-gdal_translate/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 17:44:36 +0000</pubDate>
		<dc:creator>rupert</dc:creator>
				<category><![CDATA[GDAL/OGR]]></category>
		<category><![CDATA[gdal]]></category>
		<category><![CDATA[mapinfo]]></category>
		<category><![CDATA[perl]]></category>
		<category><![CDATA[raster]]></category>

		<guid isPermaLink="false">/wordpress/?p=61</guid>
		<description><![CDATA[I made a small perl utility to automate the gcp&#8217;s from Mapinfo Raster TABS to gdal_translate command line. Currently your tabfile would have: !table !version 300 !charset WindowsLatin1 &#160; Definition Table File &#34;beijing_6th_1.jpg&#34; Type &#34;RASTER&#34; (116.522865,40.016316) (347,184) Label &#34;Pt 1&#34;, (116.681215,40.015286) (7729,243) Label &#34;Pt 2&#34;, (116.679777,39.777904) (7666,14674) Label &#34;Pt 3&#34;, (116.523827,39.779108) (397,14606) Label &#34;Pt 4&#34; [...]]]></description>
			<content:encoded><![CDATA[<p>I made a small perl utility to automate the gcp&#8217;s from Mapinfo Raster TABS to gdal_translate command line.  Currently your tabfile would have:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">!table
!version 300
!charset WindowsLatin1
&nbsp;
Definition Table
  File &quot;beijing_6th_1.jpg&quot;
  Type &quot;RASTER&quot;
  (116.522865,40.016316) (347,184) Label &quot;Pt 1&quot;,
  (116.681215,40.015286) (7729,243) Label &quot;Pt 2&quot;,
  (116.679777,39.777904) (7666,14674) Label &quot;Pt 3&quot;,
  (116.523827,39.779108) (397,14606) Label &quot;Pt 4&quot;
  CoordSys Earth Projection 1, 104
  Units &quot;degree&quot;
  RasterStyle 4 1
  RasterStyle 7 1677695</pre></div></div>

<p>How to use<br />
<a href='/wordpress/wp-content/uploads/2008/08/gdal_mapinfo.pl'>gdal_mapinfo</a></p>
<p>1. ls *.TAB &gt; init.sh</p>
<p>2. vi init.sh to reflect the ff:</p>

<div class="wp_syntax"><div class="code"><pre class="text" style="font-family:monospace;">perl gdal_mapinfo.pl Beijing_6th_1.TAB &amp;gt;&amp;gt; final.bat
perl gdal_mapinfo.pl Beijing_6th_10.TAB &amp;gt;&amp;gt; final.bat
perl gdal_mapinfo.pl Beijing_6th_11.TAB &amp;gt;&amp;gt; final.bat
perl gdal_mapinfo.pl Beijing_6th_12.TAB &amp;gt;&amp;gt; final.bat
perl gdal_mapinfo.pl Beijing_6th_13.TAB &amp;gt;&amp;gt; final.bat
perl gdal_mapinfo.pl Beijing_6th_2.TAB &amp;gt;&amp;gt; final.bat
perl gdal_mapinfo.pl Beijing_6th_3.TAB &amp;gt;&amp;gt; final.bat
perl gdal_mapinfo.pl Beijing_6th_4.TAB &amp;gt;&amp;gt; final.bat
perl gdal_mapinfo.pl Beijing_6th_5.TAB &amp;gt;&amp;gt; final.bat
perl gdal_mapinfo.pl Beijing_6th_6.TAB &amp;gt;&amp;gt; final.bat
perl gdal_mapinfo.pl Beijing_6th_7.TAB &amp;gt;&amp;gt; final.bat
perl gdal_mapinfo.pl Beijing_6th_8.TAB &amp;gt;&amp;gt; final.bat
perl gdal_mapinfo.pl Beijing_6th_9.TAB &amp;gt;&amp;gt; final.bat</pre></div></div>

<p>3. The resulting final.bat should have the ff:<br />
gdal_translate  -gcp 347 184 116.522865 40.016316 -gcp 7729 243 116.681215 40.015286 -gcp 7666 14674 116.679777 39.777904 -gcp 397 14606 116.523827 39.779108 -of GTiff Beijing_6th_1.jpg I:\\satimages\translated\Beijing_6th_1_translated.tif</p>
<p>gdalwarp -s_srs epsg:4326 -t_srs epsg:4326 I:\\satimages\translated\Beijing_6th_1_translated.tif<br />
I:\\satimages\warped\Beijing_6th_1.tif
</pre>
]]></content:encoded>
			<wfw:commentRss>/wordpress/2007/06/mapinfo-utility-for-gdal_translate/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

