<div dir="ltr">as a complete n00b to batch variables, i'm having a little difficulty...<br><br><br>C:\user\shp\census>batchreproj.bat<br><br>C:\user\shp\census>set prj_params=-s_srs epsg:4269 -t_srs epsg:2229<br>
<br>C:\user\shp\census>for %g in (*.shp) do (ogr2ogr -f "esri shapefile" -s_srs ep<br>sg:4269 -t_srs epsg:2229 output\%g %g )<br><br>C:\user\shp\census>(ogr2ogr -f "esri shapefile" -s_srs epsg:4269 -t_srs epsg:2<br>
229 output\fe_2007_06083_taz00.shp fe_2007_06083_taz00.shp )<br>ERROR 1: Failed to create file .shp file.<br>ERROR 4: Failed to open Shapefile `output\fe_2007_06083_taz00.shp'.<br><br>ERROR 1: Terminating translation prematurely after failed<br>
translation of layer fe_2007_06083_taz00<br><br><br><div class="gmail_quote">On Wed, Oct 1, 2008 at 9:09 AM, Matt Wilkie <span dir="ltr"><<a href="mailto:matt.wilkie@gov.yk.ca">matt.wilkie@gov.yk.ca</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">If you're on windows, try something like this:<br>
<br>
set prj_params=-s_srs epsg:4617 -t_srs epsg:3578<br>
<br>
for %%g in (*.shp) do (<br>
ogr2ogr -f "esri shapefile" %prj_params% output\%%g %%g<br>
)<br>
<br>
<br>
Change prj_params to suit your source and destination projections of course. There are some more involved examples at<br>
<a href="http://code.google.com/p/maphew/source/browse/#svn/trunk/gis/canvec" target="_blank">http://code.google.com/p/maphew/source/browse/#svn/trunk/gis/canvec</a><br>
and <a href="http://code.google.com/p/maphew/source/browse/#svn/trunk/gis/geobase" target="_blank">http://code.google.com/p/maphew/source/browse/#svn/trunk/gis/geobase</a><br>
<br>
cheers,<br>
<br>
matt wilkie<br>
--------------------------------------------<br>
Geographic Information,<br>
Information Management and Technology,<br>
Yukon Department of Environment<br>
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9<br>
867-667-8133 Tel * 867-393-7003 Fax<br>
<a href="http://environmentyukon.gov.yk.ca/geomatics/" target="_blank">http://environmentyukon.gov.yk.ca/geomatics/</a><br>
--------------------------------------------<br>
<br>
<br>
pyroGIS wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div><div></div><div class="Wj3C7c">
hello members,<br>
<br>
i've recently seen the light and have begun a full embrace of FWTools, gdal, ogr2ogr, etc. i imagine this is a basic question for some of you out there:<br>
<br>
what is the syntax for a batch reproject operation of a folder full of shapefiles from one coord sys to another?<br>
<br>
i cannot find an example within the -help or through various google queries...thank you_larso<br>
<br>
<br></div></div>
------------------------------------------------------------------------<br>
<br>
_______________________________________________<br>
FWTools mailing list<br>
<a href="mailto:FWTools@lists.maptools.org" target="_blank">FWTools@lists.maptools.org</a><br>
<a href="http://lists.maptools.org/mailman/listinfo/fwtools" target="_blank">http://lists.maptools.org/mailman/listinfo/fwtools</a><br>
<a href="http://fwtools.maptools.org/" target="_blank">http://fwtools.maptools.org/</a><br>
</blockquote>
<br>
</blockquote></div><br></div>