Hi all!
may be my question is too dummy, but anyway, I would be thankful for reply. Let's suppose, we have a database table with several data colums (say, thematic attributes) and one geometry column. These data attributes refer to both point and polygon geometries. Is it possible to put different geometry types (e.g. point, polygon) in one PostGIS geometry column? ... or I should create 2 tables with the same structure, but with different type definition of geometry column, i.e. separately for points and for polygons? Thanks a lot in advance for opinions/suggestions! Best wishes, Peter Gatalsky Researcher, MA, Dipl.-Ing. http://www.ais.fhg.de/~gatalsky ICQ #14560614 __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com _______________________________________________ postgis-users mailing list [hidden email] http://postgis.refractions.net/mailman/listinfo/postgis-users |
> Hi all!
> > may be my question is too dummy, but anyway, I would > be thankful for reply. > > Let's suppose, we have a database table with several > data colums (say, thematic attributes) and one > geometry column. These data attributes refer to both > point and polygon geometries. > > Is it possible to put different geometry types (e.g. > point, polygon) in one PostGIS geometry column? > > ... or I should create 2 tables with the same > structure, but with different type definition of > geometry column, i.e. separately for points and for > polygons? > > Thanks a lot in advance for opinions/suggestions! > Hi Peter, It is possible to store several geometry types in one postgis column. Just declare this column to store 'GEOMETRY' type when calling AddGeometryColumn(...) to register your geometric column. You will then be able to store points, linestrings, polygons into this column. Personally, I would prefer to have consistent tables with only one geometric type in it (a little bit like shapefiles). I find it simpler to manage, especially when doing geographic operations on my table. Some of these operations work only on one precise data type (point or polygon, for instance). Why not splitting your dataset into several tables, one per geometric type. Queries and views will allow you to have one "logical" view of your data, if needed. Nicolas _______________________________________________ postgis-users mailing list [hidden email] http://postgis.refractions.net/mailman/listinfo/postgis-users |
> > Is it possible to put different geometry types (e.g.
> > point, polygon) in one PostGIS geometry column? I'd prefer having one table that contained multiple geometry columns. my_table ( my_data, my_point_geom, my_line_geom ); _______________________________________________ postgis-users mailing list [hidden email] http://postgis.refractions.net/mailman/listinfo/postgis-users |
hi again,
thank you very much for your helpful answers/ideas! Best wishes, Peter Gatalsky Researcher, MA, Dipl.-Ing. http://www.ais.fhg.de/~gatalsky ICQ #14560614 ____________________________________________________ Start your day with Yahoo! - make it your home page http://www.yahoo.com/r/hs _______________________________________________ postgis-users mailing list [hidden email] http://postgis.refractions.net/mailman/listinfo/postgis-users |
Free forum by Nabble | Edit this page |