[gdal-dev] Fwd: ogr2ogr crash attempting to drop table in filegdb

Jan Heckman jan.heckman at gmail.com
Fri Feb 5 06:10:06 PST 2021


However, ogrinfo does no better.
It refuses to rename a table (filegdb) and crashes on drop table.
Jan

On Fri, Feb 5, 2021 at 11:43 AM jratike80 <
jukka.rahkonen at maanmittauslaitos.fi> wrote:

> Hi,
>
> SQL in ogr2ogr is only for SELECT. For any other purpose use ogrinfo.
> An example:
>
> ogrinfo -sql "alter table point_p rename column test to foo" point.gpkg
> -dialect sqlite
>
> -Jukka Rahkonen-
>
>
> janhec wrote
> > Dear list,
> >
> > About the filegdb driver
> > Attempting:
> > ogr2ogr -f FILEGDB test.gdb bag2101.gdb -update -sql "drop table
> > standplaats"
> > crashed ogr2ogr (obtained from gisinternals.com,
> > gdal-302-1928-x64-core.msi
> > etc) with a heap corruption. (VS: Unhandled exception at
> > 0x00007FFE1C6EF099
> > (ntdll.dll) in ogr2ogr.exe: 0xC0000374: A heap has been corrupted
> > (parameters: 0x00007FFE1C7587F0).)
> > The table does get dropped.
> >
> > The table was inserted from a shapefile using:
> > ogr2ogr --config shape_encoding "UTF-8" --config FGDB_BULK_LOAD YES
> > -append
> > -f "filegdb" bag2101.gdb sta.shp -nln standplaats -sql "select identifica
> > as identificatie,hfdadresid as hoofdadresid,* from sta", and displays
> > properly in Qgis.
> >
> > So the filegdb driver appears to be properly installed.
> >
> > Also,  I could not get column renaming to work. Using dialects filegdb
> and
> > OGR SQL,
> > ogr2ogr -f FILEGDB test.gdb test.gdb -update -sql "alter table
> vbo_actueel
> > rename column oppervlakt to oppervlakte"  -dialect "FILEGDB"
> > gives ERROR 1: Failed at executing 'alter table vbo_actueel rename column
> > oppervlakt to oppervlakte' (An invalid SQL statement was used.);
> > using -dialect SQLITE, I get
> > ERROR 1: In ExecuteSQL(): sqlite3_prepare_v2(Alter table vbo_actueel
> > rename
> > column oppervlakt to oppervlakte): no such table: vbo_actueel
> > whereas ogrinfo clearly states the table exists.
> >
> > I am trying to clear my arcgis ties preferring Qgis and for reasons of
> > cost, but sometimes I do need to provide data in filegdb format.
> >
> > Thanks in advance for any advice,
> > Jan
> >
> > PS. I do not add the shapefile for reference, since that version of this
> > mail got "rejected by the owner" for being about 1500 bytes in size.
> >
> > _______________________________________________
> > gdal-dev mailing list
>
> > gdal-dev at .osgeo
>
> > https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
>
>
>
>
> --
> Sent from: http://osgeo-org.1560.x6.nabble.com/GDAL-Dev-f3742093.html
> _______________________________________________
> gdal-dev mailing list
> gdal-dev at lists.osgeo.org
> https://lists.osgeo.org/mailman/listinfo/gdal-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20210205/4d5100a1/attachment-0001.html>


More information about the gdal-dev mailing list