Zoltan Szecsei wrote:
Hi, Here's a strange one that hopefully can be overcome quickly.I'd be grateful for any assistance with this problem. Kind regards, Zoltan I have a MID/MIF file combination with: COLUMNS 5 FEAT_TYPE_ integer (5) GID integer (10) ENTITY_NAM char (50) GEOMETRY_T char (5) AUD_MOD char (5) DATA yet as a SHP file, the two Integer fields become Real 11.0 - yes, both 11.0I have used both QGis 1.5.0 and an old MapInfo Imutgui.exe to do this conversion, and I get the same results.
Zoltan, I can confirm that OGR is ignoring the precision of integer fields when translating and thus "integer 5" is just treated as "integer". This in turn get translated to an 11 character wide field in the dbf file to hold the largest 32bit integer. But when reading back such a wide field the shapefile driver treats it as "real" since the largest 11 character wide integer is larger than 32 bits. In GDAL/OGR trunk I've changed the shapefile driver a few weeks ago so that unknown width fields are treated as 10 wide integer fields which are still treated as integer when read back in an effort to partly avoid this sort of problem. I'm not sure if that change was backported. But I think there is also an issue with the mapinfo driver which seems to be ignoring the precision of integer fields. I found it also ignores the precision of Decimal fields which are treated as real even if there are no decimal points. Could you file a ticket in the GDAL/OGR Trac on this? I'll try to get it fixed up for GDAL/OGR 1.8. Best regards, -- ---------------------------------------+-------------------------------------- I set the clouds in motion - turn up | Frank Warmerdam, [email protected] light and sound - activate the windows | http://pobox.com/~warmerdam and watch the world go round - Rush | Geospatial Programmer for Rent _______________________________________________ gdal-dev mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/gdal-dev
