[Gdal-dev] file size balloons when converting gml to tab, shp with ogr2ogr

Frank Warmerdam warmerdam at pobox.com
Thu May 18 10:30:16 EDT 2006


Peter.Rushforth at statcan.ca wrote:
> Hi,
> 
> I've been experimenting with converting GML documents to mapinfo tab and 
> esri shp
> formats.  I have the same files previously created with commercial 
> software with
> exactly the same record layouts.  The files I've created with ogr2ogr 
> seem to be up
> to 5 to 10 times larger than the same file (and format) created with the 
> commercial software.
> 
> When you view the files, they appear identical, line for line, attribute 
> for attribute.
> 
> Is there somebody who could point me in the right direction to determine 
> why?

Peter,

Generally speaking string fields without a defined size will end up being
very wide when translated to shapefiles since it is necessary for me to
pick a string width when creating the shapefile, but without prescanning all
the actual values that will be written.  This may also be an issue with tab
format, I'm not sure.  I don't *think* it is an issue with .mid/.mif.

So, is it primarily the .dbf file that is big for shapefiles?  The .shp
should generally be slightly more compact than the corresponding GML
geometry format.

Best regards,

-- 
---------------------------------------+--------------------------------------
I set the clouds in motion - turn up   | Frank Warmerdam, warmerdam at pobox.com
light and sound - activate the windows | http://pobox.com/~warmerdam
and watch the world go round - Rush    | President OSGF, http://osgeo.org




More information about the Gdal-dev mailing list