Sign up ×
Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

I have many folders, each with a collection of MapInfo tab files (each folder has the same table names). For each folder I want to merge the tab files into one spatialite DB.

My current method is to use ogr2ogr to convert the tab files into shapefiles, and then use .loadshp to load each one into the DB. This truncates my column names, which is irritating.

Is there a way to avoid the shapefile part of this process? ogr2ogr can convert to spatialite, but I do not know how to go about merging multiple spatialite files.

share|improve this question

1 Answer 1

up vote 2 down vote accepted

You should be able to go directly from .tab to spatialite using OGR. See the spatialite format page for more details. You also don't have to create multiple dbs and merge them, just 'append' them all together from the start.

share|improve this answer
could you give an example of the command? – Matthew Finlay Aug 18 '11 at 6:47
Hi Matthew. Using the -append flag in ogr2ogr (see, it would look something like: mkdir merged for %f in (*.tab) do ( if not exist merged\merged.sqlite ( ogr2ogr -f "SQLite" merged\merged.sqlite %f) else ( ogr2ogr -f "SQLite" -update -append merged\merged.sqlite %f -nln Merged ) ) - note that I haven't tried this, but it should be pretty close.. – Darren Cope Aug 18 '11 at 19:21

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.