Lorenzo,

There is nothing wrong here except your query.

 

There is no such signature as ST_Clip(Boolean, geom,rast)

 

It's 

 

ST_Clip(geom,rast, boolean)

 

Your proc query did the array agg of protos out of sequence.

 

Easiest way to see this is just open a psql console and run

 

\df st_clip

 

And you should see this though your schema location is probably different from 
mine.

 

                                                                                
   List of functions

Schema  |  Name   | Result data type |                                          
                Argument data types                                             
             |  Type

---------+---------+------------------+---------------------------------------------------------------------------------------------------------------------------------------+--------

postgis | st_clip | raster           | rast raster, geom geometry, crop boolean 
                                                                                
             | normal

postgis | st_clip | raster           | rast raster, geom geometry, nodataval 
double precision, crop boolean DEFAULT true                                     
                | normal

postgis | st_clip | raster           | rast raster, geom geometry, nodataval 
double precision[] DEFAULT NULL::double precision[], crop boolean DEFAULT true  
                | normal

postgis | st_clip | raster           | rast raster, nband integer, geom 
geometry, crop boolean                                                          
                     | normal

postgis | st_clip | raster           | rast raster, nband integer, geom 
geometry, nodataval double precision, crop boolean DEFAULT true                 
                     | normal

postgis | st_clip | raster           | rast raster, nband integer[], geom 
geometry, nodataval double precision[] DEFAULT NULL::double precision[], crop 
boolean DEFAULT true | normal

(6 rows)

 

Or look at the manual

http://postgis.net/docs/RT_ST_Clip.html

 

 

Hope that helps,

Regina

http://www.postgis.us

http://postgis.net

 

 

 

 

 

From: postgis-users [mailto:[email protected]] On Behalf Of 
Lorenzo Bottaccioli
Sent: Friday, November 20, 2015 7:10 AM
To: Lorenzo Bottaccioli <[email protected]>; PostGIS Users 
Discussion <[email protected]>
Subject: Re: [postgis-users] Error with ST functions

 

HI, I'have tried to reinstall postgis. But i still get errors like this one:

 

 SELECT                                                    

ST_clip(True,polygon.geom, raster.rast)

FROM 

  public.edifici as polygon,

  public.ele1000x1000 as raster;

ERROR:  function st_clip(boolean, geometry, raster) does not exist

LINE 2: ST_clip(True,polygon.geom, raster.rast)

        ^

HINT:  No function matches the given name and argument types. You might need to 
add explicit type casts.

gis=# SELECT                     

  n.nspname, p.proname, array_agg(t.typname)

 FROM                                            

  pg_proc p, pg_namespace n, pg_type t

 WHERE p.proname = 'st_clip'

   AND n.oid = p.pronamespace

   AND t.oid = any (p.proargtypes)

 GROUP BY

   n.nspname, p.proname, p.oid;

 nspname | proname |              array_agg               

---------+---------+--------------------------------------

 public  | st_clip | {bool,_float8,geometry,raster}

 public  | st_clip | {bool,_int4,_float8,geometry,raster}

 public  | st_clip | {bool,float8,geometry,raster}

 public  | st_clip | {bool,int4,float8,geometry,raster}

 public  | st_clip | {bool,int4,geometry,raster}

 public  | st_clip | {bool,geometry,raster}

 

 

2015-11-19 18:38 GMT+01:00 Sandro Santilli <[email protected] 
<mailto:[email protected]> >:

On Thu, Nov 19, 2015 at 06:25:46PM +0100, Lorenzo Bottaccioli wrote:
> grep -i st_bandisnodata rtpostgis.sql
> CREATE OR REPLACE FUNCTION st_bandisnodata(rast raster, band integer
> DEFAULT 1, forceChecking boolean DEFAULT FALSE)
> CREATE OR REPLACE FUNCTION st_bandisnodata(rast raster, forceChecking
> boolean)
>     AS $$ SELECT st_bandisnodata($1, 1, $2) $$

Right, so someone tempered with the db.
There might be more things missing.

One way to check what else is missing would be:

 BEGIN;
 CREATE EXTENSION postgis VERSION '2.1.2' FROM 'unpackaged';
 -- you'd get an error here, if anything is missing
 ROLLBACK; -- we're just checking, right?

Let me know if you need help with fixing things.


--strk;

  ()   Free GIS & Flash consultant/developer
  /\   http://strk.keybit.net/services.html

 

_______________________________________________
postgis-users mailing list
[email protected]
http://lists.osgeo.org/mailman/listinfo/postgis-users

Reply via email to