<div>Hi Jukka,</div>
<div>&nbsp;</div>
<div>I've tried what you said, but it doen't work.</div>
<div>&nbsp;</div>
<div>the command &quot;dir /b *.shp&gt;call_convert.bat&quot; just simply writes the file path into the call_convert.bat file, and the convert.bat command is never be called.</div>
<div>&nbsp;</div>
<div>after performing &quot;dir /b *.shp&gt;call_convert.bat&quot; I get the file path in the call_convert.bat instead of call convert.bat destination_1 source_1<br>and call convert.bat destination_2 source_2.</div>
<div>&nbsp;</div>
<div>something is wrong?</div>
<div>&nbsp;</div>
<div>thanks </div>
<div>&nbsp;</div>
<div>zhonghai<br>&nbsp;</div>
<div><span class="gmail_quote">On 5/18/06, <b class="gmail_sendername">Rahkonen Jukka</b> &lt;<a href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi</a>&gt; wrote:</span>
<blockquote class="gmail_quote" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid">Hi,<br><br>Another alternative is to make one batch file (.bat) for the actual conversion and call it with parameters from another. Like this
<br><br>convert.bat<br>========<br><br>ogr2ogr [-all fixed parameters like -s_srs and -t_srs here] %1 %2<br><br><br>call_convert.bat<br>===========<br>call convert.bat destination_1 source_1<br>call convert.bat destination_2 source_2
<br>call convert.bat destination_3 source_3<br>etc.<br><br>Conversion is started by running &quot;call_convert.bat&quot;, and &quot;destination_1&quot; and &quot;source_1&quot; will be treated as %1 and %2 by the &quot;convert.bat
&quot;, respectively.<br><br>To start with call_conver.bat you can first insert all your shapefiles there by command<br>dir /b *.shp &gt;call_convert.bat<br><br>dir /b /s puts there all shapefiles from subdirectories as well.
<br><br>This may be a brutal way but it has some advantages.&nbsp;&nbsp;For example you can add some extra commands to &quot;convert.bat&quot;&nbsp;&nbsp;to be executed after each conversion. This way I use to make log files with time stamps about raster file batch conversions.
<br><br>Regards,<br><br>-Jukka Rahkonen-<br><br><br><br>________________________________<br><br>Lähettäjä: UMN MapServer Users List puolesta: Jelmer Baas<br>Lähetetty: to 18.5.2006 8:17<br>Vastaanottaja: <a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">
MAPSERVER-USERS@LISTS.UMN.EDU</a><br>Aihe: Re: [UMN_MAPSERVER-USERS] ogr2ogr reprojection<br><br><br><br>Zhonghai Wang wrote:<br>&gt; Hi,<br>&gt;<br>&gt; I've tried with this batch command, but I failed, because I don't know
<br>&gt; how to specify the -s_srs and -t_srs parameters, should it be something<br>&gt; like this?<br>&gt;<br>&gt;&gt;&nbsp;&nbsp;for %a in (*.shp) do ogr2ogr.exe %a -init=epsg:4326 -init=world:CH1903<br>&gt;<br>&gt; **init=world:CH1903 is for switzerland, and I am sure that this
<br>&gt; projection code is right.<br><br>yeah, this should do it. Sorry for my short last response though.<br><br>This should execute<br>ogr2ogr.exe &lt;filename&gt; -init=epsg:4326 -init=world:CH1903<br><br>For each .shp file you have. What is the error you receive? Perhaps the
<br>ogr2ogr.exe isn't in the same folder?<br><br>--<br>Jelmer Baas<br></blockquote></div><br>