[gdal-dev] Executing a query getting null layer
Ahmed Tolba
Ahmed.Tolba at schiebel.net
Wed Mar 22 06:31:49 PDT 2017
I replaced OGRSQL with SQLite, It says now
No such function: st_linefrommultipoint
From: Even Rouault [mailto:even.rouault at spatialys.com]
Sent: Wednesday, March 22, 2017 2:30 PM
To: gdal-dev at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/gdal-dev/attachments/20170322/eb1f9396/attachment-0001.html>
More information about the gdal-dev
mailing list