Composition - ObjectVision/GeoDMS GitHub Wiki
The composition type indicates how a sequence of coordinates needs to be interpreted.
The GeoDMS supports three composition types:
- arc: an arc consists of at least a start and end point and 0 or more intermediates per entry.
- poly or polygon: a polygon consists of at least three points per entry, the last and first point need to be the same to create a closed polygon. The composition type poly is also used to indicate multiple elements in sequence functions.
- multipoint: a multipoint is an unordered set of points per entry; the coordinates are not connected into a line or ring. It is stored in the same point-sequence storage as arc and polygon.
The composition type is configured for feature attributes of arcs, polygons and multipoints with the keyword arc, polygon or multipoint in the same brackets as the domain unit. A comma separates domain units and the composition type, the order is irrelevant.
Multipoint geometry can be read from vector sources (e.g. ESRI shapefiles or other formats via gdal.vect) and, since GeoDMS 20.2.0, constructed from a point table with points2sequence.
For point feature attributes no composition type has to be configured.
composition type of a calculated attribute
The composition type of a calculated feature attribute follows from its expression. When the configured composition type differs from the calculated one, the GeoDMS reports
[W] /shapes/geometry: Depreciated: the declared ValueComposition 'poly' differs from the 'multipoint' of the calculation result of union_data(., mp)[id(.)].
[W] Make the configuration explicit about the intended composition (use points2sequence for arc, points2polygon for poly and points2multi_point for multipoint). This will become an error in GeoDms 21.
and continues with the calculated composition type, which is also what the item hands on to its readers. The item named is the one that carries the differing declaration, so that is where the configuration has to change. Since GeoDMS 20.19.3 the message also quotes the calculation rule of that item, as the starting point for finding what decided the composition: the deciding operator is often not in the rule itself but in an item the rule refers to, since the operators listed below pass a composition on rather than construct one. From GeoDMS 21 the difference is an error, so configuration and expression should be made to agree.
Operators that construct geometry set the composition type: points2sequence results in arc, points2polygon in poly and points2multi_point in multipoint.
The composition type that a StorageManager writes as the geometry type of its layer is the calculated one, so this difference is not only a warning. A geometry declared poly but calculated with points2sequence is written as a polyline layer: an ESRI Shapefile gets shape type PolyLine instead of Polygon, a GeoPackage a LineString layer. Reading such a file back into an attribute declared poly then fails with Value composition is "poly", which is incompatible with GDAL's geometry type "Line String", which is how the polygons of a written file go missing. Use points2polygon where polygons are meant.
Operators that only select or copy geometry keep the composition type of their argument: a lookup, union_data, union, a convert or value type cast, and, since GeoDMS 20.19.3, iif and the ? : operator. Before 20.19.3 iif and ? : always resulted in an arc, and a multipoint argument came out of a lookup, union and union_data as an arc as well.
When the value arguments of such an operator have different composition types, no composition type describes the result: it would be part ring and part polyline, and the composition type is what a StorageManager writes as its geometry type. The GeoDMS reports this as deprecated and results in poly, the rule it has always used for such a mixture, and from GeoDMS 21 it is an error. Make the arguments agree instead.