Bug report #8687
shape layers saved as .tab don't work in Mapinfo when there are decimals fields
Status: | Closed | ||
---|---|---|---|
Priority: | Normal | ||
Assignee: | - | ||
Category: | Vectors | ||
Affected QGIS version: | 2.0.1 | Regression?: | No |
Operating System: | Easy fix?: | No | |
Pull Request or Patch supplied: | No | Resolution: | up/downstream |
Crashes QGIS or corrupts data: | No | Copied to github as #: | 17409 |
Description
Hi,
Sometimes, shape layers saved as .tab in Qgis don't work with MapInfo and make it closing immediately.
I tested it on windows 7 with Qgis 1.8, 1.9dev, 2.0, 2.1dev and with Mapinfo 7.8 et MapInfo 11.
These .tab layers are made from Qgis with right click on layer/save as/mapinfo.tab.
MapInfo isn't able to read these .tab layers but Qgis can read them without any problem.
It seems that problem comes from decimal field.
Indeed, layers wich don't work always as decimal field.
After Qgis conversion, the .tab file read in notepad is like that :
!table
!version 300
!charset Neutral
Type NATIVE Charset "Neutral"Definition Table
Fields 1
_DXFElevat Decimal (24,15) ;
And if I change "Decimal(24,15)" to "Float", Mapinfo will be able to read it.
Futhermore, when I use MapInfo Universal Translator to convert shape layer to tab layer, the .tab file generated is like that :
!table
!version 300
!charset WindowsLatin1
Type NATIVE Charset "WindowsLatin1"Definition Table
Fields 1
_DXFELEVAT Float ;
MapInfo UT has converted Decimal (24, 15) to float.
What do you think about it ? Is this report true ?
History
#1 Updated by Giovanni Manghi about 11 years ago
- Status changed from Open to Feedback
- Category set to Vectors
Please try do the conversion from the command line with ogr2ogr and see of the result is ok
ogr2ogr -f "MapInfo File" output input.shp
#2 Updated by Benoît Couillet about 11 years ago
- File ogr2ogr_Mapinfo.jpg added
I tried and it didn't work.
I had never used ogr2ogr before so I'm not sure I did it well (you can check on jointed picture).
I converted shape layer in tab layer but the problem remains. Decimal field is still there in .tab file and MapInfo can't read it and closes.
Definition Table
Type NATIVE Charset "Neutral"
Fields 1
_DXFElevat Decimal (24,15) ;
#3 Updated by Giovanni Manghi about 11 years ago
- Resolution set to up/downstream
- Status changed from Feedback to Closed
Benoît Couillet wrote:
I tried and it didn't work.
I had never used ogr2ogr before so I'm not sure I did it well (you can check on jointed picture).
I converted shape layer in tab layer but the problem remains. Decimal field is still there in .tab file and MapInfo can't read it and closes.Definition Table
Type NATIVE Charset "Neutral"
Fields 1
_DXFElevat Decimal (24,15) ;
it seems then it's not a QGIS issue, but a ogr one. You must file a ticket in the gdal/ogr bug tracker.
If the qgis release you installed uses gdal 1.9.x then you may want also to give a try with gdal/ogr 1.10 and see if the issue as fixed there.