[gdal-dev] The use of geometry_columns of the Pg driver

Ari Jolma ari.jolma at tkk.fi
Wed Nov 12 04:26:13 EST 2008


The Pg driver consults geometry_columns for the list of layers in the 
database and for the geometry type of a layer. But it does not consult 
it for the geometry column itself. For example:

I have a table "points", which is created with shp2psql and it is fine 
with OGR. Then I decide to add another geometry column, which will 
contain the points transformed somehow. I can now either add this as a 
new entry in the geometry_columns table or edit the existing entry to 
have the new column name. In either scenario OGR is by default a bit 
lost. I need to use SQL to get an OGR layer of the points with the new, 
alternative coordinates.

Should this disregard of column names in geometry_columns be considered 
a bug or feature?

Best regards,

Ari



More information about the gdal-dev mailing list