[Gdal-dev] Text field size ogr2ogr PostgreSQL to MIF/MID

Marc Jacquin marc.jacquin at magellium.fr
Thu Feb 1 11:20:06 EST 2007

Hi all,

I am using ogr2ogr to convert a PG table into MIF/MID. 

The table fields are varchar(x) or char(x) type and the field width is never
more than let say 50.

It seems that ogr2ogr forces text fields to be 254 wide. But when you get
more than 20 fields the record size exceeds the 4 K limit of MapInfo 6.

Is there a PG usable type so that ogr2ogr would keep the width for

Thanks for helping.


Here is the mif header :
Version 300
Charset "Neutral"
Delimiter ","
Columns 20
  produit Char(254)
  satellite Char(254)
  kj Char(254)
  dateacq Char(254)
  heureacq Char(254)
  gains Char(254)
  notenuag Char(254)
  noteneig Char(254)
  decalage Char(254)
  centre Char(254)
  coinnw Char(254)
  coinne Char(254)
  coinsw Char(254)
  coinse Char(254)
  angleinc Char(254)
  bandspec Char(254)
  pixelsat Char(254)
  sceneid Char(254)
  dynamin Char(254)
  dynamax Char(254)

More information about the Gdal-dev mailing list