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> <<a href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi</a>> 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 "epsg:4323" should work if there exists epsg-code for your projection. Similarly -t_srs "epsg: " 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>>>>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 "-init=world:CH1903" 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 <<a href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi</a>> wrote:<br>><br>> Hi,<br>><br>> I'm sorry about not being clear enough. You must manually edit the
<br>> "call_convert.bat" by adding the missing parts, that is "call convert.bat" in the beginning of each row, and target name at the end of the row.<br>> Redirecting the file list to batch file prototype is only to help you in
<br>> 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<br>> rows only and test with that. When you see that it works you can put all
<br>> 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 "dir /b *.shp>call_convert.bat" just simply writes the file<br>> path into the call_convert.bat file, and the convert.bat command is never
<br>> be called.<br>><br>> after performing "dir /b *.shp>call_convert.bat" I get the file path in<br>> 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 <<a href="mailto:Jukka.Rahkonen@mmmtike.fi">Jukka.Rahkonen@mmmtike.fi
</a>> wrote:<br>><br>> Hi,<br>><br>> Another alternative is to make one batch file (.bat) for the actual<br>> 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 "call_convert.bat", and
<br>> "destination_1" and "source_1" will be treated as %1 and %2 by the "<br>> convert.bat ", respectively.<br>><br>> To start with call_conver.bat you can first insert all your
<br>> shapefiles there by command<br>> dir /b *.shp >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. For example
<br>> you can add some extra commands to "convert.bat" to be executed after<br>> each conversion. This way I use to make log files with time stamps about<br>> 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>> > Hi,<br>> ><br>> > I've tried with this batch command, but I failed, because I don't<br>> know<br>> > how to specify the -s_srs and -t_srs parameters, should it be
<br>> something<br>> > like this?<br>> ><br>> >> for %a in (*.shp) do ogr2ogr.exe %a -init=epsg:4326<br>> -init=world:CH1903<br>> ><br>> > **init=world:CH1903 is for switzerland, and I am sure that this
<br>> > 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 <filename> -init=epsg:4326 -init=world:CH1903
<br>><br>> For each .shp file you have. What is the error you receive? Perhaps<br>> the<br>> ogr2ogr.exe isn't in the same folder?<br>><br>> --<br>> Jelmer Baas<br>><br>
><br>><br>><br><br></blockquote></div><br>