[gdal-dev] ogr2ogr segfault

Ari Jolma ari.jolma at gmail.com
Tue May 19 03:21:15 PDT 2015


>>>> Hi all.
>>>> I'm consistently getting a segfault from:
>>>>
>>>> ogr2ogr OUTPUTLAYER.shp strade.shp strade -dialect sqlite -sql "SELECT
>>>> ST_Line_Interpolate_Point( geometry , 0.5 ),* FROM 'strade' "
>>>>
>>>> Anything I can do for debugging?
>>> Running under gdb and displaying the stack trace.
>> ogr2ogr OUTPUTLAYER.shp strade.shp -dialect sqlite -sql "SELECT
>> ST_Line_Interpolate_Point( geometry , 0.5 ),* FROM 'strade'"
>> ERROR 1: In ExecuteSQL(): sqlite3_prepare(SELECT
>> ST_Line_Interpolate_Point( geometry , 0.5 ),* FROM 'strade'):
>>     no such function: ST_Line_Interpolate_Point
>>
>> I have both SQLite and SpatiaLite support on. What's going on?
> Not using a recent enough SpatiaLite I guess

I've now got the latest SpatiaLite version but ogr2ogr is still complaining.

However, I got also the SpatiaLite CLI and it has no problems:

spatialite> .loadshp strade strade utf8
========
Loading shapefile at 'strade' into SQLite table 'strade'

BEGIN;
CREATE TABLE "strade" (
"PK_UID" INTEGER PRIMARY KEY AUTOINCREMENT,
"id" INTEGER);
SELECT AddGeometryColumn('strade', 'Geometry', -1, 'LINESTRING', 'XY');
COMMIT;

Inserted 1 rows into 'strade' from SHAPEFILE
========
spatialite> SELECT astext(ST_Line_Interpolate_Point( geometry , 0.5 )),* 
FROM 'strade';
POINT(-0.352046 0.4463)|1|0|

Hm.

Ari



More information about the gdal-dev mailing list