[FWTools] batch reproject shapefiles

Matt Wilkie matt.wilkie at gov.yk.ca
Wed Oct 1 12:09:09 EDT 2008


If you're on windows, try something like this:

    set prj_params=-s_srs epsg:4617 -t_srs epsg:3578

    for %%g in (*.shp) do (
       ogr2ogr -f "esri shapefile" %prj_params% output\%%g %%g
       )


Change prj_params to suit your source and destination projections of 
course. There are some more involved examples at
http://code.google.com/p/maphew/source/browse/#svn/trunk/gis/canvec
and http://code.google.com/p/maphew/source/browse/#svn/trunk/gis/geobase

cheers,

matt wilkie
--------------------------------------------
Geographic Information,
Information Management and Technology,
Yukon Department of Environment
10 Burns Road * Whitehorse, Yukon * Y1A 4Y9
867-667-8133 Tel * 867-393-7003 Fax
http://environmentyukon.gov.yk.ca/geomatics/
--------------------------------------------


pyroGIS wrote:
> hello members,
> 
> 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:
> 
> what is the syntax for a batch reproject operation of a folder full of 
> shapefiles from one coord sys to another?
> 
> i cannot find an example within the -help or through various google 
> queries...thank you_larso
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> FWTools mailing list
> FWTools at lists.maptools.org
> http://lists.maptools.org/mailman/listinfo/fwtools
> http://fwtools.maptools.org/



More information about the FWTools mailing list