[Qgis-developer] Not able to save a layer as a tab file

Luiz Motta motta.luiz at gmail.com
Wed Mar 16 08:39:05 EDT 2011


Milena,

I confirm yours comment about write file in format TAB.

I read the source and i believe has a procedure inconsistent in file:
http://trac.osgeo.org/qgis/browser/trunk/qgis/src/core/qgsvectorfilewriter.cpp

I would like that Tim could see the method
QgsVectorFileWriter::driverMetadata(Line 895):

else if ( driverName.startsWith( "MapInfo File" ) )
{
  longName = "Mapinfo File";
  trLongName = QObject::tr( "Mapinfo File" );
  glob = "*.mif *.tab";
  ext = "mif" ;
}

This method set the ext(extension) equal  "mif".

In method QgsVectorFileWriter::QgsVectorFileWriter in line 134:

if ( QgsVectorFileWriter::driverMetadata( driverName, longName,
trLongName, glob, ext ) )
{
  if ( !vectorFileName.endsWith( "." + ext, Qt::CaseInsensitive ) )
  {
    vectorFileName += "." + ext;
  }
}

We can see that  extension is "mif" (always), then, the output format
is the MIF.

You can open the ticket about this.

Regards,
Luiz





I read the

2011/3/16 Milena Nowotarska <do.milenki at gmail.com>:
> Hi,
>
> In QGIS we were able to save a vector layer as MapInfo tab. In r15470 (and
> before) we are able to save as MapInfo mif only.
> If you try to force the file extension by inserting "name.tab" you will get
> "name.tab.mif" in the end anyway.
> Using win7 and osgeo4w.
>
>
> Milena
>
> --
> Milena Nowotarska
> http://wiki.osgeo.org/wiki/Milena_Nowotarska
> http://quantum-gis.pl/     ||     http://grass-gis.pl/
>
>
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/qgis-developer
>
>


More information about the Qgis-developer mailing list