Hi Jukka,<br><br>thanks for your help, I've got it, Yippee!!!!!<br><br>I've forgot to specify the -t_srs and s_srs indicators, it's fool...........<br><br>thanks again.<br><br>zhonghai<br><br><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="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Hi,<br><br>I cannot make a test right now, nor check the documentation, but if I remember right with ogr2ogr something like -s_srs &quot;epsg:4323&quot; should work if there exists epsg-code for your projection. Similarly -t_srs &quot;epsg:&nbsp;&nbsp; &quot; for the target projection.
<br><br>-Jukka-<br><br><br>-----Original Message-----<br>From: UMN MapServer Users List on behalf of Zhonghai Wang<br>Sent: Thu 18.5.2006 19:54<br>To: <a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU
</a><br>Subject: Re: [UMN_MAPSERVER-USERS] ogr2ogr reprojection<br><br>Hi,<br><br>what you have said works fine, but now something is wrong again with the srs<br>definition, the error messages on the console are:<br><br>&gt;&gt;&gt;SRS_Def can be a full WKT definition, or a well known definition, 
i.e.<br>epsg:4326 or a file with a WKT definition.<br><br>in the call_convert.bat, I defined like this:<br><br>call convert.bat boundary.shp COUNTRY_region.shp<br>call convert.bat forests.shp FOREST_region.shp<br><br>and in the 
convert.bat file:<br><br>ogr2ogr -init=world:CH1903 -init=epsg:4326 %1 %2<br><br>it seems that the project definition &quot;-init=world:CH1903&quot; is not right, but<br>I use it also in other mapfiles, and it works well.
<br><br>anything wrong?<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>&gt;<br>&gt; Hi,<br>&gt;<br>&gt; I'm sorry about not being clear enough. You must manually edit the
<br>&gt; &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.<br>&gt; Redirecting the file list to batch file prototype is only to help you in
<br>&gt; creating the working launching bat-file including all your shapefiles.<br>&gt;<br>&gt; I suggest you to make first make manually a launch file with two or three<br>&gt; rows only and test with that. When you see that it works you can put all
<br>&gt; your shapefiles on the list.<br>&gt;<br>&gt; Regards,<br>&gt;<br>&gt; -Jukka-<br>&gt;<br>&gt; ________________________________<br>&gt;<br>&gt; Lähettäjä: UMN MapServer Users List puolesta: Zhonghai Wang<br>&gt; Lähetetty: to 
18.5.2006 13:29<br>&gt; Vastaanottaja: <a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</a><br>&gt; Aihe: Re: [UMN_MAPSERVER-USERS] ogr2ogr reprojection<br>&gt;<br>&gt;<br>&gt; Hi Jukka,<br>&gt;
<br>&gt; I've tried what you said, but it doen't work.<br>&gt;<br>&gt; the command &quot;dir /b *.shp&gt;call_convert.bat&quot; just simply writes the file<br>&gt; path into the call_convert.bat file, and the convert.bat command is never
<br>&gt; be called.<br>&gt;<br>&gt; after performing &quot;dir /b *.shp&gt;call_convert.bat&quot; I get the file path in<br>&gt; the call_convert.bat instead of call convert.bat destination_1 source_1<br>&gt; and call convert.bat
 destination_2 source_2.<br>&gt;<br>&gt; something is wrong?<br>&gt;<br>&gt; thanks<br>&gt;<br>&gt; zhonghai<br>&gt;<br>&gt; On 5/18/06, Rahkonen Jukka &lt;<a href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi
</a>&gt; wrote:<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Hi,<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Another alternative is to make one batch file (.bat) for the actual<br>&gt; conversion and call it with parameters from another. Like this<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
convert.bat<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;========<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ogr2ogr [-all fixed parameters like -s_srs and -t_srs here] %1 %2<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call_convert.bat<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;===========<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call convert.bat
 destination_1 source_1<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call convert.bat destination_2 source_2<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;call convert.bat destination_3 source_3<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;etc.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Conversion is started by running &quot;call_convert.bat&quot;, and
<br>&gt; &quot;destination_1&quot; and &quot;source_1&quot; will be treated as %1 and %2 by the &quot;<br>&gt; convert.bat &quot;, respectively.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;To start with call_conver.bat you can first insert all your
<br>&gt; shapefiles there by command<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dir /b *.shp &gt;call_convert.bat<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dir /b /s puts there all shapefiles from subdirectories as well.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This may be a brutal way but it has some advantages.&nbsp;&nbsp;For example
<br>&gt; you can add some extra commands to &quot;convert.bat&quot;&nbsp;&nbsp;to be executed after<br>&gt; each conversion. This way I use to make log files with time stamps about<br>&gt; raster file batch conversions.<br>&gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Regards,<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;-Jukka Rahkonen-<br>&gt;<br>&gt;<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;________________________________<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lähettäjä: UMN MapServer Users List puolesta: Jelmer Baas<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Lähetetty: to 
18.5.2006 8:17<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Vastaanottaja: <a href="mailto:MAPSERVER-USERS@LISTS.UMN.EDU">MAPSERVER-USERS@LISTS.UMN.EDU</a><br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Aihe: Re: [UMN_MAPSERVER-USERS] ogr2ogr reprojection<br>&gt;<br>&gt;<br>&gt;<br>
&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Zhonghai Wang wrote:<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; Hi,<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; I've tried with this batch command, but I failed, because I don't<br>&gt; know<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; how to specify the -s_srs and -t_srs parameters, should it be
<br>&gt; something<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; like this?<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;&gt;&nbsp;&nbsp;for %a in (*.shp) do ogr2ogr.exe %a -init=epsg:4326<br>&gt; -init=world:CH1903<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; **init=world:CH1903 is for switzerland, and I am sure that this
<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&gt; projection code is right.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;yeah, this should do it. Sorry for my short last response though.<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;This should execute<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ogr2ogr.exe &lt;filename&gt; -init=epsg:4326 -init=world:CH1903
<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;For each .shp file you have. What is the error you receive? Perhaps<br>&gt; the<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ogr2ogr.exe isn't in the same folder?<br>&gt;<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;--<br>&gt;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Jelmer Baas<br>&gt;<br>
&gt;<br>&gt;<br>&gt;<br><br></blockquote></div><br>