I'm trying to convert Mapinfo tab file to ESRI shapefile using ogr2ogr either with sqlite dialect or without.When using sqlite dialect,
ogr2ogr -overwrite -f "ESRI Shapefile" -dialect sqlite -sql "select * from _MigrationIlot where not (geometry is null or IsValid(geometry))" "%Chem%\MigrationIlotErreur.shp" "%Chem%\_MigrationIlot.tab"the resulting shape file (the dbf file to be precise) will have a different structure than the original dat file and i will then be unable to open it in my delphi program (with a TTable component) nor can I open it with my usual database desktop (Borland database desktop).
Whereas without using sqlite dialect,
ogr2ogr -overwrite -f "ESRI Shapefile" "%Chem%\MigrationIlot.shp" "%Chem%\_MigrationIlot.tab"everything is fine (it's not what i want but the dbf file is readable). After some investigation with a Hexadecimal Editor, I noticed that Numeric field type in the dbf file are defined as N 24,15. Using -lco RESIZE=YES doesn't help : still N 24,15.
According to DBF specifications found here : http://www.clicketyclick.dk/databases/xbase/format/data_types.htmlor here : http://linux.techass.com/projects/xdb/xbasedocs/xbase_toc.html, it seems that Numeric fields size in DBF files shouldn't be greater than 18 digits.
As I'm unable to read these dbf files in my program, Is there a way around this ?
Thanks for any help
david
أكثر...
ogr2ogr -overwrite -f "ESRI Shapefile" -dialect sqlite -sql "select * from _MigrationIlot where not (geometry is null or IsValid(geometry))" "%Chem%\MigrationIlotErreur.shp" "%Chem%\_MigrationIlot.tab"the resulting shape file (the dbf file to be precise) will have a different structure than the original dat file and i will then be unable to open it in my delphi program (with a TTable component) nor can I open it with my usual database desktop (Borland database desktop).
Whereas without using sqlite dialect,
ogr2ogr -overwrite -f "ESRI Shapefile" "%Chem%\MigrationIlot.shp" "%Chem%\_MigrationIlot.tab"everything is fine (it's not what i want but the dbf file is readable). After some investigation with a Hexadecimal Editor, I noticed that Numeric field type in the dbf file are defined as N 24,15. Using -lco RESIZE=YES doesn't help : still N 24,15.
According to DBF specifications found here : http://www.clicketyclick.dk/databases/xbase/format/data_types.htmlor here : http://linux.techass.com/projects/xdb/xbasedocs/xbase_toc.html, it seems that Numeric fields size in DBF files shouldn't be greater than 18 digits.
As I'm unable to read these dbf files in my program, Is there a way around this ?
Thanks for any help
david
أكثر...