Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm relatively new to OGR and GIS in general. Most of the sources I look at give a choice of ESRI shapefile and MapInfo formats. I'm using ogr2ogr to convert these to GeoJSON for import into JSON-based databases. Can any experienced OGR users tell me if there is any advantage in the choice of a source format here? I'm more interested in preserving the integrity of the data than speed, etc.

share|improve this question
As an FYI, I'm not sure if you've read GDAL's docs on OGR – dassouki Apr 18 '13 at 12:12
up vote 5 down vote accepted

ESRI Shapefiles are more widely used, but have some limitations, including that the attribute names are limited in length. Shapefiles can be edited by the wonderful QGIS.

MapInfo files are less widely used, and have a limitation with respect to something called bounds, where the X, Y coordinates are stored as an integer between two doubles. This limits the precision of MapInfo tables to 1 mm, which may not be an issue, but it does ruin topology sometimes. MapInfo TAB files can't be edited in the wonderful QGIS.

I haven't noticed the 'codepage-awareness' that Uffe mentions. I'd go for Shapefile, but practically it will make very little difference for most uses.

share|improve this answer
Note that QGIS can now edit MapInfo TAB files. So long as you manage bounds, i.e., precision, TAB files do have some advantages. – Alex Leith Mar 16 at 23:47

TAB files are almost always more compact than SHP, have better "codepage-awareness" and the DAT part allows more specialized field types, that maps better to the database, where the data is coming from (assuming it isn't TAB or SHP).

But SHP files are more "standard" and open, so if you run into issues, it may be easier to deal with them, if you have SHP.

share|improve this answer
Could you please expand on "codepage-awareness" of TAB files? This is the first time I have heard of this phrase, and which to know more. – Devdatta Tengshe Apr 23 '13 at 4:43
TAB were born with codepage being part of the file specification. SHP files uses DBF, which didn't have it originally and ESRI made up their own system with the CPG file, but you can't be sure that all software detects the CPG file. Others may read the byte in the DBF header specifying the codepage, which is actually in another system with numbers from 1 to 255. Then some put UTF-8 in the DBF which is technically possible, but also highly non-standard. – Uffe Kousgaard Apr 23 '13 at 8:33
Thanks. After more reading, I found this question which might be of help to others who haven't heard of this: – Devdatta Tengshe Apr 23 '13 at 9:00

GML formats are good enough to be converted to GeoJSON. GML is another form of xml which is a document interchange format and Javscript Object Notion(JSON) is a data interchange format. The good thing is both can be opened in a text editor and can be saved in databases. ShapeFiles have some limitation for the length of fields and attribute values. But remember OGR provides an abstraction on the different kinds of data formats. The data loss sometimes happens with attributes only(eg: shapefiles). It also depends on the software you use to import the data.

share|improve this answer

AFAIK GeoJSON will give you very easy and pretty fast import/export ways of dealing with your data sets. I use it all the time with postgis and web mapping. Especially for web mapping, this format is easy to work with.

share|improve this answer

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.