<div dir="ltr"><div class="gmail_default" style="font-size:large">Thanks Matthias.<br></div><div class="gmail_default" style="font-size:large">I will try to give it a go in my spare time ( no fund either)<br><br></div><div class="gmail_default" style="font-size:large">Cheers<br></div></div><div class="gmail_extra"><br><div class="gmail_quote">2016-11-15 12:12 GMT+01:00 Matthias Kuhn <span dir="ltr"><<a href="mailto:matthias@opengis.ch" target="_blank">matthias@opengis.ch</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Hi Michaël,<br>
<br>
No functions are compiled so far (afaik).<br>
<br>
One will need to implement this in qgssqlexpressioncompiler or<br>
qgspostgresexpressioncompiler for all the functions involved (I'm not<br>
sure if / to what degree these functions are compatible between<br>
different sql dialects).<br>
<br>
Also make sure that any new function which is compiled is unit tested<br>
(providertestbase.py) to make sure it behaves exactly the same when<br>
executed locally and server side - across all providers.<br>
<br>
It's a long-standing plan of mine but I haven't found the time (or<br>
contract) for this yet...<br>
<br>
Matthias<br>
<div><div class="h5"><br>
On 11/15/2016 11:01 AM, kimaidou wrote:<br>
> Hi all,<br>
><br>
> I usually work with PostgreSQL data in QGIS.<br>
> I would like to have a guidance on how to improve the set of compiled<br>
> expressions for PostgreSQL. My goal is to propose a PR for some spatial<br>
> function.<br>
><br>
> I think the files are here<br>
> src/providers/postgres/<wbr>qgspostgresexpressioncompiler.<wbr>cpp<br>
> src/providers/postgres/<wbr>qgspostgresfeatureiterator.cpp<br>
><br>
> For example, I would like the following expression to be compiled server<br>
> side:<br>
><br>
>     intersects(<br>
>         $geometry,<br>
>         geom_from_gml(<br>
><br>
> '<gml:Polygon+xmlns:gml="<a href="http://www.opengis.net/gml" rel="noreferrer" target="_blank">http:<wbr>//www.opengis.net/gml</a>"><gml:<wbr>outerBoundaryIs><gml:<wbr>LinearRing><gml:coordinates+<wbr>decimal="."+cs=","+ts="+">MY_<wbr>GML_COORDINATES</gml:<wbr>coordinates></gml:LinearRing><<wbr>/gml:outerBoundaryIs></gml:<wbr>Polygon>'<br>
>         )<br>
>     )<br>
><br>
> where MY_GML_COORDINATES is the GML version of a polygon ring coords.<br>
><br>
> What are the required steps to do so, and where ? The result would be<br>
><br>
><br>
>     ST_Intersects(<br>
>         geom,<br>
>         ST_GeomFromGml( 'the long GML polygon representation')<br>
>     )<br>
><br>
> Regards,<br>
> Michaël<br>
><br>
><br>
</div></div>> ______________________________<wbr>_________________<br>
> Qgis-developer mailing list<br>
> <a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
> List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
> Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
><br>
______________________________<wbr>_________________<br>
Qgis-developer mailing list<br>
<a href="mailto:Qgis-developer@lists.osgeo.org">Qgis-developer@lists.osgeo.org</a><br>
List info: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a><br>
Unsubscribe: <a href="http://lists.osgeo.org/mailman/listinfo/qgis-developer" rel="noreferrer" target="_blank">http://lists.osgeo.org/<wbr>mailman/listinfo/qgis-<wbr>developer</a></blockquote></div><br></div>