Take the 2-minute tour ×
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'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
add comment

4 Answers 4

up vote 4 down vote accepted
+50

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
add comment

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
1  
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
1  
Thanks. After more reading, I found this question which might be of help to others who haven't heard of this: gis.stackexchange.com/questions/3529 –  Devdatta Tengshe Apr 23 '13 at 9:00
add comment

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
add comment

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
add comment

Your Answer

 
discard

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.