OGR_G_SetPoints behavior is not coherent
Description (last modified by )
There is no SetPoints_2D function in the C API and the comment in the docs next to z param of SetPoints says that "defaults to NULL for 2D objects".
There are separate SetPoint and SetPoint_2D functions and SetPoint upgrades a 2D point to a 3D point.
SetPoints used on a 2D point upgrades it to 3D point. When it is used on a LineString the behavior depends on stride arguments. If they are zero, the z can be used to force the line string 2D or 3D. If they are not, the line string is always forced to 3D.
I think the coherent behavior should be similar to SetPoint if z is not null and similar to SetPoint_2D if z is null. The doc should say "set to NULL for 2D objects, non-null upgrades the geometry to 3D".