geos
geos copied to clipboard
Fix CompoundCurve::validateConstruction for curves with empty elements
I may miss something, but it is not obvious to me that you can't insert an empty curve in a CompoundCurve, in which case back() and front() are returning something invalid. At least if using directly the CompoundCurve::CompoundCurve(std::vector<std::unique_ptr<SimpleCurve>>&& p_curves, const GeometryFactory& gf) constructor. That might be hard/impossible to trigger through WKT. But maybe through WKB ?
Originally posted by @rouault in https://github.com/libgeos/geos/pull/1164#discussion_r1774138181