I think that macos have their native bash interpreter (aka the TERMINAL). <div><br></div><div>if so a simple </div><div><br></div><div><pre class="default prettyprint" style="margin-top:0px;margin-bottom:10px;padding:5px;border:0px;font-size:14px;vertical-align:baseline;background-color:rgb(238,238,238);font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif;overflow:auto;width:auto;max-height:600px;line-height:18px;text-align:left">
<code style="margin:0px;padding:0px;border:0px;vertical-align:baseline;font-family:Consolas,Menlo,Monaco,'Lucida Console','Liberation Mono','DejaVu Sans Mono','Bitstream Vera Sans Mono','Courier New',monospace,serif"><span class="kwd" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">for</span><span class="pln" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> file </span><span class="kwd" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">in</span><span class="pln" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> `ls </span><span class="pun" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">*.shp`</span><span class="pln" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="pun" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span class="pln" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="kwd" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">do</span><span class="pln" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> ogr2ogr <ogr2ogr-commands> $file</span><span class="pun" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent">;</span><span class="pln" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent"> </span><span class="kwd" style="margin:0px;padding:0px;border:0px;vertical-align:baseline;background-color:transparent;color:rgb(0,0,139)">done</span></code></pre>
<div><br></div><div>should do the trick. Just run it from the terminal inside the folder you have your shapes, or write it down to a file, make it executable (chmod +x the-script.sh) and run it (double click?) </div><div>
The above might need some fine-tuning thats the general idea :)</div><div><br></div><div>happy scripting </div><div><br></div><div>Nick Ves</div><br><div class="gmail_quote">On Sat, May 19, 2012 at 11:53 AM, gvSIGMac <span dir="ltr"><<a href="mailto:gvsig.mac@gmail.com" target="_blank">gvsig.mac@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div bgcolor="#FFFFFF"><div>If you got Qgis from</div><div><a href="http://www.kyngchaos.com" target="_blank">www.kyngchaos.com</a> </div>
<div>you already have ogr2ogr in your system thru gdal</div><div><a href="http://www.kyngchaos.com/software/frameworks" target="_blank">http://www.kyngchaos.com/software/frameworks</a></div><div>You only need to set your path or run</div>
<div>/Library/Frameworks/GDAL.framework/Versions/Current/Programs/ogr2ogr <br><div>________________________________</div>Agustin</div><div><div class="h5"><div><br>On 18/05/2012, at 20:23, Chris Henrick <<a href="mailto:chrishenrick@gmail.com" target="_blank">chrishenrick@gmail.com</a>> wrote:<br>
<br></div><div></div><blockquote type="cite"><div><font size="4"><font face="georgia,serif">Thanks for the pointer David, I appreciate it.</font></font><div><font size="4"><font face="georgia,serif"><br></font></font></div>
<div><font size="4"><font face="georgia,serif">I'm using QGIS 1.7.4 on Mac OSX 10.6.8, so I can run ogr2ogr in linux. I'm not too familiar with running code in terminal, but a friend recomended installing home brew and xcode first. Do you know of any helpful tutorials to help a newby get started with running open source command line code? </font></font></div>
<div><font size="4"><font face="georgia,serif"><br></font></font></div><div><font size="4"><font face="georgia,serif">regards,<br clear="all">
</font></font><font style="font-family:georgia,serif" size="2"><br></font><font face="georgia, serif"><font style="font-family:georgia,serif" size="4">-Chris</font> </font><br>
<br><br><div class="gmail_quote">On Fri, May 18, 2012 at 11:12 AM, David J. Bakeman <span dir="ltr"><<a href="mailto:dbakeman@comcast.net" target="_blank">dbakeman@comcast.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<u></u>
<div bgcolor="#ffffff" text="#000000"><div>
Chris Henrick wrote:
<blockquote type="cite"><font size="4"><font face="georgia,serif">Hi there,</font></font>
<div><font size="4"><font face="georgia,serif"><br>
</font></font></div>
<div><font size="4"><font face="georgia,serif">Does anyone have a
python script or know of a 3rd party plug in that will allow a
directory of shapefiles to be reprojected into a specified CRS? Would
also be helpful to do the same with the clip tool</font></font></div>
</blockquote></div>
You didn't say what OS so your mileage may vary. For this kind of
operation I would use the ogr2ogr application from the gdal utilities.
I believe if you're using the windows osgeo install that it is
installed if you're using linux it's a matter of installing gdal which
if you have qgis it's probably already there.<br>
<br>
So to reproject a bunch of shapefiles the source files in d0 and the
destination in d1:<br>
<br>
ogr2ogr -t_srs (specify the target CRS you can use proj4 string or an
existing .prj file) d1 d0<br>
<br>
The default type for ogr2ogr is shapefile so you don't need to specify
a type even. ogr2ogr also does other operations including clipping.<br>
<blockquote type="cite"><div>
<div><font size="4"><font face="georgia,serif"><br>
</font></font></div>
<div><font size="4"><font face="georgia,serif">I'm a fairly novice
programmer so any advice would be appreciated.</font></font></div>
<div><font size="4"><font face="georgia,serif"><br>
</font></font></div>
<div><font size="4"><font face="georgia,serif">thanks,<br clear="all">
</font></font><font style="font-family:georgia,serif" size="2"><br>
</font><font face="georgia, serif"><font style="font-family:georgia,serif" size="4">-Chris</font> </font><br>
</div>
</div><pre><fieldset></fieldset>
_______________________________________________
Qgis-user mailing list
<a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a>
</pre>
</blockquote>
<br>
</div>
</blockquote></div><br></div>
</div></blockquote><blockquote type="cite"><div><span>_______________________________________________</span><br><span>Qgis-user mailing list</span><br><span><a href="mailto:Qgis-user@lists.osgeo.org" target="_blank">Qgis-user@lists.osgeo.org</a></span><br>
<span><a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a></span><br></div></blockquote></div></div></div><br>_______________________________________________<br>
Qgis-user mailing list<br>
<a href="mailto:Qgis-user@lists.osgeo.org">Qgis-user@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/mailman/listinfo/qgis-user" target="_blank">http://lists.osgeo.org/mailman/listinfo/qgis-user</a><br>
<br></blockquote></div><br></div>