[postgis-users] mixed geometry types
William Kyngesburye
woklist at kyngchaos.com
Mon Jan 28 15:59:34 PST 2013
Is it OK to change a constraint to allow multiple geometry types in a table? I'm getting tired or worrying whether I can use a linestring and explode multilinestrings to match, or I need to use a multilinestring and force all imported lines to multi. Similar for polygon/multipolygon.
A typical constraint I get when importing a new table with GDAL is:
geometrytype(wkb_geometry) = 'LINESTRING'::text OR wkb_geometry IS NULL
I assume I can just change that to:
geometrytype(wkb_geometry) = 'MULTILINESTRING'::text OR geometrytype(wkb_geometry) = 'LINESTRING'::text OR wkb_geometry IS NULL
How does PostGIS 2 determine what geometry type a table is for the geometry_columns view? the first item in the constraint?
-----
William Kyngesburye <kyngchaos*at*kyngchaos*dot*com>
http://www.kyngchaos.com/
"Time is an illusion - lunchtime doubly so."
- Ford Prefect
More information about the postgis-users
mailing list