[pdal] sql query pgpointcloud

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

[pdal] sql query pgpointcloud

Florent Poux
Hey all,

I am struggling with a sql query within pg.pointcloud writer that you
may have a solution for.

is there a way to store the pre sql query as a variable that will be
used for the post sql query ?

specifically, i want to store as pre sql the count or max from a table,
and pass this parameter to condition a query in the post sql, is that
possible ?

Thank you !

Kind regards,

Florent Poux
University of Li├Ęge
Geovast 3D

_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] sql query pgpointcloud

Howard Butler-3

> On May 18, 2017, at 9:42 AM, Florent Poux <[hidden email]> wrote:
>
> Hey all,
>
> I am struggling with a sql query within pg.pointcloud writer that you may have a solution for.
>
> is there a way to store the pre sql query as a variable that will be used for the post sql query ?
>
> specifically, i want to store as pre sql the count or max from a table, and pass this parameter to condition a query in the post sql, is that possible ?
>
> Thank you !

Florent,

There's no *PDAL* way to do this, but could you stash your variable in some kind of temporary (are there bound-to-session variables?, maybe another table) for use by the post sql?

This reminds me I've wanted to make the PointView metadata available to DB writers' post_sql methods as a variable. Very similar to what we did for the writers.las https://www.pdal.io/tutorial/las.html#metadata-example I could see how this might be useful to downstream consumers.

Howard

_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal
Reply | Threaded
Open this post in threaded view
|

Re: [pdal] sql query pgpointcloud

Florent Poux

Thanks Howard for the answer,

Yes, for now i store it temporarly as a view that I then use in the post SQL, but I was thinking maybe it is possible to do it directly the PDAL way :).

Florent

      
On May 18, 2017, at 9:42 AM, Florent Poux [hidden email] wrote:

Hey all,

I am struggling with a sql query within pg.pointcloud writer that you may have a solution for.

is there a way to store the pre sql query as a variable that will be used for the post sql query ?

specifically, i want to store as pre sql the count or max from a table, and pass this parameter to condition a query in the post sql, is that possible ?

Thank you !
Florent,

There's no *PDAL* way to do this, but could you stash your variable in some kind of temporary (are there bound-to-session variables?, maybe another table) for use by the post sql?

This reminds me I've wanted to make the PointView metadata available to DB writers' post_sql methods as a variable. Very similar to what we did for the writers.las https://www.pdal.io/tutorial/las.html#metadata-example I could see how this might be useful to downstream consumers.

Howard



_______________________________________________
pdal mailing list
[hidden email]
https://lists.osgeo.org/mailman/listinfo/pdal