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

Change Coodinate to byte[] or double[] #901

Closed
13661172102 opened this issue Jul 29, 2022 · 4 comments
Closed

Change Coodinate to byte[] or double[] #901

13661172102 opened this issue Jul 29, 2022 · 4 comments

Comments

@13661172102
Copy link

13661172102 commented Jul 29, 2022

For large geometry, there is a lot of points, then a lot of Coodinate Object. It takes multiple memory than byte[] or double[].

I know use Coodinate make the code readable. But i think performance is more important in future, because the spatial data size increase very fast.

@dr-jts
Copy link
Contributor

dr-jts commented Jul 29, 2022

This is why PackedCoordinateSequence exists.

@13661172102
Copy link
Author

thanks u , it means a lot. I will try to extend PackedCoordinateSequence for my own @dr-jts

@13661172102
Copy link
Author

@dr-jts i have tried to use PackedCoordinateSequence . But I found that when i do something like intersection , the toCoordinateArray() of PackedCoordinateSequence will be called. Then double[] turns to Coordinate[] again and the memory use is largger than before because double[] and Coordinate[] both exists.

@dr-jts
Copy link
Contributor

dr-jts commented Aug 2, 2022

The Coordinate[] should only exist while the computation is happening, and then be freed.

@dr-jts dr-jts closed this as completed Sep 15, 2022
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