[postgis-users] ST_MapAlgebraExpr() Function

Paragon Corporation lr at pcorp.us
Sun Jan 22 19:57:22 PST 2012


Hmm I meant 2012-01-01


  _____  

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Paragon
Corporation
Sent: Sunday, January 22, 2012 10:48 PM
To: 'PostGIS Users Discussion'
Subject: Re: [postgis-users] ST_MapAlgebraExpr() Function


Just tried it on my latest build which is about a week old (a little newer
than the windows build currently on site but much older than when this doc
section was written).  Works fine for me.
 
Which version of PostGIS are you using?
 
Run this command:
 select postgis_scripts_build_date(), postgis_raster_lib_build_date();
 
Make sure both return a value later than 2011-01-01
 
Hope that helps,
Regina


  _____  

From: postgis-users-bounces at postgis.refractions.net
[mailto:postgis-users-bounces at postgis.refractions.net] On Behalf Of Deepak R
aj Awasthi
Sent: Sunday, January 22, 2012 12:13 PM
To: postgis-users at postgis.refractions.net
Subject: [postgis-users] ST_MapAlgebraExpr() Function


Hello,


I am a M.Sc. student and currently working with postgreSQL/PostGIS to handle
raster.  I have installed PostgreSQl  9.0 and PostGIS 2.0 in  windows 7
home premium OS. I had no problem on handling raster so far but now I got
problem while accessing ST_MapAlgebraExpr () function  which takes two
rasters as function arguments. I have followed the example provided in the
link below as follows.

First, I create the table as given,

CREATE TABLE fun_shapes(rid serial PRIMARY KEY, fun_name text, rast raster);
Then, the second syntax to insert raster and finally the use of the function
ST_MapAlgebraExpr()  as.
SELECT  ST_MapAlgebraExpr(

		area.rast, bub.rast, 'rast2', '8BUI', 'INTERSECTION',
'rast2', 'rast1') As interrast,

		ST_MapAlgebraExpr(

			area.rast, bub.rast, 'rast2', '8BUI', 'UNION',
'rast2', 'rast1') As unionrast

FROM 

  (SELECT rast FROM fun_shapes WHERE

 fun_name = 'area') As area

CROSS JOIN  (SELECT rast 

FROM fun_shapes WHERE

 fun_name = 'rand bubbles') As bub

 
 
http://postgis.refractions.net/documentation/manual-svn/RT_ST_MapAlgebraExpr
2.html


But I got error on using this syntax as:

ERROR:  function st_mapalgebraexpr(raster, raster, unknown, unknown,
unknown, unknown, unknown) does not exist
 LINE 58: SELECT  ST_MapAlgebraExpr()
  HINT:  No function matches the given name and argument types. You might
need to add explicit type casts.


 Although I am new to this database, I think that there is problem with
PostGIS 2.0 to support the function. If this the case which version I have
to install to use this function. Can anyone provide me solution for it.

 Thanks

 With Best Regards,
 Deepak



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20120122/1732501c/attachment.html>


More information about the postgis-users mailing list