[postgis-users] Problem in Clip between geometry and raster table

Pierre Racine Pierre.Racine at sbf.ulaval.ca
Thu Jul 2 07:06:54 PDT 2015


Why is the first argument to ST_Clip() is a geometry? Should be a raster.

> -----Original Message-----
> From: postgis-users-bounces at lists.osgeo.org [mailto:postgis-users-
> bounces at lists.osgeo.org] On Behalf Of Marcello Benigno
> Sent: Wednesday, July 01, 2015 7:12 AM
> To: PostGIS Users Discussion
> Subject: [postgis-users] Problem in Clip between geometry and raster table
> 
> Hello guys,
> 
> When attempting to perform a clip from a polygon and a raster table , the
> following error appeared:
> 
> 
> 	ERROR:  column "nan" does not exist
> 	LINE 1: SELECT (NaN)::double precision
> 	                ^
> 	QUERY:  SELECT (NaN)::double precision
> 	CONTEXT:  PL/pgSQL function
> st_clip(raster,integer,geometry,double precision[],boolean) line 42 at
> assignment
> 	SQL function "st_clip" statement 1
> 	(execution time: 250 ms; total time: 485 ms)
> 	 SELECT (ST_DumpAsPolygons(ST_Clip(c.geom,
> ST_Buffer(f.geometria, 0.01), TRUE))).val AS dn,
> 	  (ST_DumpAsPolygons(ST_Clip(c.geom, ST_Buffer(f.geometria,
> 0.01), TRUE))).geom AS geom
> 	FROM public.propriedade_geometria f, dados.edr c
> 	WHERE  ST_Intersects(f.geometria, c.geom)
> 	AND f.tipo = 2 AND f.propriedade_id = 6063 AND c.id_uf = 2 AND
> c.cidade_id = 4681;
> 
> 
> I can't understand what may be happening. Can I perform a casting to solve
> this problem ?
> 
> --
> 
> Marcello Benigno B. de Barros Filho
> Prof. do Curso Superior de Tecnologia em Geoprocessamento - IFPB
> Mestre em Ciências Geodésicas e Tecnologias da Geoinformação - UFPE
> Doutorando em Tecnologia Ambiental e Recursos Hídricos - UFPE
> http://profmarcello.blogspot.com
> http://about.me/marcello.benigno <http://about.me/marcello.benigno>


More information about the postgis-users mailing list