[gdal-dev] Executing a query getting null layer

Ahmed Tolba Ahmed.Tolba at schiebel.net
Wed Mar 22 07:39:02 PDT 2017


Is There a solution, I'm stopped :( ?
Is there any equivalent way to do what the SQL Query does, but that works with SQLite ?

Sincerely,
Ahmed

From: Ahmed Tolba
Sent: Wednesday, March 22, 2017 3:08 PM
To: 'Even Rouault'
Cc: gdal-dev at lists.osgeo.org
Subject: RE: [gdal-dev] Executing a query getting null layer

Now I get undefined function st_linefrommultipoint

Here is my query again

string query = "SELECT * FROM areas WHERE st_contains(st_polygon(st_addpoint(st_linefrommultipoint(areas.geom),st_startpoint(st_linefrommultipoint(areas.geom)),-1),st_srid(areas.geom)),st_mpointfromtext('MULTIPOINT(16.17951 47.85549, 16.17951 47.85549, 16.17951 47.85549, 16.17951 47.85549)',4326));";

I have put NULL for the dialect as suggested.

Many Thanks,
Ahmed


From: Even Rouault [mailto:even.rouault at spatialys.com]
Sent: Wednesday, March 22, 2017 3:05 PM
To: gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>
Cc: Ahmed Tolba; jratike80
Subject: Re: [gdal-dev] Executing a query getting null layer


On mercredi 22 mars 2017 13:58:52 CET Ahmed Tolba wrote:

> My data is in mapserver database which is PostGres PostGIS. What's the

> equivalent function for st_linefrommultipoint ?



Ah ok just put NULL for the dialect argument in that case. This will evaluate the query on Postgres side.



> -----Original Message-----

> From: gdal-dev [mailto:gdal-dev-bounces at lists.osgeo.org] On Behalf Of

> jratike80

Sent: Wednesday, March 22, 2017 2:40 PM

> To: gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>

> Subject: Re: [gdal-dev] Executing a query getting null layer

>

> andreahmed wrote

>

> > I replaced OGRSQL with SQLite, It says now

> >

> > No such function: st_linefrommultipoint

>

>

> That's no wonder because SpatiaLite does not have such function

> https://www.gaia-gis.it/gaia-sins/spatialite-sql-latest.html.

> Where do you have your data? Are they in PostGIS which has a native support

> for http://postgis.net/docs/ST_LineFromMultiPoint.html?

> -Jukka Rahkonen.-

>

>

>

> --

> View this message in context:

> http://osgeo-org.1560.x6.nabble.com/gdal-dev-Executing-a-query-getting-null

> -layer-tp5313639p5313646.html

Sent from the GDAL - Dev mailing list archive

> at Nabble.com.

> _______________________________________________

> gdal-dev mailing list

> gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>

> https://lists.osgeo.org/mailman/listinfo/gdal-dev

> _______________________________________________

> gdal-dev mailing list

> gdal-dev at lists.osgeo.org<mailto:gdal-dev at lists.osgeo.org>

> https://lists.osgeo.org/mailman/listinfo/gdal-dev





--

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/92bffd03/attachment.html>


More information about the gdal-dev mailing list