<div>Hi,</div>
<div>&nbsp;</div>
<div>what you have said works fine, but now something is wrong again with the srs definition, the error messages on the console are:</div>
<div>&nbsp;</div>
<div>&gt;&gt;&gt;SRS_Def can be a full WKT definition, or a well known definition, i.e. epsg:4326 or a file with a WKT definition.</div>
<div>&nbsp;</div>
<div>in the call_convert.bat, I defined like this:</div>
<div><br>call convert.bat boundary.shp COUNTRY_region.shp<br>call convert.bat forests.shp FOREST_region.shp<br>&nbsp;</div>
<div>and in the convert.bat file:</div>
<div>&nbsp;</div>
<div>ogr2ogr -init=world:CH1903 -init=epsg:4326 %1 %2</div>
<div>&nbsp;</div>
<div>it seems that the project definition &quot;-init=world:CH1903&quot; is not right, but I use it also in other mapfiles, and it works well.</div>
<div>&nbsp;</div>
<div>anything wrong?</div>
<div>&nbsp;</div>
<div>zhonghai</div>
<div>&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>I'm sorry about not being clear enough. You must manually edit the &quot;call_convert.bat&quot; by adding the missing parts, that is &quot;call 
convert.bat &quot; in the beginning of each row, and target name at the end of the row. Redirecting the file list to batch file prototype is only to help you in creating the working launching bat-file including all your shapefiles.
<br><br>I suggest you to make first make manually a launch file with two or three rows only and test with that. When you see that it works you can put all your shapefiles on the list.<br><br>Regards,<br><br>-Jukka-<br><br>
________________________________<br><br>Lähettäjä: UMN MapServer Users List puolesta: Zhonghai Wang<br>Lähetetty: to 18.5.2006 13:29<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>Hi Jukka,<br><br>I've tried what you said, but it doen't work.<br><br>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.<br><br>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.<br><br>something is wrong?<br><br>thanks<br><br>zhonghai<br><br>On 5/18/06, Rahkonen Jukka &lt;<a href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi</a>&gt; wrote:<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Hi,
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Another alternative is to make one batch file (.bat) for the actual conversion and call it with parameters from another. Like this<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; convert.bat<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ========<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ogr2ogr [-all fixed parameters like -s_srs and -t_srs here] %1 %2
<br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call_convert.bat<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ===========<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call convert.bat destination_1 source_1<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call convert.bat destination_2 source_2<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; call convert.bat destination_3 source_3<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; etc.
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; To start with call_conver.bat you can first insert all your shapefiles there by command
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dir /b *.shp &gt;call_convert.bat<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dir /b /s puts there all shapefiles from subdirectories as well.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Regards,<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -Jukka Rahkonen-<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ________________________________
<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lähettäjä: UMN MapServer Users List puolesta: Jelmer Baas<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Lähetetty: to 18.5.2006 8:17<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Vastaanottaja: <a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</a><br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Aihe: Re: [UMN_MAPSERVER-USERS] ogr2ogr reprojection<br><br><br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Zhonghai Wang wrote:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; Hi,<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; I've tried with this batch command, but I failed, because I don't know
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; how to specify the -s_srs and -t_srs parameters, should it be something<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; like this?<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;&gt;&nbsp;&nbsp;for %a in (*.shp) do ogr2ogr.exe %a -init=epsg:4326 -init=world:CH1903<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt;<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; **init=world:CH1903 is for switzerland, and I am sure that this<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &gt; projection code is right.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; yeah, this should do it. Sorry for my short last response though.<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; This should execute
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ogr2ogr.exe &lt;filename&gt; -init=epsg:4326 -init=world:CH1903<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; For each .shp file you have. What is the error you receive? Perhaps the<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; ogr2ogr.exe isn't in the same folder?<br><br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; --
<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Jelmer Baas<br><br><br><br></blockquote></div><br>