[postgis-users] How to make some geometry column visible to Qgis

Pietro Rossin pierigis at gmail.com
Mon Oct 22 02:39:31 PDT 2012


Hello Hugues
in my database I have both views and a main table on which these views pick
data from.
All of them have their own geometry column registered into the geometry
column set by postgis

My problem is that the main table (a huge one with mixed geometry data
type) has its own geometry column.
When qgis starts the connection to this db automatically looks into the
geometry column set and find the geom.column relative to the main table, so
it searches that table for the geometry type and take a lot of time to do
it...

How can I hide this geometry column?

Thnx
Pietro

2012/10/22 Francois Hugues [via PostGIS] <
ml-node+s17n5000686h90 at n6.nabble.com>

> Hello
>
>  "This because I cannot remove the entities geometry column unless I
> remove the entity table first.
> And if I don't remove (or make invisible to qgis if possible) the entities
> geometry column it slow down the qgis connection."
>
> Did you try to edit the view, using the where clause to exclude the tables
> you don't want to be seen by postgis ?
>
> Hugues.
>
>
>  ------------------------------
> *De :* [hidden email]<http://user/SendEmail.jtp?type=node&node=5000686&i=0>[mailto:[hidden
> email] <http://user/SendEmail.jtp?type=node&node=5000686&i=1>] *De la
> part de* Pietro Rossin
>
> *Envoyé :* lundi 22 octobre 2012 09:25
> *À :* [hidden email]<http://user/SendEmail.jtp?type=node&node=5000686&i=2>
> *Objet :* Re: [postgis-users] How to make some geometry column visible to
> Qgis
>
> DELETE FROM geometry_columns WHERE f_table_name = 'puntigronda';
>
> Query returned successfully: 0 rows affected, 0 ms execution time.
>
> INSERT INTO geometry_columns (f_table_catalog,f_table_schema,
> f_table_name, f_geometry_column, coord_dimension, srid,type)Â
> Â  VALUES ('','', 'puntigronda', 'the_geom', 3, 3004,'POINTS');
>
> Query returned successfully: 0 rows affected, 16 ms execution time.
>
> select relkind from pg_class where relname = 'geometry_columns';
>
> returns:
> "v"
>
> What is this?
>
> By the way
> If my technique works, is it still better to explode the "entities" table
> in one of this cases:
>
> a) single layers
> b) same kind of geometries
>
> in both cases table permanent.
>
> This because I cannot remove the entities geometry column unless I remove
> the entity table first.
> And if I don't remove (or make invisible to qgis if possible) the entities
> geometry column it slow down the qgis connection.
>
> Thanks for your help
> Pietro
>
> 2012/10/22 Sandro Santilli [via PostGIS] <[hidden email]<http://user/SendEmail.jtp?type=node&node=5000685&i=0>
> >
>
>> On Mon, Oct 22, 2012 at 08:40:07AM +0200, Pietro Rossin wrote:
>>
>> > DELETE FROM geometry_columns WHERE f_table_name = 'puntigronda';
>> ...
>> > Is there something wrong?
>>
>> What's wrong is that the "geometry_columns" table should be a view,
>> in PostGIS-2.0. If it is a view, your DELETE and INSERT and UPDATE
>> to it should have no effect.
>>
>> Can you verify this first ?
>> The DELETE/INSERT/UPDATE commands all return the number of affected
>> rows. If PostGIS is correctly installed you should alwyas get 0,
>> no matter what you try to insert/delete/update.
>>
>> Also check:
>> select relkind from pg_class where relname = 'geometry_columns';
>>
>> --strk;
>>
>>  http://www.cartodb.com - Map, analyze and build applications with
>> your data
>>
>> Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â  Â ~~
>> http://strk.keybit.netÂ
>>
>> _______________________________________________
>> postgis-users mailing list
>> [hidden email] <http://user/SendEmail.jtp?type=node&node=5000684&i=0>
>> http://postgis.refractions.net/mailman/listinfo/postgis-users
>>
>>
>> ------------------------------
>>  If you reply to this email, your message will be added to the
>> discussion below:
>>
>> http://postgis.17.n6.nabble.com/How-to-make-some-geometry-column-visible-to-Qgis-tp5000570p5000684.html
>> To unsubscribe from How to make some geometry column visible to Qgis, click
>> here.
>> NAML<http://postgis.17.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
>
> ------------------------------
> View this message in context: Re: How to make some geometry column
> visible to Qgis<http://postgis.17.n6.nabble.com/How-to-make-some-geometry-column-visible-to-Qgis-tp5000570p5000685.html>
> Sent from the PostGIS - User mailing list archive<http://postgis.17.n6.nabble.com/PostGIS-User-f3516033.html>at Nabble.com.
>
> _______________________________________________
> postgis-users mailing list
> [hidden email] <http://user/SendEmail.jtp?type=node&node=5000686&i=3>
> http://postgis.refractions.net/mailman/listinfo/postgis-users
>
>
> ------------------------------
>  If you reply to this email, your message will be added to the discussion
> below:
>
> http://postgis.17.n6.nabble.com/How-to-make-some-geometry-column-visible-to-Qgis-tp5000570p5000686.html
>  To unsubscribe from How to make some geometry column visible to Qgis, click
> here<http://postgis.17.n6.nabble.com/template/NamlServlet.jtp?macro=unsubscribe_by_code&node=5000570&code=cGllcmlnaXNAZ21haWwuY29tfDUwMDA1NzB8MjMwODY1MTQ5>
> .
> NAML<http://postgis.17.n6.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>




--
View this message in context: http://postgis.17.n6.nabble.com/How-to-make-some-geometry-column-visible-to-Qgis-tp5000570p5000687.html
Sent from the PostGIS - User mailing list archive at Nabble.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/postgis-users/attachments/20121022/dac80b1c/attachment.html>


More information about the postgis-users mailing list