[gdal-dev] ogr2ogr midmif to tab format conversion

Zoltan Szecsei zoltans at geograph.co.za
Fri Apr 29 09:25:41 EDT 2011


On 2011-04-29 14:58, Luca Sigfrido Percich wrote:
> Hi Zoltan,
>
> I have MapInfo installed, if you post a mif/mid file I can test it
>    
I will send you one off-list.
Thanks & regards,
Zoltan
> before/after conversion with ogr2ogr, imut (which is based on FME) and
> MapInfo Import command.
>
> Have you tried to open in geomedia the Shape generated by ogr2og2, at
> least to see if its geom is ok?
>    
Yes, it works fine - barring the truncation plus the odd geometry problems:
******************** Starting CULT_PUBLIC.mif
Warning 6: Normalized/laundered field name: 'FEAT_TYPE_ID' to 'FEAT_TYPE_'
Warning 6: Normalized/laundered field name: 'SUB_TYPE_ID' to 'SUB_TYPE_I'
Warning 6: Normalized/laundered field name: 'SYMBOL_ORIENTATION' to 
'SYMBOL_ORI'
Warning 6: Normalized/laundered field name: 'EST_REVISION_DATE' to 
'EST_REVISI'
Warning 6: Normalized/laundered field name: 'FEATURE_RELIABILITY_DATE' 
to 'FEATURE_RE'
Warning 6: Normalized/laundered field name: 'ATTR_RELIABILITY_DATE' to 
'ATTR_RELIA'
Warning 6: Normalized/laundered field name: 'CAPTURE_SOURCE_TYPE_ID' to 
'CAPTURE_SO'
Warning 6: Normalized/laundered field name: 'CAPTURE_METHOD_ID' to 
'CAPTURE_ME'
Warning 6: Normalized/laundered field name: 'SOURCE_DESCRIPTION' to 
'SOURCE_DES'
Warning 6: Normalized/laundered field name: 'SOURCE_CURRENCY' to 
'SOURCE_CUR'
Warning 6: Normalized/laundered field name: 'SOURCE_ACCURACY' to 
'SOURCE_ACC'
Warning 6: Normalized/laundered field name: 'ENTITY_NAME' to 'ENTITY_NAM'
Warning 6: Normalized/laundered field name: 'GEOMETRY_TYPE' to 'GEOMETRY_T'
Warning 6: Normalized/laundered field name: 'OLD_GDO_GID' to 'OLD_GDO_GI'
Warning 6: Normalized/laundered field name: 'WHEN_UPDATED' to 'WHEN_UPDAT'
Warning 6: Normalized/laundered field name: 'LOCKED_FLAG' to 'LOCKED_FLA'
Warning 6: Normalized/laundered field name: 'AUD_LAST_USER' to 'AUD_LAST_U'
Warning 6: Normalized/laundered field name: 'AUD_LAST_DATE' to 'AUD_LAST_D'
Warning 6: Normalized/laundered field name: 'REFERENCE_50' to 'REFERENCE_'
Warning 6: Normalized/laundered field name: 'REFERENCE_10' to 'REFERENC_1'
Warning 6: Normalized/laundered field name: 'LTT_FEATURE_ID' to 'LTT_FEATUR'
Warning 6: Normalized/laundered field name: 'LTT_CURRENT_REVSET_ID' to 
'LTT_CURREN'
ERROR 1: Attempt to write non-point (POLYGON) geometry to point shapefile.
ERROR 1: Terminating translation prematurely after failed
translation of layer CULT_PUBLIC (use -skipfailures to skip errors)

> All the best
>
> Sig
>
>
> Il giorno ven, 29/04/2011 alle 14.25 +0200, Zoltan Szecsei ha scritto:
>    
>> Hi All,
>> I am trying to convert a bunch of MapInfo MID-MIF files to MapInfo TAB
>> files, because GeoMedia 6.1 will not "connect" to MIDMIF files.
>> Using this script on Ubuntu 10.04, ogr2ogr from GDAL 1.8.0, released
>> 2011/01/12
>>
>>
>>
>> for m in `ls *.mif` ; do n=`echo $m | awk -F . ' { print $1".tab" } ' `
>> ; echo "******************** Starting $m" ; ogr2ogr -F "MapInfo File" $n
>> $m ; done
>>
>> (Basically: ogr2ogr -F "MapInfo File" boundaries.tab boundaries.mif )
>>
>>
>>
>>
>> When I load the resulting .TAB, .ID, .MAP and .DAT files into GeoMedia,
>> I get coarse boxes and diagonal lines, albeit in the correct LatLong region.
>>
>> When I use a very old "imutgui" from an old MapInfo to convert the same
>> MID MIFs to SHAPE, I can (correctly) load the SHAPEs into GeoMedia.
>>
>> I cannot use the SHAPEfile route as the field names are truncated when
>> converting from MIDMIF to SHAPE.
>>
>>
>> Any idea why the TAB route messes up the geometries?
>>
>> TIA,
>> Zoltan
>>
>>      
>    


-- 

===========================================
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.1209 / Virus Database: 1500/3603 - Release Date: 04/28/11



More information about the gdal-dev mailing list