<?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>tmackinnon.com &#187; PCI Geomatica</title>
	<atom:link href="http://tmackinnon.com/x/rs/rs-software/pci-geomatica/feed" rel="self" type="application/rss+xml" />
	<link>http://tmackinnon.com</link>
	<description>Geomatics helps you discover our world</description>
	<lastBuildDate>Mon, 30 Apr 2012 23:28:24 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>PCI EASI Script [PIX_to_SHP_batch_export.eas]</title>
		<link>http://tmackinnon.com/pci-easi-script-pix_to_shp_batch_export-eas.php</link>
		<comments>http://tmackinnon.com/pci-easi-script-pix_to_shp_batch_export-eas.php#comments</comments>
		<pubDate>Mon, 07 Jan 2008 02:35:24 +0000</pubDate>
		<dc:creator>tmackinnon</dc:creator>
				<category><![CDATA[EASI Scripts]]></category>
		<category><![CDATA[batch export]]></category>
		<category><![CDATA[EASI script]]></category>
		<category><![CDATA[PCI Geomatica]]></category>
		<category><![CDATA[shape files]]></category>

		<guid isPermaLink="false">http://tmackinnon.com/?p=480</guid>
		<description><![CDATA[This simple EASI script used with the MODEL command in PCI will batch convert vector files stored in PCIDSK (PIX) format into Shape File (SHP) format with the exact same file name as the input files. This was originally created for PCI Geomatica v9.1 but was last tested and working with no problems in PCI Geomatica v10.0 !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;- [...]]]></description>
			<content:encoded><![CDATA[<p>This simple EASI script used with the MODEL command in PCI will batch convert vector files stored in PCIDSK (PIX) format into<br />
Shape File (SHP) format with the exact same file name as the input files. This was originally created for PCI Geomatica v9.1 but was last tested and working with no problems in PCI Geomatica v10.0</p>
<p><!--                                           - --><br />
!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
!<br />
! Batch Export PIX Vector to SHP Script<br />
! [PIX_to_SHP_batch_export.eas]<br />
! <br />
! This script will export vector segments from PIX files located in a<br />
! given directory into Shape files and place the new files into the same<br />
! directory. The script assumes that no SHP files with the same names<br />
! already exist and all the input files are setup the same with the<br />
! vector segments stored the same.<br />
!<br />
!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
! Define variables<br />
!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>!to store location of input &amp; output files</p>
<p>local string in_files</p>
<p>!for the file format and extension types</p>
<p>local string type, ext</p>
<p>!file names</p>
<p>local string bn, fn</p>
<p>!to store directory listing of input files</p>
<p>local mstring dirlist</p>
<p>!to store vector segment number</p>
<p>local integer vec</p>
<p>local integer i</p>
<p>local $Z</p>
<p>!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
! Clear the EASI window and then show the header information<br />
!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>PRINT @(1 ,1,CLREOS)</p>
<p>print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#8221;<br />
print @reverse,&#8221; &#8216;Batch export PIX vector to SHP&#8217; EASI Script &#8220;,@alloff<br />
print &#8220;&#8221;<br />
print &#8220;&#8221;<br />
print &#8220;&#8221;<br />
print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#8221;<br />
print &#8220;&#8221;<br />
print &#8221; This script will export vectors from PIX files in a given directory &#8221;<br />
print &#8221; into SHP format using the same file names as the input files. &#8221;<br />
print &#8220;&#8221;<br />
print &#8221; All input vector files are expected to be setup the same with all &#8221;<br />
print &#8221; vectors to be exported, stored using the same segment number.&#8221;<br />
print &#8220;&#8221;<br />
print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#8221;<br />
print &#8220;&#8221;</p>
<p>!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
! Collect input from user<br />
!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>print &#8220;Enter the directory that contains the PIX files to export to SHP:&#8221;</p>
<p>input &#8220;&gt;&#8221; in_files</p>
<p>print &#8220;Enter the vector segment number that the vector is stored in:&#8221;</p>
<p>input &#8220;&gt;&#8221; vec</p>
<p>!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
! Get the contents of the directory<br />
!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>type =&#8221;pix</p>
<p>dirlist = getdirectory(in_files)</p>
<p>let $Z = &#8220;\</p>
<p>for i = 1 to f$len(dirlist)</p>
<p>!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
! Extract parts of the filenames<br />
!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>fn = in_files + $Z + dirlist[i]</p>
<p>ext = getfileextension(fn)</p>
<p>bn = getfilebasename(fn)</p>
<p>if (ext ~= type) then</p>
<p>print &#8220;&#8221;<br />
print &#8220;Exporting:&#8221;, bn, &#8220;from PIX to SHP&#8221;<br />
print &#8220;&#8221;</p>
<p>!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
! Set up the parameters and execute the FEXPORT command<br />
!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p>fili = in_files + $Z + dirlist[i]<br />
filo = in_files + $Z + bn<br />
dbiw =<br />
dbic =<br />
dbib =<br />
dbvs = vec<br />
dblut =<br />
dbpct =<br />
ftype =&#8221;SHP<br />
foptions =</p>
<p>R Fexport</p>
<p>PRINT @(1 ,1,CLREOS)</p>
<p>endif</p>
<p>endfor</p>
<p>PRINT @(1 ,1,CLREOS)</p>
<p>print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#8221;<br />
print &#8220;&#8221;<br />
print @reverse,&#8221; &#8216;Batch export PIX vector to SHP&#8217; EASI Script Finished &#8220;,@alloff<br />
print &#8220;&#8221;<br />
print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#8221;</p>
<p>return</p>
<p>!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-<br />
!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</p>
<p><!--                                           - --></p>
]]></content:encoded>
			<wfw:commentRss>http://tmackinnon.com/pci-easi-script-pix_to_shp_batch_export-eas.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Multiple File Subset Script &#8211; PCI EASI Script</title>
		<link>http://tmackinnon.com/mul_subset.php</link>
		<comments>http://tmackinnon.com/mul_subset.php#comments</comments>
		<pubDate>Sat, 05 Jan 2008 01:55:24 +0000</pubDate>
		<dc:creator>tmackinnon</dc:creator>
				<category><![CDATA[EASI Scripts]]></category>
		<category><![CDATA[air photos]]></category>
		<category><![CDATA[batch]]></category>
		<category><![CDATA[EASI]]></category>
		<category><![CDATA[fiducial marks]]></category>
		<category><![CDATA[output directory]]></category>
		<category><![CDATA[PCI]]></category>
		<category><![CDATA[program]]></category>
		<category><![CDATA[scipts]]></category>
		<category><![CDATA[subset]]></category>

		<guid isPermaLink="false">http://tmackinnon.com/?p=475</guid>
		<description><![CDATA[This EASI script in PCI will batch subset a directory of input files based on a defined input window.]]></description>
			<content:encoded><![CDATA[<p style="text-align: justify;"><!--                                           - -->This simple EASI script used with the MODEL command in PCI will batch subset a directory of input files based on a defined input window. It assumes that all the input files will all be located within the same specified directory, all the files will be of the same format with three channels and that the output directory does not already contain any files.</p>
<p style="text-align: justify;">This was originally created for PCI Geomatica v9.1 but was last tested and working with no problems in PCI Geomatica v10.0 – Just copy the code below into a blank text file and edit as needed.</p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> ! Multiple File Subset Script [mul_subset.eas] </span><br />
<span style="color: #888888;"> !</span><br />
<span style="color: #888888;"> ! This script was originally written for a user who wanted</span><br />
<span style="color: #888888;"> ! to have all of the fiducial marks and details removed from</span><br />
<span style="color: #888888;"> ! their air photos.</span><br />
<span style="color: #888888;"> !</span><br />
<span style="color: #888888;"> !</span><span style="color: #888888;"> This script assumes that all the input files will all be located</span><br />
<span style="color: #888888;"> ! within a given directory, all the files will be of the same format</span><br />
<span style="color: #888888;"> ! with three channels and that the output directory does not contain</span><br />
<span style="color: #888888;"> ! any files.</span><br />
<span style="color: #888888;"> !</span><br />
<span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;"> ! Define variables</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!for input and output directory local string in_files, out_files</span><br />
<span style="color: #888888;"> !for directory listing of the input directories</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">local mstring dirlist</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!for the file format and extension types</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">local string type, ext</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!file names</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">local string bn, fn</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!Parameters for the subset window</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">local integer x, y, width, height</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">local integer i</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">local $Z</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">local string confirm</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> ! Clear the EASI window and then show the header information</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">PRINT @(1 ,1,CLREOS)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print @reverse,&#8221; Multiple Subset &#8220;,@alloff</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;This script assumes that all the input files will all be located&#8221;</span><br />
<span style="color: #888888;"> print &#8220;within a given directory, the files will be of the same format,&#8221;</span><br />
<span style="color: #888888;"> print &#8220;have three image channels, will be clipped to the same extents and&#8221;</span><br />
<span style="color: #888888;"> print &#8220;that the output directory will not contain any files.&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> ! Collect input from user</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;Enter the directory that contains the input files:&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">input &#8220;&gt;&#8221; in_files</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;Enter the directory for the output files:&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">input &#8220;&gt;&#8221; out_files</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;Enter the file format of the files (3-letter file extension) : &#8220;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">input &#8220;&gt;&#8221; type</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;Enter the X coordinate for the dbiw parameter : &#8220;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">input &#8220;&gt;&#8221; x</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;Enter the Y coordinate for the dbiw parameter : &#8220;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">input &#8220;&gt;&#8221; y</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;Enter the width for the dbiw parameter : &#8220;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">input &#8220;&gt;&#8221; width</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;Enter the height for the dbiw parameter : &#8220;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">input &#8220;&gt;&#8221; height</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">PRINT @(1 ,1,CLREOS)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> ! Confirm with user to ensure that the parameters are correct</span><br />
<span style="color: #888888;"> ! If they are correct then continue with the script and if they are not</span><br />
<span style="color: #888888;"> ! then run the script over again.</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;The input directory you specified was:&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8221; &#8220;, in_files</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;The output directory you specified was:&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8221; &#8220;, out_files</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;The file format you specified was:&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8221; &#8220;, type</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;The initial coordinate of the clip you specified was:&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8221; &#8220;, x, &#8221; &#8220;, y</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;Your image size you specified was:&#8221;</span><br />
<span style="color: #888888;"> print &#8221; &#8220;, width, &#8221; &#8220;, height</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;Are these parameters correct? (Y/N)&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">input &#8220;&gt;&#8221; confirm</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">if (confirm ~= &#8220;y&#8221; or confirm ~= &#8220;Y&#8221; ) then</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> ! Get the contents of the directory</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">dirlist = getdirectory(in_files)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">let $Z = &#8220;\</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">for i = 1 to f$len(dirlist)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> ! Extract parts of the filenames</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">fn = in_files + $Z + dirlist[i]</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">ext = getfileextension(fn)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">bn = getfilebasename(fn)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">if (ext ~= type) then</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;Clipping:&#8221;, bn, &#8220;.&#8221;, ext</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> ! Set up the parameters and execute the FEXPORT command</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">fili = in_files + $Z + dirlist[i]</span><br />
<span style="color: #888888;"> filo = out_files + $Z + bn +&#8221;_clipped&#8221;</span><br />
<span style="color: #888888;"> dbiw = x, y, width, height</span><br />
<span style="color: #888888;"> dbic = 1,2,3</span><br />
<span style="color: #888888;"> dbib =</span><br />
<span style="color: #888888;"> dbvs =</span><br />
<span style="color: #888888;"> dblut =</span><br />
<span style="color: #888888;"> dbpct =</span><br />
<span style="color: #888888;"> ftype = type</span><br />
<span style="color: #888888;"> foptions =</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">R Fexport</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">PRINT @(1 ,1,CLREOS)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">endif</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">endfor</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">else</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">run &#8220;mul_subset.eas</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">endif</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">PRINT @(1 ,1,CLREOS)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#8221;</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;The clipped files are stored in the following directory:&#8221;</span><br />
<span style="color: #888888;"> print &#8221; &#8220;, out_files</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print @reverse,&#8221; Multiple Subset EASI Script Finished &#8220;,@alloff</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">return</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://tmackinnon.com/mul_subset.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script to generate a PIX file large enough to contain all input DEM files</title>
		<link>http://tmackinnon.com/mul_dem_mosaic.php</link>
		<comments>http://tmackinnon.com/mul_dem_mosaic.php#comments</comments>
		<pubDate>Fri, 04 Jan 2008 01:41:12 +0000</pubDate>
		<dc:creator>tmackinnon</dc:creator>
				<category><![CDATA[EASI Scripts]]></category>
		<category><![CDATA[DEM]]></category>
		<category><![CDATA[EASI]]></category>
		<category><![CDATA[EASI script]]></category>
		<category><![CDATA[files]]></category>
		<category><![CDATA[Geomatica]]></category>
		<category><![CDATA[input]]></category>
		<category><![CDATA[MODEL]]></category>
		<category><![CDATA[mosaic]]></category>
		<category><![CDATA[output]]></category>
		<category><![CDATA[PCI]]></category>
		<category><![CDATA[PIX]]></category>
		<category><![CDATA[script]]></category>

		<guid isPermaLink="false">http://tmackinnon.com/?p=470</guid>
		<description><![CDATA[This simple EASI script used with the MODEL command in PCI will generate an output PIX file with extents large enough to contain all of the files and then mosaic each of the input files into the output DEM file.]]></description>
			<content:encoded><![CDATA[<p>Below is a simple EASI script used with the MODEL command in PCI will generate an output PIX file with extents large enough to contain all of the input files PIX files and then mosaic each of the input files into the output pix file. It was designed to mosaic several DEM files into one large DEM file.</p>
<p>This was originally created for PCI Geomatica v9.1 but was last tested and working with no problems in PCI Geomatica v10.0 – Just copy the code below into a blank text file and edit as needed.</p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;"> ! Multiple DEM Mosaic Script</span><br />
<span style="color: #888888;"> ! [mul_DEM_mosaic.eas]</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">! Ted MacKinnon – tmackinnon.com</span><br />
<span style="color: #888888;"> !</span><br />
<span style="color: #888888;"> ! This script will generate an output PIX file with extents large enough</span><br />
<span style="color: #888888;"> ! to contain all of the input files and then mosaic each of the input</span><br />
<span style="color: #888888;"> ! files into the new output pix file.</span><br />
<span style="color: #888888;"> !</span><br />
<span style="color: #888888;"> ! This script was designed to mosaic several DEM files into one large</span><br />
<span style="color: #888888;"> ! DEM file. Each input DEM file must have the same projection,</span><br />
<span style="color: #888888;"> ! resolution and at each DEM should have at least 150m overlap.</span><br />
<span style="color: #888888;"> !</span><br />
<span style="color: #888888;"> ! The user is expected that the user will enter (or verify) the parameters</span><br />
<span style="color: #888888;"> ! of &#8216;CIMPRO&#8217; at the bottom of this script prior to running the script.</span><br />
<span style="color: #888888;"> ! Parmaters such as BXPXSZ and DBIC have been hard coded.</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span><br />
<span style="color: #888888;"> ! Define variables</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!for input &amp; output pix files and pixel size</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">local string inputFile, outputFile</span><br />
<span style="color: #888888;"> local string pixel</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!to obtain list of input files</span><br />
<span style="color: #888888;"> local mstring inputList</span><br />
<span style="color: #888888;"> local integer inputIndex</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!for extracting georeferencing information</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">local GeoInfo geoInfo</span><br />
<span style="color: #888888;"> local integer geoFile</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!to contain bounding rectangle of all input files</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">local double boundULX, boundULY, boundLRX, boundLRY</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> ! Clear the EASI window and then show the header information</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">PRINT @(1 ,1,CLREOS)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span><br />
<span style="color: #888888;"> &#8220;</span><br />
<span style="color: #888888;"> print @reverse,&#8221; &#8216;Mosaic multiple DEM files&#8217; EASI Script &#8220;,@alloff</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8221; This script will generate an new output PIX file with extents large &#8220;</span><br />
<span style="color: #888888;"> print &#8221; enough to contain all of the PIX files in this directory and then &#8220;</span><br />
<span style="color: #888888;"> print &#8221; mosaic each of the PIX files into the new output file.&#8221;</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8221; The output file will contain the following projection: &#8220;</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">! The projection will be printed to the screen as a general reminder</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8221; UTM 11 S E000&#8243;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> ! Collect input from user</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;Enter the Output file name:&#8221;</span><br />
<span style="color: #888888;"> input &#8220;&gt;&#8221; outputFile</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;Enter the pixel size for: &#8220;,outputfile</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">input &#8220;&gt;&#8221; pixel</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">PRINT @(1 ,1,CLREOS)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> ! Create list of input files</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">sys &#8220;dir *.pix /b &gt; pixlist.txt&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">inputList = Text$Import(&#8220;pixlist.txt&#8221;)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;</span><br />
<span style="color: #888888;"> ! Read georeferencing of each input file</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">for inputIndex = 1 to F$LEN(inputList)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print inputList(inputIndex)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">geoFile = DBOpen(inputList(inputIndex), &#8220;r&#8221;)</span><br />
<span style="color: #888888;"> call DBReadGeoInfo(geoFile, geoInfo)</span><br />
<span style="color: #888888;"> call DBClose(geoFile)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;Georeferencing: &#8220;, geoInfo.Units</span><br />
<span style="color: #888888;"> print &#8220;Image extents: &#8220;,geoInfo.ULX, &#8220;, &#8220;, geoInfo.ULY, &#8221; &#8220;, geoInfo.LRX, &#8220;, &#8220;, geoInfo.LRY</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">PRINT @(1 ,1,CLREOS)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> ! initialize bounds using first file</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">if inputIndex = 1 then</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">boundULX = geoInfo.ULX</span><br />
<span style="color: #888888;"> boundULY = geoInfo.ULY</span><br />
<span style="color: #888888;"> boundLRX = geoInfo.LRX</span><br />
<span style="color: #888888;"> boundLRY = geoInfo.LRY</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">else</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span><br />
<span style="color: #888888;"> ! assumes UTM projection (ULY &gt; LRY)</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">if geoInfo.ULX &lt; boundULX then</span><br />
<span style="color: #888888;"> boundULX = geoInfo.ULX</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">endif</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">if geoInfo.ULY &gt; boundULY then</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">boundULY = geoInfo.ULY</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">endif</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">if geoInfo.LRX &gt; boundLRX then</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">boundLRX = geoInfo.LRX</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">endif</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">if geoInfo.LRY &lt; boundLRY then</span><br />
<span style="color: #888888;"> boundLRY = geoInfo.LRY</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">endif</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">endif</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">endfor</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print outputFile, &#8221; file extents: &#8220;, boundULX, &#8221; &#8220;, boundULY, &#8221; &#8220;, boundLRX, &#8221; &#8220;, boundLRY</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> ! create the output PIX file containing bounds</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">FILE = outputFile</span><br />
<span style="color: #888888;"> TEX1 =</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!Specify the # of channels here</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">DBNC = 1,0,0,0</span><br />
<span style="color: #888888;"> DBLAYOUT = &#8220;PIXEL&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!Specify the projection info here</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">PROJECT = &#8220;UTM&#8221;</span><br />
<span style="color: #888888;"> ZONE = 11</span><br />
<span style="color: #888888;"> ROW = &#8220;S&#8221;</span><br />
<span style="color: #888888;"> ELLIPS = &#8220;0&#8243;</span><br />
<span style="color: #888888;"> LLBOUND = &#8220;N&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">ULX = F$STRING(boundULX)</span><br />
<span style="color: #888888;"> ULY = F$STRING(boundULY)</span><br />
<span style="color: #888888;"> LRX = F$STRING(boundLRX)</span><br />
<span style="color: #888888;"> LRY = F$STRING(boundLRY)</span><br />
<span style="color: #888888;"> BXPXSZ = pixel</span><br />
<span style="color: #888888;"> BYPXSZ = pixel</span><br />
<span style="color: #888888;"> REPORT = &#8220;TERM&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">run CIMPRO</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> ! Mosaic each PIX file from the listing into the outputfile</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">inputList = Text$Import(&#8220;pixlist.txt&#8221;)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">for inputIndex = 1 to F$LEN(inputList)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">inputFile = inputList(inputIndex)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span><br />
<span style="color: #888888;"> ! Clear the EASI window and show progress</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">PRINT @(1 ,1,CLREOS)</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">print &#8220;&#8221;</span><br />
<span style="color: #888888;"> print &#8220;Mosaicking &#8220;, inputFile, &#8221; into &#8220;, outputFile</span><br />
<span style="color: #888888;"> print &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">FILI = inputFile</span><br />
<span style="color: #888888;"> DBIC = 1</span><br />
<span style="color: #888888;"> DBVS =</span><br />
<span style="color: #888888;"> DBLUT =</span><br />
<span style="color: #888888;"> FILO = outputFile</span><br />
<span style="color: #888888;"> DBOC = 1</span><br />
<span style="color: #888888;"> BLEND =</span><br />
<span style="color: #888888;"> BACKVAL = 0</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">run MOSAIC</span></p>
<p style="padding-left: 30px;"><span style="color: #888888;">endfor</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span><br />
<span style="color: #888888;"> !&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;">
]]></content:encoded>
			<wfw:commentRss>http://tmackinnon.com/mul_dem_mosaic.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Script to clip the unnecessary excess portions of an air photo mosaic</title>
		<link>http://tmackinnon.com/bitmap_clip.php</link>
		<comments>http://tmackinnon.com/bitmap_clip.php#comments</comments>
		<pubDate>Thu, 03 Jan 2008 01:31:56 +0000</pubDate>
		<dc:creator>tmackinnon</dc:creator>
				<category><![CDATA[EASI Scripts]]></category>
		<category><![CDATA[airphoto]]></category>
		<category><![CDATA[buffered]]></category>
		<category><![CDATA[clip]]></category>
		<category><![CDATA[EASI script]]></category>
		<category><![CDATA[MODEL]]></category>
		<category><![CDATA[mosaic]]></category>
		<category><![CDATA[Ortho Engine]]></category>
		<category><![CDATA[PCI Geomatica]]></category>

		<guid isPermaLink="false">http://tmackinnon.com/?p=464</guid>
		<description><![CDATA[This simple EASI script used with the MODEL command in PCI will clip the unnecessary excess portions of an airphoto mosaic created from Ortho Engine to an irregular buffered shape around a set study area. ]]></description>
			<content:encoded><![CDATA[<p>Below is a simple EASI script that when used with the MODEL command in PCI will clip the unnecessary excess portions of an air photo mosaic created from Ortho Engine to an irregular buffered shape around a set study area. This was originally created for PCI Geomatica v9.1 but was last tested and working with no problems in PCI Geomatica v10.0 &#8211; Just copy the code below into a blank text file and edit as needed.</p>
<p style="padding-left: 30px;"><span style="color: #808080;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! Irregular_Polygon_Clip [bitmap_clip.eas]</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! Ted MacKinnon &#8211; tmackinnon.com</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! This simple script used with the MODEL command in PCI EASI</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! will clip the unnecessary excess portions of an airphoto mosaic</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! to an irregular buffered shape around the study area.</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">!</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! The working file &#8216;working-file.pix&#8217; has the existing</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! mosaic image located in the first three channels,</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! an existing irregular shaped polygon bitmap and</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! three empty 8 bit channels.</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">!</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! %%2 is the bitmap mask of the irregular shape</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! %1, %2, %3 are the RGB existing image channels</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! %4, %5, %6 will be the new modeled RGB image channels</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! the RGB value of 255, 255, 255 will set the background to white</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">!</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! Simply change the file name to use this script with a different</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! file and ensure that the channels and segments are setup the same</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! Set up and run the model</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">MODEL ON &#8220;working-file.pix&#8221; OVER dbiw</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">if %%2 = 1 then</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">%4 = %1;</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">%5 = %2;</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">%6 = %3;</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">else</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">%4 = 255;</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">%5 = 255;</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">%6 = 255;</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">endif;</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">ENDMODEL</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">! Export the resultant channels to a new file</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;-</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">FILI = &#8220;working-file.pix</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">FILO = &#8220;mosaic_clipped.tif</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">DBIW =</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">DBIC = 4,5,6</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">DBIB =</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">DBVS =</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">DBLUT =</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">DBPCT =</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">FTYPE = &#8220;TIF</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">FOPTIONS = &#8220;&#8221;</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">RUN FEXPORT</span></p>
<p style="padding-left: 30px;"><span style="color: #808080;">!&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8212;&#8211;</span></p>
<p>&nbsp;</p>
]]></content:encoded>
			<wfw:commentRss>http://tmackinnon.com/bitmap_clip.php/feed</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

