Re: [Geoserver-users] Using tablesample in sld

2018-05-27 Thread Andrea Aime
Hi Matteo, there is a tutorial on writing functions here: http://docs.geotools.org/latest/userguide/tutorial/function.html About translating them down in SQL, that gets trickier (hence my "easier said than done"). If the tablesample declaration can be written anywhere in the WHERE clause (like an

Re: [Geoserver-users] Using tablesample in sld

2018-05-27 Thread Matteo Cusmai
Ciao Andrea, Thanks for the quick answer. Yes, I known that I can't use sql view parameter from sld, and however, I don't like use it for security reason. So I was thinking about a wps, but I have to check if it is possible. But the best solution, I think is to implement your second idea, with f

Re: [Geoserver-users] Using tablesample in sld

2018-05-27 Thread Andrea Aime
Hi Matteo, I don't think there is a way to do what you want from the SLD, and using that function. In order to run that SQL, you have to setup a SQL View. So that "10" could be a parameter in the parametric sql view. But SLD cannot specificy those view parameters, only the client in the GetMap can