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

Ethan Alpert ealpert at digitalglobe.com
Thu Feb 1 11:58:35 EST 2007

Perhaps you could use pgsql2shp and then translate the .shp file into


-----Original Message-----
From: gdal-dev-bounces at lists.maptools.org
[mailto:gdal-dev-bounces at lists.maptools.org] On Behalf Of Marc Jacquin
Sent: Thursday, February 01, 2007 9:20 AM
To: 'Gdal'
Subject: [Gdal-dev] Text field size ogr2ogr PostgreSQL to MIF/MID

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
more than let say 50.

It seems that ogr2ogr forces text fields to be 254 wide. But when you
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)

Gdal-dev mailing list
Gdal-dev at lists.maptools.org

More information about the Gdal-dev mailing list