[GRASS-user] Re: batch conversion of ESRI to MapInfo

Hermann Peifer peifer at gmx.eu
Sat Jan 29 06:48:51 EST 2011


 > ogr2ogr -f "MapInfo File" mapinfo/$file.tab $file

You could cut away the "shp" suffix like this:
ogr2ogr -f "MapInfo File" mapinfo/${file%shp}tab $file

I am not fully sure what "real world co-ordinates" means, but this 
additional switch might do what you expect:

-t_srs epsg:4326

Hermann

On 29/01/2011 10:53, Saber Razmjooei wrote:
> Mik
>
> As suggested, better to use ogr2ogr.
> if you use linux:
> 1- Create an empty text file in the folder where your shapefiles are
> located
> 2- Open the text file and copy paste these:
>
> mkdir ./mapinfo
> for file in *.shp
> do
>    ogr2ogr -f "MapInfo File" mapinfo/$file.tab $file
> done
>
> 3-save the file as convert.sh
> 4- from the terminal, run convert.sh
> 	$ cd /PATH/TO/SHAPEFILES/
> 	$ sh convert.sh
> 5- all your mapinfo files should appear under mapinfo folder.
>
> Cheers
> Sab
>
>


More information about the grass-user mailing list