Re: [postgis-users] ST_Intersection very slow.

2015-02-24 Thread John Abraham
Thanks Mark. I will indeed do the st_dump, but I don't think it will help much (very few multis). I think the tiling will help a lot. What I wonder, though, is how long it will take to tile? Afterall, it's still an st_intersection operation to tile each geometry against each tile. Is there

[postgis-users] ST_Clip on a raster without band crashes the server

2015-02-24 Thread Pierre Racine
Hi, I have: POSTGIS=2.1.5 r13152 GEOS=3.4.2-CAPI-1.8.2 r0 PROJ=Rel. 4.8.0, 6 March 2012 GDAL=GDAL 1.11.1, released 2014/09/24 LIBXML=2.7.8 LIBJSON=UNKNOWN RASTER and SELECT ST_Clip(ST_MakeEmptyRaster(42, 42, 0, 0, 1.0, 1.0, 0, 0, 4269), ST_MakeEnvelope(0, 0, 20, 20, 4269)); crashed my

Re: [postgis-users] ST_Clip on a raster without band crashes the server

2015-02-24 Thread Bborie Park
File a bug. It shouldn't work for an empty raster. On Tue, Feb 24, 2015 at 6:50 AM, Pierre Racine pierre.rac...@sbf.ulaval.ca wrote: Hi, I have: POSTGIS=2.1.5 r13152 GEOS=3.4.2-CAPI-1.8.2 r0 PROJ=Rel. 4.8.0, 6 March 2012 GDAL=GDAL 1.11.1, released 2014/09/24 LIBXML=2.7.8 LIBJSON=UNKNOWN

Re: [postgis-users] ST_Clip on a raster without band crashes the server

2015-02-24 Thread Sandro Santilli
On Tue, Feb 24, 2015 at 09:50:00AM -0500, Pierre Racine wrote: Hi, I have: POSTGIS=2.1.5 r13152 GEOS=3.4.2-CAPI-1.8.2 r0 PROJ=Rel. 4.8.0, 6 March 2012 GDAL=GDAL 1.11.1, released 2014/09/24 LIBXML=2.7.8 LIBJSON=UNKNOWN RASTER and SELECT ST_Clip(ST_MakeEmptyRaster(42, 42, 0, 0,

Re: [postgis-users] ST_Clip on a raster without band crashes the server

2015-02-24 Thread Pierre Racine
I think when the ST_Clip() crop parameter is set to TRUE, ST_Clip() could just change the extent of the empty raster When it is set to false, it just returns the raster unmodified. I'll fill a bug. Thanks, Pierre -Original Message- From: postgis-users-boun...@lists.osgeo.org

Re: [postgis-users] ST_Intersection very slow

2015-02-24 Thread John Abraham
Following advice from Mark and Remi, I am now tiling the troublesome layer. It's not going quickly. I'm trying an intersection of the layer with only 5 of my 10kmX10km grids and it has been running for 30 min. I have 8680 grids, which is more features than the layer I was originally working

Re: [postgis-users] ST_Intersection very slow

2015-02-24 Thread Rémi Cura
Hey, I highjack this interesting discussion, sorry =) If you have one single massive Polygon (no multi). You can generate a point table (keeping path of course) with ST_DumpPoints. Then you construct an index on this table. Then you perform your Intersection with indexed points, which will be

Re: [postgis-users] ST_Intersection very slow

2015-02-24 Thread Mark Wynter
The land cover data you’re working with - does it come as a raster? We need a strategy for busting up that single, monolithic poly with lots of holes. If its a raster, then I think that tiling on import would be of huge benefit. I’m just under the pump the next few days.

Re: [postgis-users] ST_Intersection very slow

2015-02-24 Thread Mark Wynter
Thanks Mark. I will indeed do the st_dump, but I don't think it will help much (very few multis). I think the tiling will help a lot. What I wonder, though, is how long it will take to tile? Afterall, it's still an st_intersection operation to tile each geometry against each tile.