I replaced OGRSQL with SQLite, It says now

No such function: st_linefrommultipoint


From: Even Rouault [mailto:even.roua...@spatialys.com]
Sent: Wednesday, March 22, 2017 2:30 PM
To: gdal-dev@lists.osgeo.org
Cc: Ahmed Tolba
Subject: Re: [gdal-dev] Executing a query getting null layer


On mercredi 22 mars 2017 13:12:14 CET Ahmed Tolba wrote:

> Hi All,

> I'm trying to execute that query

> string query = "SELECT *FROM areas WHERE

> st_contains(st_polygon(st_addpoint(st_linefrommultipoint(areas.geom),st_sta

> rtpoint(st_linefrommultipoint(areas.geom)),-1),st_srid(areas.geom)),st_mpoin

> tfromtext('MULTIPOINT(16.17951 47.85549, 16.17951 47.85549, 16.17951

> 47.85549, 16.17951 47.85549)',4326));";

>

> but I get a null layer,

>

> here is how I'm executing the query:

> OGRLayer * layer = m_wfs_t->ExecuteSQL(query.c_str(), NULL, "OGRSQL");



You are using ST_ functions, which are only provided through Spatialite. So 
replace "OGRSQL" with "SQLite".





--

Spatialys - Geospatial professional services

http://www.spatialys.com
_______________________________________________
gdal-dev mailing list
gdal-dev@lists.osgeo.org
https://lists.osgeo.org/mailman/listinfo/gdal-dev

Reply via email to