Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [udig-users] PostGIS: Multiple geometry columns on one table



Hi James,

Have a look into the table "geometry_columns" in your postgis database. In that table, you will find two columns by the names of f_table_name and f_geometry_colulmn. As far as my knowledge goes, this specifies which column will be fetched from a particular table as a geometry column. If you change the value of f_geometry_colulmn with the column you want to display, then I think it should work. But be careful in doing so, as there is another column in this table which specifies the type of the geometry you want to use and this might conflict as one of the column may have POINTs however other column may contain POLYGONs in your table.

If you do the above mentioned change, then I think it might get reflected in uDig. However, I can not be certain, since I have never tried it myself.

Option 2
You might also want to re-think about your database design and try to use two tables instead of one but with Foreign Key constraints. The second table will only hold id(PK), data_id(FK to original table) and Geometry Column. Hence, not replicating the rest of the information as such in the first table.

I hope this helps.

Cheers,

Farrukh.



--- On Thu, 3/12/09, demichej <james.demichele@xxxxxxxxxx> wrote:

From: demichej <james.demichele@xxxxxxxxxx>
Subject: [udig-users] PostGIS: Multiple geometry columns on one table
To: udig-users@xxxxxxxxxxxxxxxxxxxxx
Date: Thursday, March 12, 2009, 3:55 AM


Hello,

I have been having a lot of success with uDig, but have hit an issue where
my Postgres table has 2 geometry columns.

I can't seem to figure out how to show one shape column on the map versus
the other column. Is there a way to choose which column i want to use with
Postgis?

It looks like it is just showing me the first geometry column in the table,
and doesn't even give me an option for the other one.

Thanks!
--
View this message in context: http://n2.nabble.com/PostGIS%3A-Multiple-geometry-columns-on-one-table-tp2464322p2464322.html
Sent from the udig-users mailing list archive at Nabble.com.

_______________________________________________
udig-users mailing list
udig-users@xxxxxxxxxxxxxxxxxxxxx
http://lists.refractions.net/mailman/listinfo/udig-users


Back to the top