mappostgis.c uses the ST_Force_2D function, which is now depreciated with PostGIS 2.1 . Postgresql logs
WARNING: ST_Force_2d signature was deprecated in 2.1.0. Please use ST_Force2D
use st_force2d instead of deprecated st_force_2d (#4803)
use version specific postgis force2d function (#4803)
also adds a PROCESSING "FORCE2D=no" to avoid using force2d altogether (#4024)
@pramsey could you please have a quick sanity check at this one? The aim is to stop using the deprecated st_force_2d for recent postgis version, or leave out the force_2d call completely if PROCESSING "FORCE2D=off" is added to the layer.
The code on its own looks fine, but it's going to run into a mess in the WKB handler, which expects 2D inputs only. So that code will also need to be touched a bit to recognize 3D wkb types and then do the Right Thing when they arrive.
@pramsey I see it more as an optional parameter you can add to avoid going through force_2d when you know that your geometries are not in 3D. It's off by default, and can be documented as resulting in undefined behaviour if used with 3D geometries.
Ah, I see. A bit scary, since people might easily assume that it means support for 3d, rather than lack of 2d forcing. But I think (looking at the code) the result won't be a crash but an error... pretty sure.
Merge PR #4803
PostGIS input: add 2.5D support when USE_POINT_Z_M is defined
Consequently the PROCESSING option FORCE2D is assumed to be NO by
default when USE_POINT_Z_M is defined (related to #4803)