Hi, The GDAL version is not what is essential but the version of the dependent Spatialite library. GDAL must be compiled with such Spatialite version that has support for ST_Length. The error means either that Spatialite is missing totally or that it is of too old version and in this case it is obvioustly the latter. However, there may be a simple solution. ST-functions are new synonyms but your older Spatialite version may support the native name that Spatialite has used for the function https://www.gaia-gis.it/gaia-sins/xmlBlob/spatialite-sql-latest.html.
Try if SELECT glength(geometry) happens to work. Otherwise you must try to find a GDAL version that is compiled with more fresh Spatialite. -Jukka Rahkonen- Schylberg Lars wrote: I guess this must be a version problem. That same command runs fine on my osgeolive8 machine. ogrinfo --version GDAL 1.10.1, released 2013/08/26 /Lars From: mapserver-users-boun...@lists.osgeo.org<mailto:mapserver-users-boun...@lists.osgeo.org> [mailto:mapserver-users-boun...@lists.osgeo.org] On Behalf Of alok mathur Sent: den 16 mars 2015 09:54 To: Rahkonen Jukka (MML); mapserver-users@lists.osgeo.org<mailto:mapserver-users@lists.osgeo.org> Subject: Re: [mapserver-users] Calculate length! Hi Jukka, When i am trying to run the above ogr command as mentioned by you I am getting an error ogrinfo -dialect sqlite -sql "select st_length(geometry) from 'Fibertech solution'" doc_test.kml INFO: Open of `doc_test.kml' using driver `LIBKML' successful. ERROR 1: In ExecuteSQL(): sqlite3_prepare(select st_length(geometry) from 'Fibertech solution'): no such function: st_length Please let me know what the issue is. I have installed both libsqlite3 and libspatialite. Thanks! Alok
_______________________________________________ mapserver-users mailing list mapserver-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapserver-users