[GRASS-user] Re: batch conversion of ESRI to MapInfo
Saber Razmjooei
razmjooeis at faunalia.co.uk
Sat Jan 29 09:37:34 EST 2011
On Sat, 2011-01-29 at 12:48 +0100, Hermann Peifer wrote:
> > 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
indeed!
cheers
Sab
>
> 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