Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

PostGIS 2.1 ST_Force_2D is depreciated #4803

Merged
merged 2 commits into from
Nov 25, 2013
Merged

PostGIS 2.1 ST_Force_2D is depreciated #4803

merged 2 commits into from
Nov 25, 2013

Conversation

tbonfort
Copy link
Member

@tbonfort tbonfort commented Nov 5, 2013

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

@tbonfort
Copy link
Member

@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.

@ghost ghost assigned tbonfort Nov 20, 2013
@pramsey
Copy link
Contributor

pramsey commented Nov 20, 2013

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.

@tbonfort
Copy link
Member

@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.

@pramsey
Copy link
Contributor

pramsey commented Nov 25, 2013

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.

@pramsey pramsey closed this Nov 25, 2013
@pramsey pramsey reopened this Nov 25, 2013
pramsey added a commit that referenced this pull request Nov 25, 2013
PostGIS 2.1 ST_Force_2D is depreciated
@pramsey pramsey merged commit b081e9f into MapServer:branch-6-4 Nov 25, 2013
rouault added a commit to rouault/mapserver that referenced this pull request Jun 11, 2014
Consequently the PROCESSING option FORCE2D is assumed to be NO by
default when USE_POINT_Z_M is defined (related to MapServer#4803)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants