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

+proj=deformation crashes when passed points outside model area #934

Closed
kbevers opened this issue Apr 13, 2018 · 0 comments · Fixed by #935
Closed

+proj=deformation crashes when passed points outside model area #934

kbevers opened this issue Apr 13, 2018 · 0 comments · Fixed by #935
Labels
Milestone

Comments

@kbevers
Copy link
Member

kbevers commented Apr 13, 2018

PROJ segfaults when trying to transform a point outside the defined area of the grids used in deformation as seen in the example below that uses the velocity model from the proj-datumgrids-europe package. The grid has a bounding box spanned by the points 3,53 (LL) and 40,74 (UR).

echo 12 50 0 0 | ./bin/cct  +proj=pipeline +ellps=GRS80 \
+step   +proj=cart \
+step   +proj=deformation +t_epoch=200.0 \
+xy_grids=nkgrf03vel_realigned_xy.ct2 \
+z_grids=nkgrf03vel_realigned_z.gtx \
+step   +proj=cart +inv
Segmentation fault: 11

A temporary fix is to make the grids optional and add the null grid:

+proj=deformation +t_epoch=200.0
+xy_grids=@nkgrf03vel_realigned_xy.ct2,@null
+z_grids=@nkgrf03vel_realigned_z.gtx,@null
@kbevers kbevers added the bug label Apr 13, 2018
@kbevers kbevers added this to the 5.1.0 milestone Apr 13, 2018
kbevers added a commit to kbevers/PROJ that referenced this issue Apr 13, 2018
When transforming coordinates outside the grid model the deformation
operation failed spectatularly. This is now fixed by checking that the
coordinate is inside the grid. If it isn't an error is returned and a
debugging log message is issued.

Closes OSGeo#934
kbevers added a commit to NordicGeodesy/NordicTransformations that referenced this issue Apr 13, 2018
This is in reaction to the bug reported here OSGeo/PROJ#934
kbevers added a commit to kbevers/PROJ that referenced this issue Apr 13, 2018
When transforming coordinates outside the grid model the deformation
operation failed spectatularly. This is now fixed by checking that the
coordinate is inside the grid. If it isn't an error is returned and a
debugging log message is issued.

Closes OSGeo#934
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant