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

Conversation

Projects
None yet
2 participants
@tbonfort
Member

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

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Nov 20, 2013

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.

Member

tbonfort commented Nov 20, 2013

@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

This comment has been minimized.

Show comment
Hide comment
@pramsey

pramsey Nov 20, 2013

Contributor

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.

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

This comment has been minimized.

Show comment
Hide comment
@tbonfort

tbonfort Nov 25, 2013

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.

Member

tbonfort commented Nov 25, 2013

@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

This comment has been minimized.

Show comment
Hide comment
@pramsey

pramsey Nov 25, 2013

Contributor

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.

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

Merge pull request #4803 from tbonfort/force2d
PostGIS 2.1 ST_Force_2D is depreciated

@pramsey pramsey merged commit b081e9f into mapserver:branch-6-4 Nov 25, 2013

1 check passed

default The Travis CI build passed
Details

tbonfort added a commit to tbonfort/mapserver that referenced this pull request Dec 3, 2013

rouault added a commit to rouault/mapserver that referenced this pull request Jun 11, 2014

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)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment