[postgis-users] How create a polygon rectangular from the BBOX of a geometry.

Andrea Peri aperi2007 at gmail.com
Sun Feb 17 07:06:04 PST 2013


Hi,

I have a table named "route_streets" with a linear geometry in the epsg:3003.

I try to create a view (v_route_streets)  that has as geometry a
polygon with the BBOX of the linear geometry.

To do this I try this sql:

  create view streets.v_route_streets as
    select a.gid, a.ri05_name as name,
ST_Extent(a.geometry)::geometry(POLYGON, 3003) as geometry from
streets.route_streets as a group by a.gid,a.ri05_nome;

It is normally created but when try to use it on qgis I'm hhaving an error.
QGIS say that this is not a valid layer.

I don't understand where is the problem.

I'm using postgis 2.0.1

Any hint is welcome,

thx,


-- 
-----------------
Andrea Peri
. . . . . . . . .
qwerty àèìòù
-----------------


More information about the postgis-users mailing list