-
Notifications
You must be signed in to change notification settings - Fork 96
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
216: Support 2D in CoordTransform r=rmanoka a=rmanoka - [x] I agree to follow the project's [code of conduct](https://github.com/georust/gdal/blob/master/CODE_OF_CONDUCT.md). - [x] I added an entry to `CHANGES.md` if knowledge of this change could be valuable to users. --- Currently `CoordTransform::transform` accepts three `&mut [f64]` slices (for x, y, and z coordinates). This prevents us from using it for 2D transform (whereas in the C api, we would have passed null ptr for z). This PR supports that by checking if the z slice is empty, and passes null_ptr instead. Also, currently we only check if the x and y slices have the same length. This causes sigsegv when passing incorrect z slice. We've also added a assertion for that. Modified one of the existing tests that didn't use the z coordinate to instead pass an empty slice. Co-authored-by: Rajsekar Manokaran <[email protected]> Co-authored-by: rmanoka <[email protected]>
- Loading branch information
Showing
2 changed files
with
30 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters