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

deflateCoordinate ignores stride parameter unlike the other functions in deflate.js #15754

Open
chaeser opened this issue Apr 18, 2024 · 0 comments

Comments

@chaeser
Copy link

chaeser commented Apr 18, 2024

Describe the bug
I often import feature data that has geometry layout XYZ, but need the coordinates as XY. With all SimpleGeometry implementations except Point, this can be achieved as follows:
geometry.setCoordinates(geometry.getCoordinates(), 'XY');
The reason for this is in "src/ol/geom/flat/deflate.js". The function "deflateCoordinate" completely ignores parameter 'stride' and takes over the coordinate in its full length. All other functions correctly use the parameter 'stride' to decide how many dimensions are added to the flatCoordinates array.

Expected behavior
point.setCoordinates(point.getCoordinates(), 'XY') converts the coordinate to layout 'XY' as it is the case for all other SimpleGeometry implementations (except Circle, that has no coordinates).

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

No branches or pull requests

2 participants