[gdal-dev] Data types change converting from MID/MIF to SHP

pcreso at pcreso.com pcreso at pcreso.com
Wed Nov 24 21:29:14 EST 2010


Hi,

I'm guessing this is because the DBF format ESRI decided on for aspatial attribute data in shapefiles does not have an integer datatype 

(sse: http://www.dbase.com/knowledgebase/int/db7_file_fmt.htm)

So an int field gets read into a generic numeric field in the DBF file, rather than an int.


Brent Wood


--- On Thu, 11/25/10, Zoltan Szecsei <zoltans at geograph.co.za> wrote:

From: Zoltan Szecsei <zoltans at geograph.co.za>
Subject: [gdal-dev] Data types change converting from MID/MIF to SHP
To: "gdal-dev" <gdal-dev at lists.osgeo.org>
Date: Thursday, November 25, 2010, 1:04 AM

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.0

I have used both QGis 1.5.0 and an old MapInfo Imutgui.exe to do this conversion, and I get the same results.


Typical MID file entries are:

391,,,LINE,A
391,7553476,32986740,LINE,E
391,,,LINE,A
391,,,LINE,A
402,,,LINE,A
391,,,LINE,A
391,7552723,33180873,LINE,E
391,7553846,33193702,LINE,E
398,,,LINE,A
402,,,LINE,A
402,,,LINE,A
391,,,LINE,A
402,,,LINE,A
402,,,LINE,A
391,,,LINE,A
391,,,LINE,A
391,,,LINE,A
398,8181664,#017:1968,LINE,E
391,7586152,40306383,LINE,E
391,7645575,33201757,LINE,E
391,7586151,40306441,LINE,E
391,7586003,40307075,LINE,E
399,8396096,#017:1784,LINE,E






-- 
===========================================
Zoltan Szecsei PrGISc [PGP0031]
Geograph (Pty) Ltd.
P.O. Box 7, Muizenberg 7950, South Africa.

65 Main Road, Muizenberg 7945
Western Cape, South Africa.

34° 6'16.35"S 18°28'5.62"E

Tel: +27-21-7884897  Mobile: +27-83-6004028
Fax: +27-86-6115323     www.geograph.co.za
===========================================



-----
No virus found in this message.
Checked by AVG - www.avg.com
Version: 10.0.1170 / Virus Database: 426/3275 - Release Date: 11/23/10

_______________________________________________
gdal-dev mailing list
gdal-dev at lists.osgeo.org
http://lists.osgeo.org/mailman/listinfo/gdal-dev
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/gdal-dev/attachments/20101124/1a1dd787/attachment.html


More information about the gdal-dev mailing list