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.

Is there an easy way to convert MapInfo TAB files into GeoJSON?

I am working on a web-based mapping system which will use GeoJSON to transfer data. I also use MapInfo and would like to be able to convert files from MapInfo into GeoJSON.

I have tried the Universal Translator that comes with MapInfo but it doesn't support GeoJSON.

If there isn't a way to do it I will make a MapInfo plug-in myself (and probably post it online). I just don't want to waste my time making this if there is already one out there.

Update 2012-03-19: You can now export to GeoJSON through Quantum GIS.

share|improve this question

2 Answers 2

up vote 4 down vote accepted

What about just using the command line ogr2ogr, or installing FWTools to access it's pre-configured ogr2ogr command line? The core ogr2ogr appears to support bi-directional conversion from MapInfo to GeoJSON.

Here are a couple of cheat sheets that might help:

ogr_cheatsheet; data loading

share|improve this answer
    
Unless I'm missing a trick, you can't export to GeoJSON from FWTools. ogr2ogr works perfectly. Ideally I would be able to export directly from MapInfo. I might make a MapInfo programme that calls ogr2ogr but until then the command line will do. Thanks! –  Mr_Chimp Jan 21 '11 at 10:39
    
Correction: Using ogr2ogr via the FWTools command line works perfectly. What doesn't work is doing it via OpenEV_FW (the FWTools GUI). –  Mr_Chimp Jan 21 '11 at 15:36

The OGR layer converter plugin in QGIS does this. But if you don't want to install QGIS, you could try ogr2gui.

http://www.ogr2gui.ca/en/index.php

It converts MapInfo files to GeoJSON (as well as lots of other formats).

Edit 20/01/2011: Apparently ogr2gui will not convert from MapInfo to GeoJSON. It will convert the other way round though.

share|improve this answer
    
As far as I can see it converts GeoJSON to TAB but not the other way around. –  Mr_Chimp Jan 20 '11 at 16:35
    
Sorry about that, I thought it would seeing as OGR can. The OGR layer converter does work within QGIS though. I just tried it. –  James S Jan 20 '11 at 16:47
    
It's strange. OGR supports it but none of the OGR GUIs (FWTools, ) do. I think it might be because GeoJSON is a relatively new format - OGR has implemented it but the GUIs have yet to catch up. You're right that QGIS exports GeoJSON, but loading up a whole other GIS programme is a bit...excessive for my needs. Thanks anyway! –  Mr_Chimp Jan 21 '11 at 10:43

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.