[postgis-devel] Typmod Again
Chris Hodgson
chodgson at refractions.net
Wed Jul 22 14:24:56 PDT 2009
According to the 1.4 manual, postgis has the following type options:
The type of the spatial object. To restrict the spatial column to a
single type, use one of: POINT, LINESTRING, POLYGON, MULTIPOINT,
MULTILINESTRING, MULTIPOLYGON, GEOMETRYCOLLECTION or corresponding XYM
versions POINTM, LINESTRINGM, POLYGONM, MULTIPOINTM, MULTILINESTRINGM,
MULTIPOLYGONM, GEOMETRYCOLLECTIONM. For heterogeneous (mixed-type)
collections, you can use "GEOMETRY" as the type.
I don't see any Z options, let alone GEOMETRYZ/M. Do we really have
different types for each possible type and 2/3/4-d combination?
Chris
Paul Ramsey wrote:
> OK, working into the typmod implementation, I found this interesting quirk.
> Before, I was talking about
>
> geometry(srid, type, dims)
>
> But, in fact, dims is implicit in type, and you probably want that.
> IE, 'POINTZM' (as defined in Table 4 of SFSQL 1.2.0) is a valid type,
> and implies a dimensionality of four. We want our types to include
> that information so we can distinguish between POINTM and POINTZ,
> otherwise, we could define geometry(4326, POINT, 3) and be able to
> accept both POINTM and POINTZ.
>
> So that brings us down to just
>
> geometry(srid, type)
>
> Anything I'm missing?
>
> P
> _______________________________________________
> postgis-devel mailing list
> postgis-devel at postgis.refractions.net
> http://postgis.refractions.net/mailman/listinfo/postgis-devel
>
More information about the postgis-devel
mailing list