[postgis-devel] How define a view that use a case operator for geometry field

Sandro Santilli strk at keybit.net
Fri Oct 28 09:51:39 PDT 2011


On Fri, Oct 28, 2011 at 06:48:10PM +0200, aperi2007 wrote:

> 	case
> 		when a.codlinea<>'' then b.geom::geometry(LINESTRING,3003)
> 		when a.codlineasoprasotto<>'' then c.geom::geometry(LINESTRING,3003)
> 	end as geom

ELSE ?

> Is correct that geometry_columns don't report the geometry-type and
> the srid of a view defined like this ?

Try:

 SELECT * FROM the_view WHERE ST_SRID(geom) = 0;

--strk;

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



More information about the postgis-devel mailing list