Hot answers tagged

3

You can use ogr2ogr from GDAL Utilities to batch convert several shape files to mid/mif. If you use OSGeo4W installer you can easy install GDAL Utilities. A simple script for you to convert all shape to mif/mid in the current directory: @echo off for %%f in (*.shp) do ( set name=%%~nf ogr2ogr -f "MapInfo File" %name% -dsco FORMAT=MIF %%f )


3

You can split the file into the different types using OGR2OGR: ogr2ogr -f "MapInfo File" -where "OGR_GEOMETRY = 'Point'" yourfile_Point.Tab yourmultigeomfile.TAB ogr2ogr -f "MapInfo File" -where "OGR_GEOMETRY = 'LineString'" yourfile_lines.Tab yourmultigeomfile.TAB


2

From the MapInfo site: MIF/MID format is comprised of two files, one with an extension of MIF, the other with the same name, but the extension MID. The MIF file contains the actual points that represent the objects, while the MID file contains the text information about the objects. The MapInfo MIF format specification notes that the .mid is ...


2

You can add two new columns to your table using Table > Maintenance > Table Structure: TEXT Char(100) and ANGLE Float Then use Table > Update Column to read certain values from the spatial object into these columns. Angle: Use this expression: ObjectGeography(OBJ, 7) Text: Use this expression: ObjectInfo(OBJ, 3) To change your text object into an MBR you ...


2

If the data should cover whole of Spain, I see no problem with the negative coordinate. You will get more distorsions at the edges, but the map should work, until you don't have points on the backside of the globe. This should be the map extent, together with the UTM zones: The extent covers UTM zones 29 to 31, so UTM zone 30 is a good choice for a ...


1

For a single layer, the recipe to export with Python to MIF/MID is the following (deduced from "Dataset Creation Options" of GDAL MapInfo documentation) : vLayer = iface.activeLayer() QgsVectorFileWriter.writeAsVectorFormat(vLayer, '/tmp/' + vLayer.name() + ".mif", "utf-8", vLayer.crs(), 'Mapinfo File', datasourceOptions='FORMAT=MIF') ...


1

MapInfo MID and MIF belong together and GDAL does use them both when it does the conversion. I suppose that you think that MIF is not used because you do not see all the attributes in the resulting KML. That is probably due to differences in the formats and limitations in the GDAL KML driver http://www.gdal.org/drv_kml.html. If you can share a sample of your ...


1

You have your input and output datasets in the wrong order. The (rather unintuitive) ogr2ogr syntax is: ogr2ogr [options] dst_datasource_name src_datasource_name [layers] Use the following instead: ogr2ogr -f "KML" geo-kml geo-mif


1

Try to import the MIF/MID into MapInfo and if that goes OK, then it is your other piece of software which has an issue.



Only top voted, non community-wiki answers of a minimum length are eligible