-
Norvald H. Ryeng authored
GEOMETRY DATA Problem: There's no validation of geometry objects when assigning a value to a field. Fix: When assigning a value to a field, make sure that it is well-formed by checking: 1. The byte order is little-endian 2. The wkbType is within the supported range 3. The geometry matches the column type 4. Nested geometries contain only geometries that can be contained by that type 5. Linestrings have at least two points 6. Polygon rings have at least four points 7. Polygons have at least one ring 8. Collections, except geometrycollection, contain at least one element. 9. The string is exactly as long as the geometry object representation If the value doesn't have all these properties, raise ER_CANT_CREATE_GEOMETRY_OBJECT.
Norvald H. Ryeng authoredGEOMETRY DATA Problem: There's no validation of geometry objects when assigning a value to a field. Fix: When assigning a value to a field, make sure that it is well-formed by checking: 1. The byte order is little-endian 2. The wkbType is within the supported range 3. The geometry matches the column type 4. Nested geometries contain only geometries that can be contained by that type 5. Linestrings have at least two points 6. Polygon rings have at least four points 7. Polygons have at least one ring 8. Collections, except geometrycollection, contain at least one element. 9. The string is exactly as long as the geometry object representation If the value doesn't have all these properties, raise ER_CANT_CREATE_GEOMETRY_OBJECT.
Loading