[Qgis-user] Re:autostyles for PostGIS

Andrea Peri 2007 aperi2007 at gmail.com
Fri Sep 17 12:07:21 PDT 2010



>Hi all.
>If we save a file in the same folder and with the same name as a vector layer, that
>style is used automagically every time the layer is opened (which is good).
>How could one do the same for a PostGIS layer?
>
>All the best, and thanks for any suggestion.

It is a good question.
But it is a bit complex.
Because a table is not like a file.

Infact if for a shapefile (a file) the style is in another file.
Maintaining the same paradigm, for a table the style must be in another table.

But for a style-file is more simple use it. Is sufficient to decide of use another extension. (.sty for example)

For a table, the style cannot be another table with the same name.
So the choice of others products was to use a unique table (with a fixed name), usable for all the tables of the schema.

This is quite simple conceptually, but is heavy as choice because need to establish that in a postgis-enabled schema must be available a specific table with a specific name.

In ArcSDE for example, esri use a set of tables gdb_* , one of they is for the rendering.

However is qgis could have an autostyle in a table for postgres/postgis (and spatialite also) , it will be a great feature.


Regards,

Andrea.





More information about the Qgis-user mailing list