Problem by using raster function ST_Clip

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Problem by using raster function ST_Clip

Michael Werner Maur-2
Hello,

I am using Postgis Raster in POSTGIS 2.1.5 on PostgreSQL 9.4.5 on Ubuntu 15.04
32-bit system.
I using ST_Clip to clip a huge number of GeoTiff Files by the geometry field of
another POSTGIS table. In most cases it works real good. Here my  an example for
the request I use:

SELECT ST_Clip(a.rast, ST_Buffer(b.geom, 1.7)) AS clip_rast, a.rid, b.id_bplan
FROM raster_tab a LEFT JOIN umringe_tab b ON a_filename = b.datei_bez;

In some cases I got the folowing problem. Database message is the following :

SELECT ST_CLIP( .....
ERROR: out of memory
DETAIL: Failed on request of size 149598040.
CONTEXT: PL/pgSQL function ST_Clip(....) line8 at RETURN

My system has allreeady 4 cores running and 8 GB RAM. I did mamy experiments
with the tuning of the postgresql.conf - file, but without any effect. The
raster data is in the file system an just linked to the database.

Hope that is all informationen needed.
Is there anybody having any idea to solve or to avoid the problem ?

best regard.

Michael Maur

--
Michael Maur

Zentrale Stelle für Geodateninfrastruktur in Rheinland-Pfalz

Von-Kuhl-Straße 49
56070 Koblenz
Telefon 0261 492-152
Telefax 0261 492-492
[hidden email]
www.geoportal.rlp.de
_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users
Reply | Threaded
Open this post in threaded view
|

Re: Problem by using raster function ST_Clip

Sandro Santilli-2
On Fri, Apr 01, 2016 at 12:41:37PM +0200, Michael Werner Maur wrote:

> Hello,
>
> I am using Postgis Raster in POSTGIS 2.1.5 on PostgreSQL 9.4.5 on Ubuntu 15.04
> 32-bit system.
> I using ST_Clip to clip a huge number of GeoTiff Files by the geometry field of
> another POSTGIS table. In most cases it works real good. Here my  an example for
> the request I use:
>
> SELECT ST_Clip(a.rast, ST_Buffer(b.geom, 1.7)) AS clip_rast, a.rid, b.id_bplan
> FROM raster_tab a LEFT JOIN umringe_tab b ON a_filename = b.datei_bez;
>
> In some cases I got the folowing problem. Database message is the following :
>
> SELECT ST_CLIP( .....
> ERROR: out of memory
> DETAIL: Failed on request of size 149598040.
> CONTEXT: PL/pgSQL function ST_Clip(....) line8 at RETURN

> Is there anybody having any idea to solve or to avoid the problem ?

Try to separate the ST_Clip from the ST_Buffer operation, and
see if one or the other, in isolation, raise the problem.

For example you could create a temporary table with the result of
ST_Buffer and then use the temporary table for the clip operation.

--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html
_______________________________________________
postgis-users mailing list
[hidden email]
http://lists.osgeo.org/mailman/listinfo/postgis-users