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.
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.
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.
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.