ogr2ogr with file list

Tyler Mitchell tylermitchell at SHAW.CA
Tue Jul 26 10:26:22 PDT 2005


Hi Yar,
I'm pretty sure I've done this before, but not sure I've done it to create a shapefile.  

Instead of specifying a single input shapefile as the dataset, specify a folder containing several shapefiles.  Then also specify an alternate output layer name.  Something like this might work...

ogr2ogr -t_srs WGS84 /data/merged.shp /data/inputshp/ -nln merged

I'm going to need to do the same thing shortly, so I will find out what mistakes I made here.  Don't forget that it's:

ogr2ogr <output dataset> <input dataset> [<input layer> optional]

----- Original Message -----
From: Yar Doroshenko <numerous at GMAIL.COM>
Date: Tuesday, July 26, 2005 10:08 am
Subject: [UMN_MAPSERVER-USERS] ogr2ogr with file list

> Hi Guys,
> 
> I'm working on automating my shapefile coordinate conversions. I 
> know how
> to do single file conversion:
> 
> ogr2ogr input.shp output.shp -t_srs WGS84
> 
> Now, can I automate the process? Let's say I have a list of 
> shapefiles that
> I want to convert, would I do something like:
> 
> for %f in (path_here\list.in) do ogr2ogr %f
> 
> I tried this one in many different ways, but I do get errors.
> 
> Would anyone have a correct syntax for multiple file conversions?
> 
> Thank you
> 
> Yar
> 



More information about the MapServer-users mailing list