Hi,<div><br></div><div>To take advantage of the gc view, geometric tables have to be created with a typemod on the geometry type, to allow system to know both geoemtry's type and SRID.</div><div>If you create the table by a "create table as select ...", you would have to alter the table to use the typemod:</div>
<div><br></div><div><div><font face="courier new, monospace">create table test as select code_dept, st_centroid(geom) as geom from dept;</font></div></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"> select * from geometry_columns;<br>
</font></div><div><font face="courier new, monospace">nicolas         | public         | test         | geom              |               2 |    0 | GEOMETRY<br></font></div><div><font face="courier new, monospace"><br></font></div>
<div><font face="courier new, monospace">alter table test alter COLUMN geom type geometry('POINT', 2154);<br></font></div><div><font face="courier new, monospace"><br></font></div><div><div><font face="courier new, monospace">select * from geometry_columns;<br>
</font></div></div><div><font face="courier new, monospace">nicolas         | public         | test         | geom              |               2 | 2154 | POINT</font><br></div><div><br></div><div>Nicolas</div><div class="gmail_extra">
<br><br><div class="gmail_quote">On 10 December 2012 12:47, Paolo Cavallini <span dir="ltr"><<a href="mailto:cavallini@faunalia.it" target="_blank">cavallini@faunalia.it</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
Il 09/12/2012 16:21, Francois Hugues ha scritto:<br>
> As I can see in the view definition, srid comes from postgis constraint : COALESCE(NULLIF(postgis_typmod_srid(a.atttypmod), 0), postgis_constraint_srid(n.nspname::text, c.relname::text, a.attname::text), 0) AS srid,<br>

><br>
> Did you have / did you try to add this kind of constraint on your table :<br>
><br>
> CONSTRAINT enforce_srid_geom CHECK (st_srid(geom) = 3003) ?<br>
<br>
Hi all.<br>
More info: the lack of SRID and geometry type in the geometry_columns happens only<br>
for the tables created by PostGIS functions (e.g. st_union, st_convexhull, etc.).<br>
Is this a known issue?<br>
All the best.<br>
<div class="HOEnZb"><div class="h5">--<br>
Paolo Cavallini - Faunalia<br>
<a href="http://www.faunalia.eu" target="_blank">www.faunalia.eu</a><br>
Full contact details at <a href="http://www.faunalia.eu/pc" target="_blank">www.faunalia.eu/pc</a><br>
Nuovi corsi QGIS e PostGIS: <a href="http://www.faunalia.it/calendario" target="_blank">http://www.faunalia.it/calendario</a><br>
_______________________________________________<br>
postgis-users mailing list<br>
<a href="mailto:postgis-users@lists.osgeo.org">postgis-users@lists.osgeo.org</a><br>
<a href="http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users" target="_blank">http://lists.osgeo.org/cgi-bin/mailman/listinfo/postgis-users</a><br>
</div></div></blockquote></div><br></div>