0

Using the latest geotools version 19.1, I did not find any class which can read MID/MIF files. there was a MIFFile class in geotools version 2.2 which is removed now. Does anybody know how to read the the MID/MIF file format using geotools api in java ?

Deepak Pandey
  • 618
  • 7
  • 19
  • 1
    Check out http://docs.geotools.org/latest/javadocs/ there is support for TAB files. you might need to convert MID/MIF files to TAB format using GDAL. SImilar issue : https://stackoverflow.com/questions/49412305/java-api-for-parsing-mapinfo-tab-format – Anoop J Jun 06 '18 at 07:31

1 Answers1

1

Either convert your file to a supported format using ogr2ogr or try the experimental OGR plugin.

If neither of those work for you, you can add or sponsor the addition of a dedicated Mid/Mif datastore.

Ian Turton
  • 10,018
  • 1
  • 28
  • 47
  • were you able to succesfully run through the steps mentioned here [Build Instructions for GDAL/OGR In Java (Windows)](https://trac.osgeo.org/gdal/wiki/GdalOgrInJavaBuildInstructions) ? I tried following the instruction but I am not able to proceed beyond `nmake -f makefile.vc` step – Deepak Pandey Jun 07 '18 at 09:52
  • use osgeo4w to download a compiled version – Ian Turton Jun 07 '18 at 09:54
  • I did download the osgeo4w. but, on the page [Build Instructions for GDAL/OGR In Java (Windows)](https://trac.osgeo.org/gdal/wiki/GdalOgrInJavaBuildInstructions) it is written _Note that ​OSGeo4W includes a ​gdal-java package and a Java runtime making it fairly easily to build local Java applications using GDAL._ but I did not find any gdal-java package or any jni library. – Deepak Pandey Jun 07 '18 at 10:02
  • I'm not a windows user so I can't really help more – Ian Turton Jun 07 '18 at 10:05
  • I was able to make it work. here is my answer [run gdal java on windows](https://stackoverflow.com/a/50880821/1776145) – Deepak Pandey Jun 15 '18 at 18:20