[Qgis-developer] Improve server-side compiled expressions for PostGreSQL

kimaidou kimaidou at gmail.com
Tue Nov 15 04:43:13 PST 2016


Thanks Matthias.
I will try to give it a go in my spare time ( no fund either)

Cheers

2016-11-15 12:12 GMT+01:00 Matthias Kuhn <matthias at opengis.ch>:

> Hi Michaël,
>
> No functions are compiled so far (afaik).
>
> One will need to implement this in qgssqlexpressioncompiler or
> qgspostgresexpressioncompiler for all the functions involved (I'm not
> sure if / to what degree these functions are compatible between
> different sql dialects).
>
> Also make sure that any new function which is compiled is unit tested
> (providertestbase.py) to make sure it behaves exactly the same when
> executed locally and server side - across all providers.
>
> It's a long-standing plan of mine but I haven't found the time (or
> contract) for this yet...
>
> Matthias
>
> On 11/15/2016 11:01 AM, kimaidou wrote:
> > Hi all,
> >
> > I usually work with PostgreSQL data in QGIS.
> > I would like to have a guidance on how to improve the set of compiled
> > expressions for PostgreSQL. My goal is to propose a PR for some spatial
> > function.
> >
> > I think the files are here
> > src/providers/postgres/qgspostgresexpressioncompiler.cpp
> > src/providers/postgres/qgspostgresfeatureiterator.cpp
> >
> > For example, I would like the following expression to be compiled server
> > side:
> >
> >     intersects(
> >         $geometry,
> >         geom_from_gml(
> >
> > '<gml:Polygon+xmlns:gml="http://www.opengis.net/gml"><gml:
> outerBoundaryIs><gml:LinearRing><gml:coordinates+
> decimal="."+cs=","+ts="+">MY_GML_COORDINATES</gml:
> coordinates></gml:LinearRing></gml:outerBoundaryIs></gml:Polygon>'
> >         )
> >     )
> >
> > where MY_GML_COORDINATES is the GML version of a polygon ring coords.
> >
> > What are the required steps to do so, and where ? The result would be
> >
> >
> >     ST_Intersects(
> >         geom,
> >         ST_GeomFromGml( 'the long GML polygon representation')
> >     )
> >
> > Regards,
> > Michaël
> >
> >
> > _______________________________________________
> > Qgis-developer mailing list
> > Qgis-developer at lists.osgeo.org
> > List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> > Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> >
> _______________________________________________
> Qgis-developer mailing list
> Qgis-developer at lists.osgeo.org
> List info: http://lists.osgeo.org/mailman/listinfo/qgis-developer
> Unsubscribe: http://lists.osgeo.org/mailman/listinfo/qgis-developer
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/qgis-developer/attachments/20161115/5a8c3529/attachment-0001.html>


More information about the Qgis-developer mailing list