tags:

views:

969

answers:

2

Hello!

I am working on an application (.net 2.0) that uses mif/mid data format to display GIS data. I need to find a way to edit these files with some sort of editor (outside of application). I googled a lot but was unable to find anything suitable (Map Maker worked but did not display labels from mid file). I see following solutions (in order of preference):

  1. Find some editor that will allow to edit mif/mid format correctly. Which one?
  2. Find some editor that will allow to edit some other format and have conversion utilities to convert to this format and back to mif/mid. Which one?
  3. Find some editor that will allow to edit some other format and have conversion utilities to convert once to this format. In this case I'll have to write my own parser. I do not like this idea :).

Free editors are preferred.

Thank you!

UPD 1 I forgot to mention that I need to load Unicode mid files or at least specify the codepage. That's why, for example, OpenJump's plugin does not work (I guess)

UPD 2 This seems to be a real trouble. Most tools either do not do mif at all or do it in read-only mode. Anyone with real experience with MIF read-write?

UPD 3 In this update I'll keep track of all my attempts to solve this issue:

  1. OpenJump - plugin failed to load non-ascii code. Unicode load failed

  2. QGIS - succedeed loading MIF file, but failed to save it - unable to save feature. I'm not sure, but it looks like it does not support write mode for MIF's. I've tried to save selection as shape file. Later I was unable to convert it with OGR layer converter - failed with access violation.

  3. MapInfo Professional 10 failed to load my MIF file with access violation.
  4. GV sig does not support MIF format.
  5. UDIG does not support MIF format.
  6. WinGrass did not start on my PC.

tbc...

+3  A: 

Free conversion tool: OGR (also see Mitab)

Free GIS Editors (that can read MID/MIF): Quantum GIS, OpenJump, others*

Commercial GIS Editors: Lots*. (Note: MID/MIF is a Mapinfo format).

* See GIS software for a good list.

Can provide more detail if this does not point you in the right direction.

luapyad
So mapinfo it finally was. Free one-s did not do :(
Nikolay R
+1  A: 

Quantum GIS, OpenJump, uDig or GRASS should do what you want. However, you should be aware that all these editors will most likely use OGR as the data abstraction library for that file format. Therefore, they have the limitations of that OGR driver.

From the driver documentation:

MapInfo datasets in native (TAB) format and in interchange (MIF/MID) format are supported for reading and writing. Update of existing files is not currently supported.

That is probably what you are running into. Try QGIS again and be mindful of this.

rburhum
Do you mean that I can open existing file do some modifications and save it with another name? It does not differ a lot from editing existing file. At least from end user perspective. However - how can I write to MIF file with QGIS? I've found only one way - remove edit mode from current layer and it looks like it fails to update existing object.
Nikolay R
If you are running into a bug with one of your GIS editors (QGIS or whatever) an easy way to bypass this is to:Download the ogr2ogr utility athttp://trac.osgeo.org/gdal/wiki/DownloadingGdalBinariesthen run ogr2ogr --formatsto make sure you have the "MapInfo File" format installed.Convert it to Shapefileogr2ogr -f "ESRI Shapefile" test2 test2.tab test2Edit it in your favorite editor (QGIS works fine with shapefiles).Convert it back to mapinfoogr2ogr -f "MapInfo File" test3 test2.shp test2
rburhum
Hmm. I'm interested - why mif1->shp->mif2 makes mif1!=mif2? I thought it should be fully reversable. Still testing your solution.
Nikolay R
Attempting to convert another file lead to Error 6: Error during reading record. Is there a way to make it a bit more verbose?
Nikolay R
rburhum
No. I mean files differ. Geometry is same but it's scary a bit :). Anyway I gave up free soft - too hard to get it working. Thanks for your help anyway!
Nikolay R
Differences might be due to different formatting of the data, and not actually significant. If you want to see whether the file differences are significant have a look in a file comparison tool. MIF and MID are text files.
MarkJ