Re: [postgis-users] Computation of quantiles in Polygon-Raster

2015-05-05 Thread Pierre Racine
I guess you have two options: 1) clip and union your tiles BEFORE computing the quantile 2) use the ST_Quantile variant taking table and column names. I don't know if these function aggregates the results though. Pierre -Original Message- From: postgis-users-boun...@lists.osgeo.org

Re: [postgis-users] Quick/unobstrusive way to determine if a geometry has curve elements?

2015-05-05 Thread Paul Ramsey
ST_HasArc() should do what you want On Tue, May 5, 2015 at 1:52 AM, Andrea Aime andrea.a...@geo-solutions.it wrote: Hi, I have some generic build of code that are building queries to postgis includingthe st_simplify function, e.g: select st_simplify(geometry, tolerance) from mytable where

Re: [postgis-users] Quick/unobstrusive way to determine if a geometry has curve elements?

2015-05-05 Thread Andrea Aime
On Tue, May 5, 2015 at 6:31 PM, Paul Ramsey pram...@cleverelephant.ca wrote: ST_HasArc() should do what you want Ah ha, looks like exactly what I wantedI did search for all function names containing curves, it did not occur to me to search for arc :-) Cheers Andrea -- == GeoServer

[postgis-users] Quick/unobstrusive way to determine if a geometry has curve elements?

2015-05-05 Thread Andrea Aime
Hi, I have some generic build of code that are building queries to postgis includingthe st_simplify function, e.g: select st_simplify(geometry, tolerance) from mytable where ... This is done to optimize data transfer and overall performance when doing map rendering, we just get the geometries as

Re: [postgis-users] Quick/unobstrusive way to determine if a geometry has curve elements?

2015-05-05 Thread Nicolas Ribot
Hi Andrea, You could use a PLPGSQL function to catch error for curved geometries and return the geometry itself in case of error. Then, either you put all your generic code in this function, or you just write a wrapper around st_simplify and call it from your SQL code, according to your needs.

Re: [postgis-users] Quick/unobstrusive way to determine if a geometry has curve elements?

2015-05-05 Thread Andrea Aime
On Tue, May 5, 2015 at 11:35 AM, Nicolas Ribot nicolas.ri...@gmail.com wrote: Hi Andrea, You could use a PLPGSQL function to catch error for curved geometries and return the geometry itself in case of error. Then, either you put all your generic code in this function, or you just write a

Re: [postgis-users] Quick/unobstrusive way to determine if a geometry has curve elements?

2015-05-05 Thread Rémi Cura
Putting an exception block will slow down your function. You can put an exception in any plpgsql function. So you only need the right to create a plpgsql function. Cheers, Rémi-C 2015-05-05 11:45 GMT+02:00 Andrea Aime andrea.a...@geo-solutions.it: On Tue, May 5, 2015 at 11:35 AM, Nicolas