[postgis-devel] [PostGIS] #1194: geometry_column wrong to establish the geometrytype in some views
PostGIS
trac at osgeo.org
Wed Sep 14 14:56:25 PDT 2011
#1194: geometry_column wrong to establish the geometrytype in some views
-----------------------+----------------------------------------------------
Reporter: aperi2007 | Owner: pramsey
Type: defect | Status: new
Priority: medium | Milestone: PostGIS 2.0.0
Component: postgis | Version: trunk
Keywords: |
-----------------------+----------------------------------------------------
Hi,
In the new postgis200,
I notice the geometry_columns view wrong to understand the geometrytype of
some views a bit complex.
I have this view:
{{{
CREATE VIEW v_unita_volumetrica AS
SELECT
a.id as oid,
a.codunitavolumetrica as unita_vol,
a.altezza_volume as alt_volume,
a.quota_estrusione as quotestr,
a.cod_edificio as cod_ed,
a.cod_edificato_minore as cod_ed_min,
c.documentation as tipoporz,
a.codpoligono as codpoligon,
a.codsuperficie as codsuperf,
'SUOLO' as from,
ST_Force_3D(b.geom) as geom
FROM
(( unita_volumetrica a
LEFT OUTER JOIN suolo b ON (a.codpoligono = b.codpoligono) )
LEFT OUTER JOIN zz_tipoporzioneunitavolumetricatype c ON
(a.cod_tipo_porzione=c.value))
WHERE (
a.codsuperficie = ''
)
UNION ALL
SELECT
a.id as oid,
a.codunitavolumetrica as unita_vol,
a.altezza_volume as alt_volume,
a.quota_estrusione as quotestr,
a.cod_edificio as cod_ed,
a.cod_edificato_minore as cod_ed_min,
c.documentation as tipoporz,
a.codpoligono as codpoligon,
a.codsuperficie as codsuperf,
'SUP3D' as from,
ST_Force_3D(b.geom) as geom
FROM
(( unita_volumetrica a
LEFT OUTER JOIN superficie_3d b ON (a.codsuperficie = b.codsuperficie)
)
LEFT OUTER JOIN zz_tipoporzioneunitavolumetricatype c ON
(a.cod_tipo_porzione=c.value))
WHERE (
a.codpoligono = ''
)
;
}}}
The geometry_view report me this having a GEOMETRY type.
Instead it should report me a POLYGON type.
I notice this happened on all my views with the "UNION ALL " option.
Other views not having the UNION ALL has correctly report the
geometrytype.
I use postgis 2.0.0 trunk on windows.
I don't remenber the trunk version, but is the version experimental
released from Robe in the 4 august.
Regards.
--
Ticket URL: <http://trac.osgeo.org/postgis/ticket/1194>
PostGIS <http://trac.osgeo.org/postgis/>
The PostGIS Trac is used for bug, enhancement & task tracking, a user and developer wiki, and a view into the subversion code repository of PostGIS project.
More information about the postgis-devel
mailing list