[GIS] Mapinfo tab files to PostGIS

ogr2ogrpostgisshapefiletab

We're migrating from Mapinfo to GIS + PostGIS. I have a file questions about file conversion:

  1. Is there any difference between importing directly from tab to PostGIS, compared with converting tab-shapefile-PostGIS? Do either approaches have accuracy issues? We have hundreds of tab files and there is a mix of lat/long and UTM projections.

  2. What's the best way of converting multiple tab files to PostGIS at once? This is my (poor) attempt at using ogr2ogr:

for %f in (*.tab) ogr2ogr -f "PostgreSQL" PG:"host=myhost user=myloginname dbname=mydbname password=mypassword".

I do have the PostGIS shapefile and DBF loader installed but it only works for shapefiles.

Best Answer

You know what? You should use FME to do this. You'll be able to do it using a free trial version, and it'll simplify the whole process for you. You could also do a bunch of data cleansing on the way.

Some thoughts to be aware of:

  • MapInfo files have mixed geometry in them (points, lines, polygons). While you can load this into PostGIS, it's pretty normal to have only one geometry type per table. (QGIS, for example, can't load a mixed table all at once)
  • Using FME you'll be able to transform all the files to one CRS too, which is nice

If you're intending on continuing to use MapInfo, you probably should load them using MapInfo itself, as then it handles the metadata and style transfers too.

Related Question