[postgis-users] "geometry" type versus single type in spatial column

Darren Houston dhouston at beyondcompliance.ca
Mon Jan 19 17:23:06 PST 2004


Hello Christina,

I was hoping someone more knowledgeable than I on this matter would have
responded to you by now, but none have. So to not keep you hanging, I'll add my
humble idea on the matter.

The whole point to a database and good database design is to have as normalized
datasets as possible (and I believe this applies to spatial data as well). A
table that has a spatial column of single type (point, line, polygon, etc.) is
usually more normalized than a column of "geometry" type.

Also, most spatial entities can be represented by a single type geometry column.
There is the odd time when you need to define a new geometry, like that of a
true arc (not a representation of an arc), which isn't supported by single type
geometry columns, and I do believe you can use "geometry" for this purpose
(never seen or tried this).

Another note, many functions in PostGIS require you to use a specific type of
geometry (such as point or line), and it is much easier to work with these
functions if the spatial data column is of single type.

I can see a performance degradation issue with heterogeneous geometry columns,
especially if you have to first find a geometry then perform an operation on it.
So, if your dataset is already homogeneous, keep it homogeneous.

As I said previous, I have limited knowledge in heterogeneous spatial data
columns (because they are rarely used). If I am wrong in anything above, please
someone correct me. I hope some of this information will at least help you.

Thank you,

--
Darren Houston




More information about the postgis-users mailing list